[OU-ADD] l10n_in_ewaybill: model move + credentials rename + account.move data conversion#36
Draft
dnplkndll wants to merge 1 commit into
Draft
[OU-ADD] l10n_in_ewaybill: model move + credentials rename + account.move data conversion#36dnplkndll wants to merge 1 commit into
dnplkndll wants to merge 1 commit into
Conversation
dnplkndll
added a commit
that referenced
this pull request
May 26, 2026
…s from account.move ewaybill data (Done) Completes the migration that #36 left Partial. The 8 ewaybill fields that lived on account.move in 18.0 (l10n_in_distance, _mode, _transportation_doc_date, _transportation_doc_no, _transporter_id, _type_id, _vehicle_no, _vehicle_type) are now preserved in pre-migration and replayed into l10n.in.ewaybill rows in post-migration. Pre-migration adds: - rename_columns on the 8 account.move columns → openupgrade_legacy_19_0_* so Odoo's update_db doesn't drop them before post-migration runs. Post-migration: - For each account.move with non-NULL legacy ewaybill data, INSERT one l10n.in.ewaybill row. account_move_id wires the link; the 8 fields copy across directly into the new model's same-named columns. - state='pending' (the 19.0 default) — the 18.0 schema didn't track ewaybill-API status separately, so the operator re-fetches from the e-Waybill gov portal after migration if reconciliation is needed. - The 18.0 mode key '0' is dropped in 19.0; coerced to NULL on insert (operator marks the row after the fact). All other selection keys ('1'..'4', 'O'/'R') overlap cleanly. docsource flips from 'Partial' to 'Done'.
856a545 to
d42f7ac
Compare
…move data conversion l10n_in_ewaybill 19.0 absorbs from two 18.0 modules: l10n_in_edi_ewaybill (handled by apriori.renamed_modules) and the l10n.in.ewaybill model moving out of l10n_in_ewaybill_stock (which keeps its name). Pre-migration: - update_module_moved_models x 2 (l10n.in.ewaybill + .cancel). - rename_xmlids x 6 (action, report, 2 access, ir.rule, paperformat from stock). - rename_fields x 3 res.company credentials (drop the '_edi_' segment). - rename_columns x 8 account.move ewaybill columns -> legacy names so post-migration can replay them. Post-migration: INSERT one l10n.in.ewaybill row per account.move with non-NULL legacy data, state='pending'. mode='0' coerced to NULL (18.0 key dropped in 19.0).
d42f7ac to
926c0c8
Compare
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.
l10n_in_ewaybill 19.0 absorbs functionality from two 18.0 modules:
l10n_in_edi_ewaybillis in apriori.renamed_modules — base's pre-migration runsupdate_module_namesso ir_module_module + ir_model_data references rewrite automatically.l10n_in_ewaybill_stockkeeps its name but thel10n.in.ewaybill+l10n.in.ewaybill.cancelmodels MOVE OUT tol10n_in_ewaybill. Table name unchanged; model ownership transfers viaupdate_module_moved_models.Pre-migration
update_module_moved_models× 2 (l10n.in.ewaybill + .cancel).rename_xmlids× 6 (action, report, 2 access rules, ir.rule, paperformat moving from stock).rename_fields× 3 res.company credentials columns (drop the_edi_segment from the prefix).rename_columns× 8 on account.move (preserve asopenupgrade_legacy_19_0_*so the columns surviveupdate_db).Post-migration
For each account.move with non-NULL legacy ewaybill data, INSERT one
l10n.in.ewaybillrow capturing the 8 transport fields.account_move_idwires the link.state='pending'(the 19.0 default). The 18.0 schema didn't track ewaybill-API status separately, so the operator re-fetches from the gov portal after migration if reconciliation is needed.modekey'0'is dropped in 19.0; coerced to NULL on insert. All other selection keys ('1'..'4','O'/'R') overlap cleanly.docsource status set to
Done. Verified end-to-end on the openupgrade-lab clean 18.0 prod seed (the seed doesn't ship the ewaybill modules so the new code runs as a no-op — both the pre's column rename and the post's INSERT trigger on empty result sets safely).Draft fork PR — for review before upstreaming to OCA/OpenUpgrade.