Repository navigation
Conversation
### post-migration.py Carry whether extra hours need approving into 20.0's wider question. 19.0 asked no_validation or by_manager. 20.0 asks no_validation, manual_validation or tolerance_validation, under a new name and so in a new column that takes the default. A company that required a manager to approve extra hours therefore comes out approving them automatically, and nothing says so: the setting is not shown as empty, it is shown as the other answer. Only by_manager is written. no_validation is already what the default gives, and tolerance_validation is 20.0's new middle ground, which no 19.0 database can have chosen. Assisted-by: Claude Opus 5
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.
post-migration.py
Carry whether extra hours need approving into 20.0's wider question.
19.0 asked no_validation or by_manager. 20.0 asks no_validation,
manual_validation or tolerance_validation, under a new name and so in a new
column that takes the default. A company that required a manager to approve
extra hours therefore comes out approving them automatically, and nothing
says so: the setting is not shown as empty, it is shown as the other answer.
Only by_manager is written. no_validation is already what the default gives,
and tolerance_validation is 20.0's new middle ground, which no 19.0 database
can have chosen.
tests
A migration test pins the rules above against data constructed on 19.0 before the upgrade runs:
openupgrade_scripts/scripts/hr_attendance/tests/data_hr_attendance_migration.pyopenupgrade_scripts/scripts/hr_attendance/tests/test_hr_attendance_migration.pyCI: red until #118 lands
The
testjob fails onduplicate 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 andis not on
20.0yet, so every branch cut from20.0alone hits it. Per thefork'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.