From 07b08a2de0fb96dbecc398140acbe56a689e5b41 Mon Sep 17 00:00:00 2001 From: roen-odoo <roen@odoo.com> Date: Mon, 28 Aug 2023 17:28:18 +0200 Subject: [PATCH] [FIX] point_of_sale: Show price without discount in receipt Current behavior: When a discount is applied to a product, the receipt shows the price with the discount applied as the base price. Steps to reproduce: - Open PoS - Add a product to the order - Apply a discount to the product with the numpad - Validate the order - Check the receipt, the base price of the product is the price with the discount applied. (https://github.com/odoo/odoo/assets/32939472/eb0998a7-70a1-432a-8909-868d9307c999) The price in red should be 70$ (the price without the 5% discount) opw-3463745 closes odoo/odoo#133377 Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com> --- addons/point_of_sale/static/src/js/models.js | 1 + .../static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 169e9d34db90..e298e7050924 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -2576,6 +2576,7 @@ exports.Orderline = Backbone.Model.extend({ product_description_sale: this.get_product().description_sale, pack_lot_lines: this.get_lot_lines(), customer_note: this.get_customer_note(), + unitDisplayPriceBeforeDiscount: this.getUnitDisplayPriceBeforeDiscount(), }; }, generate_wrapped_product_name: function() { diff --git a/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml b/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml index 6246c5ddddb8..326b3930db9c 100644 --- a/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml +++ b/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml @@ -182,7 +182,7 @@ <t t-esc="env.pos.format_currency_no_symbol(line.price_with_tax_before_discount)"/> </t> <t t-else=""> - <t t-esc="env.pos.format_currency_no_symbol(line.price)"/> + <t t-esc="env.pos.format_currency_no_symbol(line.unitDisplayPriceBeforeDiscount)"/> </t> </div> </t> -- GitLab