[FIX] account: lines onchange on account.move: remove the base tag when removing a tax from a move line

Before that, when removing a tax previously set on an account.move.line in tax_ids, the onchange event did not remove the corresponding tags from the base line, causing possible errors in tax report.

closes odoo/odoo#36283

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
Olivier Colson
2019-08-30 12:51:16 +00:00
parent 8d7d2aeef3
commit 978af5c87e
+1 -1
View File
@@ -241,7 +241,7 @@ class AccountMove(models.Model):
processed_taxes += to_process_taxes
# Apply tags on base line
line.tag_ids = taxes.mapped('invoice_repartition_line_ids').filtered(lambda x: x.repartition_type == 'base').mapped('tag_ids')
line.tag_ids = line.tax_ids.mapped('invoice_repartition_line_ids').filtered(lambda x: x.repartition_type == 'base').mapped('tag_ids')
# Process taxes.
for tax in to_process_taxes: