diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2019-09-09 09:28:50 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-09-10 19:04:53 +0000 |
| commit | 10f15a4fafff9989df15b64a73c483af522c2d7c (patch) | |
| tree | 984984a6e2cb7320a65732326e666643db7737b0 | |
| parent | 9e30276556bbcfcb2605105b496393d21f5e61b2 (diff) | |
[FIX] l10n_multilang: ignore customized data conflict
If you:
- have a multilang COA
- create an account.account manually
- add a XML ID with structure {company_id}_{anything} manually
- reload COA translations (install COA language, install COA, set
installed COA since c346e7af3)
=> there is an error since the code try to copy translations of
account.account.template associated to custom XML ID.
fix: ignore this torcivous use case
fixes #36310
opw-2063207
closes #36544
closes odoo/odoo#36659
X-original-commit: 0fc0b7484c48fbdcf549e199b5c8cabff3ab726c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
| -rw-r--r-- | addons/l10n_multilang/models/l10n_multilang.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/l10n_multilang/models/l10n_multilang.py b/addons/l10n_multilang/models/l10n_multilang.py index 51ddb70c94c..8905c62d8f1 100644 --- a/addons/l10n_multilang/models/l10n_multilang.py +++ b/addons/l10n_multilang/models/l10n_multilang.py @@ -125,6 +125,9 @@ class AccountChartTemplate(models.Model): in_xml_ids = {xml_id.name: xml_id for xml_id in in_xml_ids} for name, xml_id in expected_in_xml_id_names.items(): + # ignore nonconforming customized data + if name not in in_xml_ids: + continue in_records += self.env[model + '.template'].browse(in_xml_ids[name].res_id) out_records += self.env[model].browse(xml_id.res_id) |
