From 6504de0f94b604ca24b1e0570b93a2f376694f99 Mon Sep 17 00:00:00 2001 From: "Loukas Wets (lowe)" Date: Tue, 3 Oct 2023 12:18:31 +0200 Subject: [PATCH] [IMP] point_of_sale,l10n_in_pos: various pos.bill changes This commit: - Changes the order of bills and how the values are displayed in the pos_bill_view. - Adds a 500 bill for India localisation. - Changes the tree view of pos bill to be editable and set the bill to all the pos_configs if no config is linked to the bill. - To prevent inconsitancy, 'pos_default_bill_ids' field is removed from the res.config.settings view since if no pos config is linked to the bill, the bill is accessible to all the pos configs. - Removes the amount in the open session button in opening cash control popup. Task-3537655 closes odoo/odoo#137521 Signed-off-by: Joseph Caburnay (jcb) --- addons/l10n_in_pos/data/product_demo.xml | 4 ++++ addons/point_of_sale/data/point_of_sale_data.xml | 15 --------------- addons/point_of_sale/models/pos_session.py | 2 +- .../cash_opening_popup/cash_opening_popup.xml | 6 ++---- .../money_details_popup/money_details_popup.xml | 6 ++---- addons/point_of_sale/views/pos_bill_view.xml | 4 ++-- .../views/res_config_settings_views.xml | 3 --- 7 files changed, 11 insertions(+), 29 deletions(-) diff --git a/addons/l10n_in_pos/data/product_demo.xml b/addons/l10n_in_pos/data/product_demo.xml index 29d8aeb4cc6..38652a1fc32 100644 --- a/addons/l10n_in_pos/data/product_demo.xml +++ b/addons/l10n_in_pos/data/product_demo.xml @@ -53,5 +53,9 @@ Ball point pens; felt tipped and other porous-tipped pens and markers; fountain pens, stylograph pens and other pens; duplicating stylos; propelling or sliding pencils; pen-holders, pencilholders and similar holders; parts (including caps and clips) of the foregoing articles, othe than those of heading 9609 + + 500.00 + 500.00 + diff --git a/addons/point_of_sale/data/point_of_sale_data.xml b/addons/point_of_sale/data/point_of_sale_data.xml index 1d47940861d..ccedddc8836 100644 --- a/addons/point_of_sale/data/point_of_sale_data.xml +++ b/addons/point_of_sale/data/point_of_sale_data.xml @@ -57,91 +57,76 @@ 0.01 0.01 - 0.02 0.02 - 0.05 0.05 - 0.10 0.10 - 0.20 0.20 - 0.25 0.25 - 0.50 0.50 - 1.00 1.00 - 2.00 2.00 - 5.00 5.00 - 10.00 10.00 - 20.00 20.00 - 50.00 50.00 - 100.00 100.00 - 200.00 200.00 - diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index d44cc4ab43b..4351088e28b 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -1845,7 +1845,7 @@ class PosSession(models.Model): return config def _loader_params_pos_bill(self): - return {'search_params': {'domain': [('id', 'in', self.config_id.default_bill_ids.ids)], 'fields': ['name', 'value']}} + return {'search_params': {'domain': ['|', ('id', 'in', self.config_id.default_bill_ids.ids), ('pos_config_ids', '=', False)], 'fields': ['name', 'value']}} def _get_pos_ui_pos_bill(self, params): return self.env['pos.bill'].search_read(**params['search_params']) diff --git a/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.xml b/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.xml index edf2f0c8125..e94f253120c 100644 --- a/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.xml +++ b/addons/point_of_sale/static/src/app/store/cash_opening_popup/cash_opening_popup.xml @@ -24,13 +24,11 @@
-
diff --git a/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.xml b/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.xml index 928a9ae9a63..e37d1c75214 100644 --- a/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.xml +++ b/addons/point_of_sale/static/src/app/utils/money_details_popup/money_details_popup.xml @@ -6,14 +6,12 @@
- +
diff --git a/addons/point_of_sale/views/pos_bill_view.xml b/addons/point_of_sale/views/pos_bill_view.xml index fda8c2d22a9..4b1518a07c6 100644 --- a/addons/point_of_sale/views/pos_bill_view.xml +++ b/addons/point_of_sale/views/pos_bill_view.xml @@ -20,10 +20,10 @@ pos.bill.tree pos.bill - + - + diff --git a/addons/point_of_sale/views/res_config_settings_views.xml b/addons/point_of_sale/views/res_config_settings_views.xml index 273401adcee..528b8c0de6e 100644 --- a/addons/point_of_sale/views/res_config_settings_views.xml +++ b/addons/point_of_sale/views/res_config_settings_views.xml @@ -86,9 +86,6 @@ - - -