Skip to content

[OU-ADD] l10n_in: pre-migration for NEW/stored fields#21

Closed
dnplkndll wants to merge 1 commit into
19.0from
19.0-mig-l10n_in-pre-migration
Closed

[OU-ADD] l10n_in: pre-migration for NEW/stored fields#21
dnplkndll wants to merge 1 commit into
19.0from
19.0-mig-l10n_in-pre-migration

Conversation

@dnplkndll
Copy link
Copy Markdown

Draft fork PR — for internal review before upstreaming to OCA/OpenUpgrade.

Adds the missing pre-migration.py for l10n_in/19.0.2.0 so columns the 19.0 chart_template loader reads exist on the 18.0 source schema. Without this, odoo -u all --load=…openupgrade_framework against an 18.0 DB with l10n_in installed crashes during account.tax.mapped() / account.account materialization.

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_feature
  • res.partner: l10n_in_pan_entity_id (FK), l10n_in_tan

Stored computed fields get NULL columns; Odoo's _recompute_field machinery populates them after install (matches the precedent in sale/19.0.1.2/pre-migration.py — only add_fields, no inline UPDATE).

The l10n_in.pan.entity new-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's update_db during the l10n_in install 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.py during pre-init.

Notes

  • Part of the broader 19.0-fix-pre-migration-columns campaign (TODO + plan tracked on the fork integration branch).
  • Companion fork PRs filed in sequence: l10n_us (preserve aba_routing), l10n_us_account (annotation only).

@dnplkndll dnplkndll changed the title [19.0][OU-ADD] l10n_in: pre-migration.py for NEW/stored 19.0 fields [OU-ADD] l10n_in: pre-migration for NEW/stored fields May 26, 2026
@dnplkndll dnplkndll force-pushed the 19.0-mig-l10n_in-pre-migration branch from d2d1256 to ac90863 Compare May 26, 2026 16:53
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.
@dnplkndll dnplkndll force-pushed the 19.0-mig-l10n_in-pre-migration branch from ac90863 to a9e906b Compare May 26, 2026 17:02
@dnplkndll
Copy link
Copy Markdown
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 dnplkndll closed this May 30, 2026
@dnplkndll dnplkndll deleted the 19.0-mig-l10n_in-pre-migration branch May 30, 2026 13:59
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant