Skip to content

[17.0][FIX] ptplus_partner: guard the 17.0 column rename with column_exists - #4

Closed
eantones wants to merge 5 commits into
17.0from
17.0-fix-ptplus_partner-migration_guards
Closed

[17.0][FIX] ptplus_partner: guard the 17.0 column rename with column_exists#4
eantones wants to merge 5 commits into
17.0from
17.0-fix-ptplus_partner-migration_guards

Conversation

@eantones

Copy link
Copy Markdown
Member

The 17.0.4.0.2 pre-migration renames res_partner.legal_name behind a registry-membership check only (inverted relative to when the rename is safe: at ptplus_partner's own pre-migration nothing defines l10n_pt_legal_name yet, so the guard always fires). On databases where the target column already exists, rename_fields dies with DuplicateColumn and kills the whole upgrade.

Add a column_exists guard so the rename only runs when the target column is still absent. Same fix as the 16.0 scripts (PR #3).

Replaces the aggregate-time sed previously carried in our deployment config — policy: every code change is a published PR, never an aggregate-time mutation. To be reported to the vendor (Exo) as well.

Note: the vendor mirror is bot-published with force-pushed orphan snapshots per release — when exo 17.0 head moves past 400562b, rebase this branch onto the new snapshot (rebase operativa).

joaoc-exo and others added 5 commits February 25, 2026 18:36
The 17.0.4.0.2 pre-migration renames res_partner.legal_name behind a
registry-membership check only (and the check is inverted relative to
when the rename is safe: at ptplus_partner's own pre-migration nothing
defines l10n_pt_legal_name yet, so the guard always fires). On databases
where the target column already exists, rename_fields dies with
DuplicateColumn and kills the whole upgrade.

Add a column_exists guard so the rename only runs when the target column
is still absent, and use the 'not in' comparison form. Same fix as the
16.0 scripts (16.0.4.0.1/16.0.4.0.2).
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.

2 participants