diff options
| author | oco-odoo <oco@odoo.com> | 2019-12-09 12:46:57 +0000 |
|---|---|---|
| committer | oco-odoo <oco@odoo.com> | 2019-12-09 12:46:57 +0000 |
| commit | b2465a48bbcf29c21d5bd830276fdffdcd403ecb (patch) | |
| tree | fb9d76f9d3658eead33e36a7b3af49e7bbb097d8 | |
| parent | 56f6d62324e7d29b4ba6083f1bc23ad49e514786 (diff) | |
[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
| -rw-r--r-- | addons/account/models/account.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account.py b/addons/account/models/account.py index 2d684ff14c2..ccb0646e009 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -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 |
