OCA / community-data-files

https://odoo-community.org/project/tools-maintainers-30
GNU Affero General Public License v3.0
33 stars 171 forks source link

[FIX] account_tax_unece: fix migration path from 13.0 #115

Closed sebalix closed 2 years ago

sebalix commented 2 years ago

Since unece.code.list records of type date have been removed on 14.0, the upgrade to 14.0 is causing a constraint issue when Odoo is removing these XML data records from the database while they could still be used by account.tax records through the unece_due_date_id field.

pedrobaeza commented 2 years ago

The usual technique in OpenUpgrade is to be not destructive (as any other module may restore this date behavior and reuse the information), so the script should simply lift the constraint over such field. It's true that the records are removed, but you still have the correspondence applied on target records. That can be done with the openupgradelib method https://github.com/OCA/openupgradelib/blob/6d97dfc0af2f528889f4a491c71129ef0f7cf82f/openupgradelib/openupgrade.py#L2094

github-actions[bot] commented 2 years ago

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.