[19.0][OU-FIX] account: drop stale l10n account.report.line xml_ids#18
Draft
dnplkndll wants to merge 1 commit into
Draft
[19.0][OU-FIX] account: drop stale l10n account.report.line xml_ids#18dnplkndll wants to merge 1 commit into
dnplkndll wants to merge 1 commit into
Conversation
19.0 reclassifies many l10n_* tax-report xml_ids from account.report.line to account.report.expression (leaf rows with _base / _tax / _adj suffixes become expressions; hierarchical parents stay as lines). The 18.0 ir_model_data still maps every affected xml_id as account.report.line, so the 19.0 module update crashes with `For external id <name> when trying to create/update a record of model account.report.expression found record of different model account.report.line`. Drop the stale l10n_* lines in pre-migration. The FK account_report_expression.report_line_id ON DELETE CASCADE auto- cleans dependent expressions; the l10n module update reinstalls both under the correct 19.0 model assignment via _load_records().
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.
Port: 18→19 of the
account.report.linexml_ids that 19.0 reclassifies intoaccount.report.expression. Without this, the first l10n module update after the schema split crashes with:Scope: 5,233 stale xml_ids across 94 l10n modules in a Tier-1 600-module seed (top owners:
l10n_es588,l10n_ec383,l10n_it326,l10n_kr222,l10n_lu162,l10n_fr_account132,l10n_br126,l10n_ma115; long tail through small-country modules). Zero non-l10n_ owners observed; the fix scopesmodule LIKE 'l10n_%%'as a safety belt.Approach
Drop the stale
account.report.linerows forl10n_*owners in pre-migration. The FKaccount_report_expression.report_line_id ON DELETE CASCADEauto-cleans dependent expressions; the l10n module update reinstalls both line and expression rows under the correct 19.0 model assignment via_load_records().Non-mechanical adaptations worth flagging
account/19.0.1.4/pre-migration.py, not per-l10n. The remap is uniform across all 94 affected modules — same xml_id prefix patterns, same model swap, same join key. Per-l10n alternatives would multiply boilerplate 94× without adding signal.accountis the natural schema owner.tax_report_line_*xml_ids stay asaccount.report.linein 19.0 (hierarchical parents). Deleting and letting-u allreinstall is the same end-state as a selective remap, but trivially safer (no per-module XML parser, no parser bug surface). Lab Tier-1 seed validated round-trip: 5,233 pre-state → 5,949 lines + 6,580 expressions post-migration (numbers grow because 19.0 adds new report records).Known acceptable consequence
account_report_external_value.carryover_origin_report_line_idisON DELETE SET NULL. Carryover-display metadata for historical tax period continuity loses its origin link; values themselves are preserved, and re-establish as new periods accumulate on 19.0.