Repository navigation
feat(migrate): give former group taxes their children's accounts after 13.0 - #52
Merged
Merged
Conversation
…r 13.0 OpenUpgrade 13.0 turns a localisation's group taxes (reverse charge, intra-community purchases) into one tax and takes its repartition lines' account from the group, which holds none: a bill posted after the migration puts both tax amounts on the expense account of its line. For a source up to 12.0, right after the 13.0 step, each such line takes the account of its child's repartition line, matched by document, type and sign. Proposed upstream as OCA/OpenUpgrade#6047; once OpenUpgrade sets them, nothing is written.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
OpenUpgrade 13.0 (
l10n_es13.0.4.0) turns a localisation's group taxes (reverse charge, intra-community purchases) into one tax and takes its repartition lines' account from the group, which holds none. Existing journal items keep their accounts, but a bill posted after the migration puts both tax amounts on the expense account of its line. Reproduced on a clean 12.0 database withl10n_esand proposed upstream as OCA/OpenUpgrade#6047.account_chart_updatefills the template's accounts only when run at 13.0; at 18.0 it stops on a tax already used.What
odoo_dwg/grouptaxes.py: right after the 13.0 step, for a source up to 12.0, each tax repartition line without account of a tax with children takes the account of its child's repartition line (same document, repartition type and sign, as OpenUpgrade matches the journal items). Lines with an account are left, so with the upstream fix merged it writes nothing. Listed inlogs/13.0-group-tax-accounts.tsv.migration-run(archived change2026-09-30-keep-group-tax-accounts), docs, verifiertools/verify_group_tax_accounts.py.Checks
python -m pytest -q,python -m ruff check .,openspec validate --specs: pass.tools/verify_group_tax_accounts.py,tools/verify_generated_shell.py,tools/verify_migration_driver.py: pass.l10n_esdatabase migrated by stock OpenUpgrade 13.0, the repair leaves it identical to OpenUpgrade with the upstream fix; a second run writes nothing.account_chart_updatethen applies without error.Assisted-by: Claude