[FIX] account: invoice validation with complex taxes with children

The field tax_ids on account.move.line created from an invoice was incorrect in case of a tax with children with type_tax_use!= 'none'. Hence, the tax_base_amount and the whole tax statement was wrong in that specific case.
Was part of (although not related) the PR #26262
This commit is contained in:
Jigar Vaghela
2019-01-18 08:34:56 +00:00
committed by qdp-odoo
parent 86e90fcbea
commit 7c4fe6b3f2
+1 -2
View File
@@ -1087,8 +1087,7 @@ class AccountInvoice(models.Model):
for tax in line.invoice_line_tax_ids:
tax_ids.append((4, tax.id, None))
for child in tax.children_tax_ids:
if child.type_tax_use != 'none':
tax_ids.append((4, child.id, None))
tax_ids.append((4, child.id, None))
analytic_tag_ids = [(4, analytic_tag.id, None) for analytic_tag in line.analytic_tag_ids]
move_line_dict = {