odoo/odoo#223898
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 40s)
- ci/documentation: (runtime 1055s)
- label
- odoo-dev:saas-18.2-17.0-sentry-6776341713-l10n-be-value-error-adip-458046-fw
- head
- aaf1af001fbfc13e4e073ac7411fedbfd32fed50
- merged
- 10 months ago by Aditi Patel (adip)
| odoo/odoo | |
|---|---|
| 17.0 | #221227 |
| 18.0 | #223880 |
| saas-18.2 | #223898 |
| saas-18.3 | #223936 |
| saas-18.4 | #223961 |
| 19.0 | |
| saas-19.1 | |
| saas-19.2 | |
| saas-19.3 | |
| master | #223974 |
[FIX] l10n_be: prevent error on demo data loading if the related tag is deleted
Currently, installing the Belgium Accounting localization fails with an error, if the user has deleted referenced demo account tags.
Steps to reproduce:
- Install the Accounting app.
- Delete the "Demo Capital Account" account tag.
- Install the Belgium Accounting localization (l10n_be).
Error:
ValueError - External ID not found in the system: account.demo_capital_account
At [1], if the account.demo_capital_account is not found, it raises an error if the external ID is missing.
This commit prevents the error by explicitly passing raise_if_not_found=False and skipping the tag if not found.
[1] - https://github.com/odoo/odoo/blob/71d1c9a4bef1c29485e3b0390713a9301ad6db4f/addons/l10n_be/demo/account_demo.py#L13-L19
sentry-6776341713
Forward-Port-Of: #221227