[FIX] account: don't delete the tags on taxes when upgrading a tax report

Before that, upgrading a l10n_* module with a tax report removed all the tags from the tax repartition lines.

X-original-commit: a1364bde860266154298034bbae3693161834f49
This commit is contained in:
oco-odoo
2019-12-09 12:46:57 +00:00
parent 56f6d62324
commit b2465a48bb
+1 -1
View File
@@ -84,7 +84,7 @@ class AccountTaxReport(models.Model):
if 'country_id' in vals:
tags_cache = {}
for record in self:
for record in self.filtered(lambda x: x.country_id.id != vals['country_id']):
for line in record.line_ids:
if line.tag_ids:
#The tags for this country may have been created by a previous line in this loop