[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:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user