Skip to content

[20.0][OU-ADD] l10n_fr_hr_holidays: migration scripts - #128

Draft
dnplkndll wants to merge 1 commit into
20.0from
20.0-mig-l10n_fr_hr_holidays
Draft

dnplkndll wants to merge 1 commit into
20.0from
20.0-mig-l10n_fr_hr_holidays

Conversation

@dnplkndll

Copy link
Copy Markdown

post-migration.py

Point the French reference leave type at its 20.0 stand-in.

res.company.l10n_fr_reference_leave_type referenced hr.leave.type, which
20.0 folds into hr.work.entry.type; the replacement is
l10n_fr_reference_work_entry_type.

This lives here rather than with the rest of that fold in hr_holidays
because of load order: hr_holidays runs at module 234 of 563 and
l10n_fr_hr_holidays at 361, so when hr_holidays' post-migration runs the new
column does not exist yet. Its column_exists guard skipped the update
silently -- no error, no value, and the company's reference type quietly
lost. Doing it from the module that owns the column removes the ordering
question entirely.


CI: red until #118 lands

The test job fails on duplicate key value violates unique constraint "res_country_state_name_code_uniq" (Ladakh / Odisha). Not this branch:
base's pre-migration, which renames those two external ids, lives in #118 and
is not on 20.0 yet, so every branch cut from 20.0 alone hits it. Per the
fork's model the per-PR check is the lean one; the real migration gate is the
integration branch (#120), where all of this runs green over the full
585-module seed.

AI-assisted (Claude Code); every change reviewed, tested, and owned by the author.

### post-migration.py

Point the French reference leave type at its 20.0 stand-in.

res.company.l10n_fr_reference_leave_type referenced hr.leave.type, which
20.0 folds into hr.work.entry.type; the replacement is
l10n_fr_reference_work_entry_type.

This lives here rather than with the rest of that fold in hr_holidays
because of load order: hr_holidays runs at module 234 of 563 and
l10n_fr_hr_holidays at 361, so when hr_holidays' post-migration runs the new
column does not exist yet. Its column_exists guard skipped the update
silently -- no error, no value, and the company's reference type quietly
lost. Doing it from the module that owns the column removes the ordering
question entirely.

Assisted-by: Claude Opus 5
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