From 28b8b9ac370f91d28271a72730bff63bc9d3bcd2 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 24 Jan 2017 15:39:09 +0100 Subject: [PATCH] [FIX] sale: _get_tax_amount_by_group When computing the amount tax by group, the taxes which affect base of subsequent taxes must be taken into account and added to the base amount for only one product. opw:703524 --- addons/sale/models/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index b1cc00fd5b8..e4776634d52 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -505,7 +505,7 @@ class SaleOrder(models.Model): amount = tax.compute_all(line.price_reduce + base_tax, quantity=line.product_uom_qty)['taxes'][0]['amount'] res[group] += amount if tax.include_base_amount: - base_tax += amount + base_tax += tax.compute_all(line.price_reduce + base_tax, quantity=1)['taxes'][0]['amount'] res = sorted(res.items(), key=lambda l: l[0].sequence) res = map(lambda l: (l[0].name, l[1]), res) return res