[OU-ADD] l10n_in: pre-migration for NEW/stored fields#21
Closed
dnplkndll wants to merge 1 commit into
Closed
Conversation
This was referenced May 26, 2026
d2d1256 to
ac90863
Compare
add_fields for 12 scalar columns the 19.0 chart_template loader expects on account.tax, account.account, account.move.line, res.company, res.partner. Without these, account.tax.mapped(...) crashes with UndefinedColumn before the l10n_in install step. Stored computed fields get NULL columns; Odoo's _recompute_field populates them after install. l10n_in.pan.entity new-model migration deferred (Category B); FK integer columns to it added here so registry loads.
ac90863 to
a9e906b
Compare
Author
|
Superseded by 19.0-mig-l10n-in: extracted just l10n_in's pre-migration.py + analysis onto a clean origin/19.0 base (this branch carried 236 commits + unrelated module files from an old base). Same migration content, OCA-clean for upstreaming. |
dnplkndll
added a commit
that referenced
this pull request
Jun 2, 2026
Extracted from the green draft #21 (19.0-mig-l10n_in-pre-migration) onto a clean origin/19.0 base — the old branch carried 236 commits + unrelated module files. This is l10n_in only: pre-migration.py + analysis_work + docsource Done.
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.
Draft fork PR — for internal review before upstreaming to OCA/OpenUpgrade.
Adds the missing
pre-migration.pyforl10n_in/19.0.2.0so columns the 19.0 chart_template loader reads exist on the 18.0 source schema. Without this,odoo -u all --load=…openupgrade_frameworkagainst an 18.0 DB withl10n_ininstalled crashes duringaccount.tax.mapped()/account.accountmaterialization.Fields added (12 scalars on 5 tables)
account.account:l10n_in_tcs_feature_enabled,l10n_in_tds_feature_enabled(NEW stored functions)account.move.line:l10n_in_gstr_section(NEW selection)account.tax:l10n_in_is_lut(NEW boolean),l10n_in_tax_type(is now stored)res.company:l10n_in_gstin_status_feature,l10n_in_is_gst_registered,l10n_in_pan_entity_id(FK),l10n_in_tcs_feature,l10n_in_tds_featureres.partner:l10n_in_pan_entity_id(FK),l10n_in_tanStored computed fields get NULL columns; Odoo's
_recompute_fieldmachinery populates them after install (matches the precedent insale/19.0.1.2/pre-migration.py— onlyadd_fields, no inline UPDATE).The
l10n_in.pan.entitynew-model migration is intentionally deferred (Category B in the campaign plan — model-create is more invasive than column-add). The m2o FK integer columns to it are added here so the registry can finish loading; the actual table is created by Odoo'supdate_dbduring thel10n_ininstall step.Verification
End-to-end migrate on the openupgrade-lab against the clean 18.0 prod seed: 179/179 modules loaded, registry loaded in 105s (iter 8). Without this fix, the migration crashed at
account.chart_template.pyduring pre-init.Notes
19.0-fix-pre-migration-columnscampaign (TODO + plan tracked on the fork integration branch).