[FIX] sale: Wrong taxes amount printed in SO
Steps to reproduce the bug: -Create a tax group TX with two taxes: 15% and 5% -Create a SO with one line and set TX on it -Print the SO Bug: Only the first tax of TX was taking into account opw:748923
This commit is contained in:
@@ -510,9 +510,10 @@ class SaleOrder(models.Model):
|
||||
for tax in line.tax_id:
|
||||
group = tax.tax_group_id
|
||||
res.setdefault(group, 0.0)
|
||||
amount = tax.compute_all(line.price_reduce + base_tax, quantity=line.product_uom_qty,
|
||||
product=line.product_id, partner=self.partner_shipping_id)['taxes'][0]['amount']
|
||||
res[group] += amount
|
||||
taxes = tax.compute_all(line.price_reduce + base_tax, quantity=line.product_uom_qty,
|
||||
product=line.product_id, partner=self.partner_shipping_id)['taxes']
|
||||
for t in taxes:
|
||||
res[group] += t['amount']
|
||||
if tax.include_base_amount:
|
||||
base_tax += tax.compute_all(line.price_reduce + base_tax, quantity=1, product=line.product_id,
|
||||
partner=self.partner_shipping_id)['taxes'][0]['amount']
|
||||
|
||||
Reference in New Issue
Block a user