Skip to content

[19.0][MIG] l10n_my_edi: model move from pos + account.move MyInvois data#97

Open
dnplkndll wants to merge 2 commits into
19.0from
19.0-mig-l10n-my-edi
Open

[19.0][MIG] l10n_my_edi: model move from pos + account.move MyInvois data#97
dnplkndll wants to merge 2 commits into
19.0from
19.0-mig-l10n-my-edi

Conversation

@dnplkndll

@dnplkndll dnplkndll commented May 30, 2026

Copy link
Copy Markdown

Companion to #89, with an m2m link. The myinvois.document model (+ 2 transient wizards) moves out of l10n_my_edi_pos; 18.0 invoice MyInvois EDI state lived on account.move, 19.0 it lives on myinvois.document rows linked via myinvois_document_invoice_rel.

  • update_module_moved_models + 4 xmlid renames from l10n_my_edi_pos.
  • pre-migration preserves the account.move MyInvois columns (filtered by column_existsl10n_my_edi_file is attachment-backed, no column); post-migration inserts one myinvois.document per move (company_id/currency_id from the move, state copied 1:1), fills the m2m via a scratch column, and re-points the file's ir_attachment.

Lab-validated end-to-end: fresh 18.0 DB + synthetic MyInvois data + full -u all migration (rc=0); myinvois.document row created (state=valid, uuid, submission) with the m2m link to the source invoice. The fixture caught a real bug first — rename_columns on the attachment-backed l10n_my_edi_file (no column) — now fixed.

@dnplkndll dnplkndll force-pushed the 19.0-mig-l10n-my-edi branch from c387cc2 to 049a5f2 Compare May 30, 2026 19:21
@dnplkndll dnplkndll marked this pull request as ready for review May 30, 2026 19:22
@dnplkndll dnplkndll force-pushed the 19.0-mig-l10n-my-edi branch 2 times, most recently from 13acddd to 2e1bd15 Compare June 5, 2026 19:54
@dnplkndll dnplkndll force-pushed the 19.0-mig-l10n-my-edi branch 3 times, most recently from 9b63b20 to 2ab13a8 Compare June 17, 2026 12:44
- update_module_moved_models for myinvois.document + 2 transient wizards
  (l10n_my_edi_pos -> l10n_my_edi); 4 xmlids renamed from l10n_my_edi_pos.
- pre-migration preserves the existing account.move MyInvois columns as legacy
  (filtered by column_exists -- l10n_my_edi_file is attachment-backed, no
  column); post-migration inserts one myinvois.document per move with non-NULL
  data (company_id/currency_id from the move, state copied 1:1), links via the
  myinvois_document_invoice_rel m2m, and re-points the file ir_attachment.
- Lab-validated: migration rc=0; myinvois.document row + m2m link created
  with the expected data.
- myinvois_issuance_date filled from the invoice so the sequence-mixin
  ordering works, and name computed for the SQL-inserted rows (scoped to
  NULL names so rows riding the model move keep their sequence).
- l10n_my_edi_invoice_long_id preserved and mapped to
  myinvois_document_long_id (the portal link id was dropped).
- company MSIC classification copied to its partner: the new stored
  partner compute defaults everyone to class_00000, silently resetting
  configured codes in MyInvois submissions.
@dnplkndll dnplkndll force-pushed the 19.0-mig-l10n-my-edi branch from 2ab13a8 to 4099ad2 Compare June 19, 2026 11:59
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