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