From 3599c50c1a5293d33c8cf889dbcf9cccfc5e68f6 Mon Sep 17 00:00:00 2001 From: rhe-odoo Date: Thu, 6 Jul 2023 09:40:07 +0000 Subject: [PATCH] [IMP] point_of_sale, l10n_gcc_pos: remove is Simple Line This commit remove the way we display the price on the same line as the product name. It was only used in few cases and most of the time the price was display on another line because we have to add information. So now, we just use only one generic case that can handle all of them. closes odoo/odoo#127575 Signed-off-by: Joseph Caburnay (jcb) --- .../static/src/xml/OrderReceipt.xml | 12 ---- .../screens/receipt_screen/receipt/receipt.js | 8 --- .../receipt_screen/receipt/receipt.xml | 69 ++++++++----------- 3 files changed, 30 insertions(+), 59 deletions(-) diff --git a/addons/l10n_gcc_pos/static/src/xml/OrderReceipt.xml b/addons/l10n_gcc_pos/static/src/xml/OrderReceipt.xml index 91c264bf359..94536b3a16d 100644 --- a/addons/l10n_gcc_pos/static/src/xml/OrderReceipt.xml +++ b/addons/l10n_gcc_pos/static/src/xml/OrderReceipt.xml @@ -96,18 +96,6 @@ - - !receipt.is_gcc_country - - -
-
-
Taxes / الضرائب
: -
- -
-
- !receipt.is_gcc_country diff --git a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js index 21771b3a251..ff1aee82e90 100644 --- a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js +++ b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.js @@ -34,12 +34,4 @@ export class OrderReceipt extends Component { get shippingDate() { return this.receiptEnv.shippingDate; } - isSimple(line) { - return ( - line.discount === 0 && - line.is_in_unit && - line.quantity === 1 && - !(line.display_discount_policy == "without_discount" && line.price < line.price_lst) - ); - } } diff --git a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.xml b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.xml index b55d6a08950..b53f8f90635 100644 --- a/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.xml +++ b/addons/point_of_sale/static/src/app/screens/receipt_screen/receipt/receipt.xml @@ -178,48 +178,39 @@
- -
- - -
- -
- -
- - -
- - -> - -
-
- -
- - - - - - -
-
- -
- Discount: % -
-
+
+ +
- - - x - - - - + + -> +
+ +
+ + + + + + +
+
+ +
+ Discount: % +
+
+
+ + + x + + + + +