From 978af5c87edf1b01b9612aa762249ebc86af9de0 Mon Sep 17 00:00:00 2001 From: Olivier Colson Date: Fri, 30 Aug 2019 12:51:16 +0000 Subject: [PATCH] [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) --- addons/account/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 6676b230e88..0e1085ffcce 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -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: