[15.0][FIX] hr_shift: Prevent TypeError#23
Merged
OCA-git-bot merged 1 commit intoOCA:15.0from Jan 21, 2026
Merged
Conversation
b0f352e to
a773d5d
Compare
Use case example: - Create an hr.shift.planning.line record with a start time of 00:00:00 and an end time of 08:00:00 - The employee must have a work schedule after 08:00:00 (for example, starting at 13:00:00) - The report from the hr_attendance_report_theoretical_time module is used. The hr_shift methods will mix records and cause an error. TypeError: cannot union different models: 'hr.shift.planning.line()' and 'resource.calendar.attendance()' TT60298
a773d5d to
c484930
Compare
carlos-lopez-tecnativa
approved these changes
Jan 21, 2026
Contributor
|
What a great day to merge this nice PR. Let's do it! |
Contributor
|
Congratulations, your PR was merged at b75f867. Thanks a lot for contributing to OCA. ❤️ |
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.
Prevent TypeError
Use case example:
hr.shift.planning.linerecord with a start time of 00:00:00 and an end time of 08:00:00hr_attendance_report_theoretical_timemodule is used. Thehr_shiftmethods will mix records and cause an error.TypeError: cannot union different models: 'hr.shift.planning.line()' and 'resource.calendar.attendance()'Please @pedrobaeza and @carlos-lopez-tecnativa can you review it?
@Tecnativa TT60298