From cd61b662e7127035a36ea4c1752f95ca132e80b5 Mon Sep 17 00:00:00 2001 From: Pierre Masereel Date: Thu, 17 Dec 2020 14:29:25 +0000 Subject: [PATCH] [FIX] point_of_sale: discount product with tax When you are using a discount product with a tax, you get a traceback when trying to add the discount. It is caused by a typo and is fixed here. closes odoo/odoo#63550 X-original-commit: b389dcabf49fd05c5239d68fd26ef4239963a7e5 Signed-off-by: pimodoo --- addons/pos_discount/static/src/js/DiscountButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/pos_discount/static/src/js/DiscountButton.js b/addons/pos_discount/static/src/js/DiscountButton.js index b0b01dfa762..e906d3540f1 100644 --- a/addons/pos_discount/static/src/js/DiscountButton.js +++ b/addons/pos_discount/static/src/js/DiscountButton.js @@ -49,7 +49,7 @@ odoo.define('pos_discount.DiscountButton', function(require) { // We add the price as manually set to avoid recomputation when changing customer. var base_to_discount = order.get_total_without_tax(); if (product.taxes_id.length){ - var first_tax = this.pos.taxes_by_id[product.taxes_id[0]]; + var first_tax = this.env.pos.taxes_by_id[product.taxes_id[0]]; if (first_tax.price_include) { base_to_discount = order.get_total_with_tax(); }