Skip to content

[18.0][OU-ADD] ptplus_edi: retire legacy CIUS-PT edi format xmlid before the orphan GC#21

Open
eantones wants to merge 1 commit into
18.0from
18.0-ou-add-ptplus_edi
Open

[18.0][OU-ADD] ptplus_edi: retire legacy CIUS-PT edi format xmlid before the orphan GC#21
eantones wants to merge 1 commit into
18.0from
18.0-ou-add-ptplus_edi

Conversation

@eantones

@eantones eantones commented Jul 17, 2026

Copy link
Copy Markdown
Member

What

ptplus_edi 18.0.2.0.0 (vendor rebuild on account.move.send) stops declaring the legacy account_edi framework record account.edi.format cius_pt_211. base's _process_end orphan cleanup (inside -u all) then fires DELETE FROM account_edi_format WHERE id IN (…), FK-RESTRICT-blocked by historical account_edi_document rows and the journal m2m → a benign but RED-flagged bad query on every fresh run.

Why not the hop-close SQL surrogate

The previous fix (instance versions/18/hop/post.sql deleting the ir_model_data row) runs after -u all — it can only prevent the second firing. On any re-run from a fresh production dump the row is back and the bad query fires again. Superseded by this script.

How

Same minimal-retirement treatment as ptplus's PT-RF CD tax tags at 16.0 (#20), in the module's own namespace, in pre-migration (before the GC):

  • referencedness = row existence across every FK of account_edi_format from pg_constraint (immune to ON DELETE CASCADE masking);
  • referenced → ir_model_data.module = '__ptplus_legacy__' + noupdate (row, links and provenance survive; the GC no longer owns it);
  • unreferenced → left to the GC to delete cleanly.

Vendor namespace (packaged module, cannot carry its own fix) → local-only, never for OCA upstream.

@eantones eantones added the local-only Contains commits that stay in this repo forever (customer-private modules, local policy). label Jul 17, 2026
…ore the orphan GC

The vendor's 18.0 rebuild on account.move.send stops declaring
account.edi.format cius_pt_211; _process_end's DELETE is FK-blocked by
historical account_edi_document rows + the journal m2m (benign 'bad query'
on every fresh run, unfixable from hop-close SQL). Minimal retirement in
the module's own namespace, before the GC — same treatment as ptplus's
PT-RF CD tags at 16.0 (PR#20).
@eantones
eantones force-pushed the 18.0-ou-add-ptplus_edi branch from 40d119c to 2e08c34 Compare July 20, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

local-only Contains commits that stay in this repo forever (customer-private modules, local policy).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant