From ccdfa1498f9d53a965f329f0c87b37fe9839436e Mon Sep 17 00:00:00 2001 From: Wolfgang Taferner Date: Sun, 6 Dec 2020 15:00:22 +0000 Subject: [PATCH] [FIX] account: if the base_tags are empty, it won't be updated If you have a move line which was having tag_ids before and you apply a new tax which has no values defined and result in an empty list, the assignment does not work on a x2m field, so we do offer the proper notation for such a use case. Closes #62934 closes odoo/odoo#63176 X-original-commit: f7cbbe381950699f2aeb26c454a4a955ed3bf2b4 Signed-off-by: oco-odoo --- 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 8c6f3035fab..fa7f9de0f63 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -627,7 +627,7 @@ class AccountMove(models.Model): compute_all_vals = _compute_base_line_taxes(line) # Assign tags on base line - line.tax_tag_ids = compute_all_vals['base_tags'] + line.tax_tag_ids = compute_all_vals['base_tags'] or [(5, 0, 0)] tax_exigible = True for tax_vals in compute_all_vals['taxes']: