[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user