From 513a59d37834976811997ef2bb44ddfb04c536ce Mon Sep 17 00:00:00 2001 From: "suherdy.yacob@mapan.co.id" Date: Tue, 8 Apr 2025 11:48:01 +0700 Subject: [PATCH] fixing some bug --- custom_pos_receipt/__manifest__.py | 3 ++ .../order_widget/order_widget.xml | 24 +++++++++ custom_preparation_display/__manifest__.py | 3 +- .../customposorder.cpython-312.pyc | Bin 1343 -> 1343 bytes .../models/customposorder.py | 1 - .../components/order/customprepdisplay.js | 47 ------------------ .../components/order/order.xml | 15 ------ 7 files changed, 28 insertions(+), 65 deletions(-) create mode 100644 custom_pos_receipt/static/src/app/generic_components/order_widget/order_widget.xml delete mode 100644 custom_preparation_display/static/src/override/pos_preparation_display/components/order/customprepdisplay.js delete mode 100644 custom_preparation_display/static/src/override/pos_preparation_display/components/order/order.xml diff --git a/custom_pos_receipt/__manifest__.py b/custom_pos_receipt/__manifest__.py index 388e9c6..5cf56da 100644 --- a/custom_pos_receipt/__manifest__.py +++ b/custom_pos_receipt/__manifest__.py @@ -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'), ('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'), diff --git a/custom_pos_receipt/static/src/app/generic_components/order_widget/order_widget.xml b/custom_pos_receipt/static/src/app/generic_components/order_widget/order_widget.xml new file mode 100644 index 0000000..4523474 --- /dev/null +++ b/custom_pos_receipt/static/src/app/generic_components/order_widget/order_widget.xml @@ -0,0 +1,24 @@ + + + + +
+ + + +
+
+ Total: + +
+ Taxes: +
+
+ + + + + + + +
diff --git a/custom_preparation_display/__manifest__.py b/custom_preparation_display/__manifest__.py index 38cff11..cf4cbb8 100644 --- a/custom_preparation_display/__manifest__.py +++ b/custom_preparation_display/__manifest__.py @@ -33,7 +33,6 @@ Change the Odoo Preparation Display for Kedai Kipas 58 'assets': { 'pos_preparation_display.assets': [ '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'), ], }, -} +} \ No newline at end of file diff --git a/custom_preparation_display/models/__pycache__/customposorder.cpython-312.pyc b/custom_preparation_display/models/__pycache__/customposorder.cpython-312.pyc index 58559044027d441517a00d3076849f71be8dc60d..500d53d23a83e40c3b0bc5ca7635223d80c6ef81 100644 GIT binary patch delta 93 zcmdnbwV#XcG%qg~0}!aL{F1(mc_ZI0W=8JGCz*A5xEN$qJ~6QH3Qu6aF`0?QnwuHO u{=m=8Df~fVvIk2o8$YY?2L}Ghr&$t(g&2h=giVi`81t0@$Sjfpng;-HO&53o delta 93 zcmdnbwV#XcG%qg~0}yQN`jY;cWh37%W=5{bCz*A5*cfC~J~6QJ3Qu5vFqw(Pnwu5K u{=m(}Df~ffvIk2o8y~Ci2L`^$r&$t(1sR1WgiVi`81t0@$Sjfpng;-=UKlR` diff --git a/custom_preparation_display/models/customposorder.py b/custom_preparation_display/models/customposorder.py index 57f8941..dac4bab 100644 --- a/custom_preparation_display/models/customposorder.py +++ b/custom_preparation_display/models/customposorder.py @@ -14,7 +14,6 @@ class CustomPosOrder(models.Model): # with channel 'preparation_display-{display.access_token}' # and message 'load_orders' with data {'preparation_display_id': display.id, 'sound': True} 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', { 'preparation_display_id': display.id, 'sound': True diff --git a/custom_preparation_display/static/src/override/pos_preparation_display/components/order/customprepdisplay.js b/custom_preparation_display/static/src/override/pos_preparation_display/components/order/customprepdisplay.js deleted file mode 100644 index 5c5f32c..0000000 --- a/custom_preparation_display/static/src/override/pos_preparation_display/components/order/customprepdisplay.js +++ /dev/null @@ -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); - }, -}); \ No newline at end of file diff --git a/custom_preparation_display/static/src/override/pos_preparation_display/components/order/order.xml b/custom_preparation_display/static/src/override/pos_preparation_display/components/order/order.xml deleted file mode 100644 index d4977b0..0000000 --- a/custom_preparation_display/static/src/override/pos_preparation_display/components/order/order.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - -
- OUT - T - - - T - -
-
-
-