Skip to content

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

Open
dnplkndll wants to merge 1 commit 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 1 commit into
19.0from
19.0-mig-l10n-my-edi

Conversation

@dnplkndll
Copy link
Copy Markdown

@dnplkndll dnplkndll commented May 30, 2026

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.

- 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.
@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
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