From dad77f7adc69bb3cd33fe92f56afb1e6ff4db170 Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Fri, 15 Mar 2024 15:36:23 +0530 Subject: [PATCH] Mar 15 [UPDT] : Updated 'product_multi_uom_pos' --- product_multi_uom_pos/__manifest__.py | 2 +- product_multi_uom_pos/doc/RELEASE_NOTES.md | 5 ----- product_multi_uom_pos/models/pos_order_line.py | 11 +++++++++++ .../generic_components/orderline/orderline.xml | 2 +- .../static/src/overrides/models/orderline.js | 14 -------------- 5 files changed, 13 insertions(+), 21 deletions(-) diff --git a/product_multi_uom_pos/__manifest__.py b/product_multi_uom_pos/__manifest__.py index d7e982465..298ba4b46 100644 --- a/product_multi_uom_pos/__manifest__.py +++ b/product_multi_uom_pos/__manifest__.py @@ -21,7 +21,7 @@ ############################################################################# { 'name': "POS Product Multiple UOM", - 'version': '17.0.1.0.1', + 'version': '17.0.1.0.0', 'category': 'Point of Sale', 'summary': """A module to manage multiple UoM in POS""", 'description': """Using this app, you can change unit of measure of diff --git a/product_multi_uom_pos/doc/RELEASE_NOTES.md b/product_multi_uom_pos/doc/RELEASE_NOTES.md index f0db4c993..c06f9bbfc 100644 --- a/product_multi_uom_pos/doc/RELEASE_NOTES.md +++ b/product_multi_uom_pos/doc/RELEASE_NOTES.md @@ -4,8 +4,3 @@ #### Version 17.0.1.0.0 #### ADD - Initial commit for POS Product Multiple UOM - -#### 12.02.2024 -#### Version 17.0.1.0.1 -#### UPDATE -- Removed buttons from receipt. \ No newline at end of file diff --git a/product_multi_uom_pos/models/pos_order_line.py b/product_multi_uom_pos/models/pos_order_line.py index 2e4a74e2c..3d17ead87 100644 --- a/product_multi_uom_pos/models/pos_order_line.py +++ b/product_multi_uom_pos/models/pos_order_line.py @@ -39,3 +39,14 @@ class PosOrderLine(models.Model): if values.get('product_uom_id'): values['uom_id'] = int(values['product_uom_id']) return super().create(values) + + def _export_for_ui(self, orderline): + """Extends the base '_export_for_ui' method to include the + 'product_uom_id' field in the exported data. + :param orderline: The POS order line. + :return: Dictionary with additional data for UI export.""" + result = super()._export_for_ui(orderline) + result.update({ + 'product_uom_id': orderline.product_uom_id.id, + }) + return result \ No newline at end of file diff --git a/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml b/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml index b09b0825e..0c826b1f0 100644 --- a/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml +++ b/product_multi_uom_pos/static/src/overrides/generic_components/orderline/orderline.xml @@ -5,7 +5,7 @@ t-inherit="point_of_sale.Orderline" t-inherit-mode="extension" owl="1"> - +