fixing some bug
This commit is contained in:
parent
4e132fad16
commit
513a59d378
@ -34,6 +34,9 @@ Change the Odoo Point of Sale text with Kedai Kipas 58
|
|||||||
('after', 'point_of_sale/static/src/scss/pos.scss', 'pos_restaurant/static/src/scss/restaurant.scss'),
|
('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/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/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': [
|
'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'),
|
('replace','pos_self_order/static/src/app/pages/confirmation_page/confirmation_page.xml', 'custom_pos_receipt/static/src/app/pages/confirmation_page.xml'),
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<templates id="template" xml:space="preserve">
|
||||||
|
<t t-name="point_of_sale.OrderWidget">
|
||||||
|
<t t-if="props.lines?.length">
|
||||||
|
<div t-ref="scrollable" class="fs-6 order-container bg-view overflow-y-auto flex-grow-1 d-flex flex-column text-start">
|
||||||
|
<t t-foreach="props.lines" t-as="line" t-key="line_index">
|
||||||
|
<t t-slot="default" line="line"/>
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
<div t-if="props.total or props.tax" class="order-summary w-100 py-2 px-3 bg-100 text-end fw-bolder fs-6 lh-sm">
|
||||||
|
Total:
|
||||||
|
<span t-esc="props.total" class="total"/>
|
||||||
|
<div style="font-size: 10px" t-if="props.tax" class="fs-6 text-muted subentry">
|
||||||
|
Taxes: <span t-esc="props.tax" class="tax"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<t t-slot="details"/>
|
||||||
|
</t>
|
||||||
|
<t t-else="">
|
||||||
|
<CenteredIcon icon="'fa-shopping-cart fa-4x'" text="emptyCartText()"/>
|
||||||
|
<t t-slot="details"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</templates>
|
||||||
@ -33,7 +33,6 @@ Change the Odoo Preparation Display for Kedai Kipas 58
|
|||||||
'assets': {
|
'assets': {
|
||||||
'pos_preparation_display.assets': [
|
'pos_preparation_display.assets': [
|
||||||
'custom_preparation_display/static/src/override/pos_preparation_display/**/*.js',
|
'custom_preparation_display/static/src/override/pos_preparation_display/**/*.js',
|
||||||
('replace','pos_self_order_preparation_display/static/src/override/pos_preparation_display/components/order/order.xml', 'custom_pos_receipt/static/src/override/pos_prepartion_display/components/order/order.xml'),
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
Binary file not shown.
@ -14,7 +14,6 @@ class CustomPosOrder(models.Model):
|
|||||||
# with channel 'preparation_display-{display.access_token}'
|
# with channel 'preparation_display-{display.access_token}'
|
||||||
# and message 'load_orders' with data {'preparation_display_id': display.id, 'sound': True}
|
# and message 'load_orders' with data {'preparation_display_id': display.id, 'sound': True}
|
||||||
for display in displays:
|
for display in displays:
|
||||||
#self.env['pos_preparation_display.display']._send_load_orders_message()
|
|
||||||
self.env['bus.bus']._sendone(f'preparation_display-{display.access_token}', 'load_orders', {
|
self.env['bus.bus']._sendone(f'preparation_display-{display.access_token}', 'load_orders', {
|
||||||
'preparation_display_id': display.id,
|
'preparation_display_id': display.id,
|
||||||
'sound': True
|
'sound': True
|
||||||
|
|||||||
@ -1,47 +0,0 @@
|
|||||||
/** @odoo-module */
|
|
||||||
import { patch } from "@web/core/utils/patch";
|
|
||||||
import { Order } from "@pos_preparation_display/app/components/order/order";
|
|
||||||
import { useService } from "@web/core/utils/hooks";
|
|
||||||
import { PreparationDisplay } from "@pos_preparation_display/app/models/preparation_display";
|
|
||||||
|
|
||||||
patch(PreparationDisplay.prototype, {
|
|
||||||
//override the setup of preparation display
|
|
||||||
async setup(data, env, preparationDisplayId) {
|
|
||||||
this.id = preparationDisplayId;
|
|
||||||
this.env = env;
|
|
||||||
this.showCategoryFilter = false;
|
|
||||||
this.orm = env.services.orm;
|
|
||||||
this.orders = {};
|
|
||||||
this.orderlines = {};
|
|
||||||
this.categories = {};
|
|
||||||
this.products = {};
|
|
||||||
this.stages = new Map(); // We need a Map() and not an object because the order of the elements is important
|
|
||||||
this.selectedStageId = 0;
|
|
||||||
this.selectedCategories = new Set();
|
|
||||||
this.selectedProducts = new Set();
|
|
||||||
this.filteredOrders = [];
|
|
||||||
this.noteByLines = {};
|
|
||||||
this.rawData = {
|
|
||||||
categories: data.categories,
|
|
||||||
orders: data.orders,
|
|
||||||
stages: data.stages,
|
|
||||||
attributes: data.attributes,
|
|
||||||
attributeValues: data.attribute_values,
|
|
||||||
};
|
|
||||||
|
|
||||||
this.restoreFilterFromLocalStorage();
|
|
||||||
this.processStages();
|
|
||||||
this.processCategories();
|
|
||||||
this.processOrders();
|
|
||||||
this.attributes = data.attributes;
|
|
||||||
this.attributeValues = data.attribute_values;
|
|
||||||
this.posHasProducts = await this.loadPosHasProducts();
|
|
||||||
this.loadingProducts = false;
|
|
||||||
|
|
||||||
// force refresh every 5 seconds
|
|
||||||
|
|
||||||
// setTimeout(function(){
|
|
||||||
// window.location.reload();
|
|
||||||
// }, 5000);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<templates id="template" xml:space="preserve">
|
|
||||||
<t t-name="custom_preparation_display.Order" t-inherit="pos_preparation_display.Order" t-inherit-mode="extension">
|
|
||||||
<xpath expr="//div[hasclass('o_pdis_table')]" position="replace">
|
|
||||||
<div class="o_pdis_table pe-1">
|
|
||||||
<t t-if="this.props.order.take_away">OUT </t>
|
|
||||||
<t t-elif="this.props.order.table_stand_number or (this.props.order.table and this.props.order.table.name)">T<t t-if="this.props.order.table_stand_number" t-esc="this.props.order.table_stand_number"/><t t-else="" t-esc="this.props.order.table.name"/> </t>
|
|
||||||
<!-- change the self order tracking number, default is 'IN'-->
|
|
||||||
<t t-else="">
|
|
||||||
T<t t-if="this.props.order.table.name" t-esc="this.props.order.table.name"/> </t>
|
|
||||||
</t>
|
|
||||||
</div>
|
|
||||||
</xpath>
|
|
||||||
</t>
|
|
||||||
</templates>
|
|
||||||
Loading…
Reference in New Issue
Block a user