-
- Downloads
[FIX] account, l10n_generic_coa: remove unused master data
When installing the `account` module, some of its master data is installed as `l10n_generic_coa` data. During the uninstallation of `account`, `l10n_generic_coa` is uninstalled first since its a dependency of `account`, but some of its master data cannot be uninstalled yet as its still being referenced in some `account` et al tables. When `account` is being reinstalled, the datas will be updated instead of created since they were left intact in the database, this proves troublesome as the code YAML interpreter adds some context variables when creating records but not when updating records, these context variables are necessary in order to trigger some onchanges and defaults for fields that are required, since this does not happen we get a `NOT NULL CONSTRAINT` error when re-installing the `account` module. This patch solves this issue by adding an uninstall_hook that will delete all ir_model_data that belongs to the module `l10n_generic_coa` upon its uninstallation. Fixes #25005
Loading
Please register or sign in to comment