first commit
This commit is contained in:
commit
b623a14105
1
__init__.py
Executable file
1
__init__.py
Executable file
@ -0,0 +1 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
46
__manifest__.py
Executable file
46
__manifest__.py
Executable file
@ -0,0 +1,46 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
{
|
||||||
|
'name': "custom_pos_receipt",
|
||||||
|
|
||||||
|
'summary': "Change the receipt for Kedai Kipas 58",
|
||||||
|
|
||||||
|
'description': """
|
||||||
|
Change the Odoo Point of Sale text with Kedai Kipas 58
|
||||||
|
""",
|
||||||
|
|
||||||
|
'author': "Suherdy Yacob",
|
||||||
|
'license': "GPL-3",
|
||||||
|
'website': "",
|
||||||
|
|
||||||
|
# Categories can be used to filter modules in modules listing
|
||||||
|
# Check https://github.com/odoo/odoo/blob/15.0/odoo/addons/base/data/ir_module_category_data.xml
|
||||||
|
# for the full list
|
||||||
|
'category': 'Customizations',
|
||||||
|
'version': '0.1',
|
||||||
|
|
||||||
|
# any module necessary for this one to work correctly
|
||||||
|
'depends': ['base','point_of_sale', 'pos_restaurant'],
|
||||||
|
|
||||||
|
# always loaded
|
||||||
|
'data': [
|
||||||
|
# 'security/ir.model.access.csv',
|
||||||
|
],
|
||||||
|
# only loaded in demonstration mode
|
||||||
|
'demo': [
|
||||||
|
],
|
||||||
|
'assets': {
|
||||||
|
'point_of_sale._assets_pos': [
|
||||||
|
'custom_pos_receipt/static/src/**/*',
|
||||||
|
('after', 'point_of_sale/static/src/scss/pos.scss', 'pos_restaurant/static/src/scss/restaurant.scss'),
|
||||||
|
('replace', 'point_of_sale/static/src/css/pos_receipts.css', 'custom_pos_receipt/static/src/css/pos_receipt_custom.css'),
|
||||||
|
('replace', 'point_of_sale/static/src/app/navbar/closing_popup/closing_popup.xml', 'custom_pos_receipt/static/src/app/navbar/closing_popup.xml'),
|
||||||
|
# ('replace', 'point_of_sale/static/src/app/generic_components/order_widget/order_widget.xml', 'custom_pos_receipt/static/src/app/generic_components/order_widget/order_widget.xml'),
|
||||||
|
# ('replace', 'point_of_sale/static/src/app/screens/receipt_screen/receipt/order_receipt.xml', 'custom_pos_receipt/static/src/app/screens/receipt_screen/receipt/order_receipt.xml'),
|
||||||
|
# ('replace', 'point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt_header/receipt_header.xml', 'custom_pos_receipt/static/src/app/screens/receipt_screen/receipt/receipt_header.xml'),
|
||||||
|
],
|
||||||
|
'pos_self_order.assets': [
|
||||||
|
('replace','pos_self_order/static/src/app/pages/confirmation_page/confirmation_page.xml', 'custom_pos_receipt/static/src/app/pages/confirmation_page.xml'),
|
||||||
|
],
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
BIN
__pycache__/__init__.cpython-310.pyc
Executable file
BIN
__pycache__/__init__.cpython-310.pyc
Executable file
Binary file not shown.
BIN
__pycache__/__init__.cpython-312.pyc
Normal file
BIN
__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
14
static/src/app/generic_components/order_widget/order_widget.xml
Executable file
14
static/src/app/generic_components/order_widget/order_widget.xml
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<templates id="template" xml:space="preserve">
|
||||||
|
<t t-name="custom_pos_receipt.OrderWidget" t-inherit="point_of_sale.OrderWidget" t-inherit-mode="extension">
|
||||||
|
<xpath expr="//div[hasclass('order-container')]" position="attributes">
|
||||||
|
<attribute name="class" add="fs-6" separator=" "/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//div[hasclass('order-summary')]" position="attributes">
|
||||||
|
<attribute name="class" remove="fs-2" add="fs-6" separator=" "/>
|
||||||
|
</xpath>
|
||||||
|
<xpath expr="//div[hasclass('subentry')]" position="attributes">
|
||||||
|
<attribute name="style">font-size: 10px</attribute>
|
||||||
|
</xpath>
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
71
static/src/app/navbar/closing_popup.xml
Executable file
71
static/src/app/navbar/closing_popup.xml
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<templates id="template" xml:space="preserve">
|
||||||
|
<t t-name="point_of_sale.ClosePosPopup">
|
||||||
|
<div class="popup close-pos-popup">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Closing Session</h4>
|
||||||
|
</div>
|
||||||
|
<main class="modal-body">
|
||||||
|
<div class="payment-methods-overview overflow-auto">
|
||||||
|
<table class="text-start">
|
||||||
|
<thead>
|
||||||
|
<tr class="text-dark">
|
||||||
|
<th>Payment Method</th>
|
||||||
|
<th>Expected</th>
|
||||||
|
<th style="width:20%">Counted</th>
|
||||||
|
<th>Difference</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<t t-if="pos.config.cash_control">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td t-esc="props.default_cash_details.name"/>
|
||||||
|
<td class="d-flex">
|
||||||
|
<Input tModel="[state.payments[props.default_cash_details.id], 'counted']"
|
||||||
|
callback.bind="(value) => this.setManualCashInput(value)"
|
||||||
|
isValid.bind="env.utils.isValidFloat"/>
|
||||||
|
<div class="button icon ClosePosPopup btn btn-secondary" t-on-click="openDetailsPopup">
|
||||||
|
<i class="fa fa-money fa-2x" role="img" title="Open the money details popup"/>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</t>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="notes-container d-flex flex-column flex-sm-row gap-3 border-top mt-3 pt-3">
|
||||||
|
<div class="opening-notes-container d-flex flex-column flex-grow-1 align-items-start" t-if="props.opening_notes" >
|
||||||
|
<label class="form-label" for="props.opening_notes">Opening note</label>
|
||||||
|
<textarea class="opening-notes form-control" id="props.opening_notes">
|
||||||
|
<t t-esc="props.opening_notes"/>
|
||||||
|
</textarea>
|
||||||
|
</div>
|
||||||
|
<div class="closing-notes-container d-flex flex-column flex-grow-1 align-items-start">
|
||||||
|
<label class="form-label" for="closingNotes">Closing note</label>
|
||||||
|
<textarea class="closing-notes form-control" id="closingNotes" placeholder="Add a closing note..." t-model="state.notes"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
<footer class="footer modal-footer justify-content-between">
|
||||||
|
<div class="modal-footer-left d-flex gap-2">
|
||||||
|
<button class="button highlight btn btn-lg btn-primary" t-att-disabled="!canConfirm()" t-on-click="confirm">Close Session</button>
|
||||||
|
<button class="button btn btn-lg btn-secondary" t-att-disabled="!canCancel()" t-on-click="cancel">Discard</button>
|
||||||
|
</div>
|
||||||
|
<!-- Download Sale Details -->
|
||||||
|
<div class="modal-footer-right d-flex gap-2">
|
||||||
|
<button class="button icon btn btn-lg btn-secondary"
|
||||||
|
t-on-click="downloadSalesReport"
|
||||||
|
title="Download a report with all the sales of the current PoS Session">
|
||||||
|
Daily Sale
|
||||||
|
<i class="fa fa-download" role="img"/>
|
||||||
|
</button>
|
||||||
|
<!-- Print Sale Details -->
|
||||||
|
<button t-if="hardwareProxy.printer" class="button icon btn btn-lg btn-secondary">
|
||||||
|
<SaleDetailsButton/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
|
||||||
|
</templates>
|
||||||
33
static/src/app/pages/confirmation_page.xml
Executable file
33
static/src/app/pages/confirmation_page.xml
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<templates id="template" xml:space="preserve">
|
||||||
|
<t t-name="pos_self_order.ConfirmationPage">
|
||||||
|
<div t-if="this.state.onReload" class="self_order_success_loader position-absolute vh-100 w-100 d-flex justify-content-center align-items-center opacity-50 bg-dark">
|
||||||
|
<div class="page-loader d-flex justify-content-center align-items-center">
|
||||||
|
<div class="spinner-border text-primary" role="status">
|
||||||
|
<span class="visually-hidden">Loading...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center align-items-center flex-column h-100 px-3 text-center">
|
||||||
|
<h1 t-if="state.payment and selfOrder.config.self_ordering_pay_after !== 'each'" class="mb-4">Selamat menikmati hidangan kami!</h1>
|
||||||
|
<h1 t-else="" class="mb-4">Makanan disiapkan setelah kami menerima pembayaran!</h1>
|
||||||
|
<h3 t-if="state.payment and confirmedOrder.state !== 'paid'" class="mt-3 text-muted">Bayar di kasir <t t-esc="selfOrder.formatMonetary(confirmedOrder.amount_total)" /></h3>
|
||||||
|
<div class="d-inline-flex flex-column border rounded py-4 px-5 bg-view mb-3">
|
||||||
|
<span class="fs-2 text-muted">Order Number</span>
|
||||||
|
<span class="number lh-1" t-esc="confirmedOrder.trackingNumber" />
|
||||||
|
</div>
|
||||||
|
<h3 t-if="selfOrder.table.name || confirmedOrder.table_stand_number" class="text-muted mb-3">
|
||||||
|
Service at table
|
||||||
|
<t t-if="selfOrder.config.self_ordering_mode === 'mobile'" t-esc="selfOrder.table.name + ' (' + selfOrder.table.floor_name + ')'" />
|
||||||
|
<t t-else="" t-esc="confirmedOrder.table_stand_number" />
|
||||||
|
</h3>
|
||||||
|
<h3 t-else="">Nomer meja diberikan setelah pembayaran selesai</h3>
|
||||||
|
</div>
|
||||||
|
<div class="px-3 py-4 text-center">
|
||||||
|
<button class="btn btn-primary btn-lg" t-on-click="backToHome">
|
||||||
|
<t t-if="this.selfOrder.config.self_ordering_mode === 'kiosk'">Close</t>
|
||||||
|
<t t-else="">Ok</t>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
8
static/src/app/screens/receipt_screen/receipt/receipt_screen.xml
Executable file
8
static/src/app/screens/receipt_screen/receipt/receipt_screen.xml
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<templates id="custom_template" xml:space="preserve">
|
||||||
|
<t t-name="custom_pos_receipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension">
|
||||||
|
<xpath expr="//p[text()='Powered by Odoo']" position="replace">
|
||||||
|
<p></p>
|
||||||
|
</xpath>
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
122
static/src/css/pos_receipt_custom.css
Executable file
122
static/src/css/pos_receipt_custom.css
Executable file
@ -0,0 +1,122 @@
|
|||||||
|
.pos-receipt-print {
|
||||||
|
width: 512px;
|
||||||
|
font-size: 12px !important;
|
||||||
|
color: #000000;
|
||||||
|
padding-top: 0px !important;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
margin-top: 0px !important;
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-right-align {
|
||||||
|
float: right;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-right-align .tax-letter{
|
||||||
|
margin-left: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-center-align {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-left-padding {
|
||||||
|
padding-left: 1.0em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-logo {
|
||||||
|
width: 40%;
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-qrcode {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-contact {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-order-data {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-amount {
|
||||||
|
font-size: 75% !important;
|
||||||
|
padding-left: 6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 75% !important;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-header {
|
||||||
|
font-size: 75% !important;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-order-receipt-cancel {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-customer-note {
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-payment-terminal-receipt {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 75%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-payment-terminal-receipt pre {
|
||||||
|
font-family: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.responsive-price {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.responsive-price > .pos-receipt-right-align {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .pos-receipt-taxes {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: min-content min-content auto auto auto;
|
||||||
|
width: 100%;
|
||||||
|
justify-items: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .orderlines {
|
||||||
|
/*rtl:ignore*/
|
||||||
|
direction: ltr;
|
||||||
|
}
|
||||||
|
|
||||||
|
.styled-receipt {
|
||||||
|
padding-top: 0px !important;
|
||||||
|
padding-bottom: 0px !important;
|
||||||
|
margin-top: 0px !important;
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .order-container {
|
||||||
|
font-size: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pos-receipt .order-summary {
|
||||||
|
font-size: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
@page { margin: 0; }
|
||||||
|
body { margin: 0.1cm; }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user