Repository navigation
Conversation
Assisted-by: Claude Opus 5
dnplkndll
force-pushed
the
20.0-mig-hr_holidays
branch
from
September 24, 2026 00:06
ad45d91 to
e8fc0d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hr.leave.typeis gone in 20.0:hr_holidaysnow_inheritshr.work.entry.typeand declares the leave settings on it. Both modelsexisted in 19.0, so this is a merge and not a rename — it must not go in
apriori.renamed_models, which would have the analysis report the two as onerecord.
The upgrade leaves the 76
hr_leave_typerows orphaned with their xml_idsalready deleted, and
hr.leave/hr.leave.allocationstill pointing at themthrough the
holiday_status_idthey no longer use. 20.0 declares thereplacement
work_entry_type_idrequired, so the upgrade reports it cannot addthe constraint and carries on with every leave and allocation unlinked from
its type.
Which work entry type stands in for each leave type
19.0's
hr.leave.typealready carried awork_entry_type_id— the pairing theadministrator configured — so it is honoured where unambiguous. On the seed:
20.0 has one record where 19.0 had two, so two leave types sharing one cannot
both keep it; whatever differs between them would have to be discarded. Giving
up the pairing loses less than giving up the leave type.
Fields with no counterpart
count_asandunit_of_measureare required on a work entry type and nameddifferently on a leave type, so they are mapped:
time_typeleave→absenceand
other→working_time(the same two labels),request_unithour→hourand both day units→
day, 20.0 having no half day for allocation. Both are setonly on records created here — a reused work entry type already carries them
from its work entry side, where they drive payroll.
codeis the payroll reference and has no counterpart at all. A leave type thatshared a work entry type takes that one's code, being the code its time off was
actually paid under; one that had none gets a traceable placeholder and is
counted in a message, because nothing else would say so.
Not
merge_models: by then nothing refers tohr.leave.typeby name — themodel is absent from the 20.0 registry, so Odoo has already removed its
ir_modelrow and all nine dependent tables hold zero such rows — and callingit fails rather than doing nothing.
Tested
openupgrade_scripts/scripts/hr_holidays/tests/covers the three cases themerge has to tell apart plus the mappings. 7 methods, run on the 585-module
seed; they caught
is_leavebeing set, which is a 19.0 field 20.0 drops.Draft until fork CI is green on this branch alone. Depends on #119 for the rest
of the analysis sweep.
AI-assisted (Claude Code); every change reviewed, tested, and owned by the author.
CI: red by construction until #118 lands
The
testjob fails onduplicate key value violates unique constraint "res_country_state_name_code_uniq"(Ladakh / Odisha). That is not this branch:base's pre-migration, which renamesbase.state_in_or→base.state_in_odand
l10n_in.state_in_la→base.state_in_la, lives in #118 and is not on20.0yet. Every branch cut from20.0alone hits it, which is why #117 is redfor the same reason.
Per the fork's model the per-PR
testcheck is the lean one; the real migrationgate is the integration branch (#120), where this module's scripts run green as
part of the full 585-module seed.