[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 <pimodoo@users.noreply.github.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user