Skip to content

[18.0][FIX] hr_shift: Replace calendar attendances by date#31

Merged
OCA-git-bot merged 1 commit intoOCA:18.0from
Tecnativa:18.0-fix-hr_shift-midnight
Feb 19, 2026
Merged

[18.0][FIX] hr_shift: Replace calendar attendances by date#31
OCA-git-bot merged 1 commit intoOCA:18.0from
Tecnativa:18.0-fix-hr_shift-midnight

Conversation

@pedrobaeza
Copy link
Member

Forward-port of #28

This module replaces theoretical calendar attendances by the shift ones in a conservative way, only removing those that belong to the exact shift. That way, if no shift is specified, the usual calendar will apply.

But when the shift is at or around midnight, there can be 2 dates involved, the starting day, and the ending day. If the calendar assigned to the employee has attendance entries in both of them, the replacing of them won't be correct.

Thus, we should remove all the attendances entries belonging to any of the days of the shift, no matter the hours.

@Tecnativa TT61053

This module replaces theoretical calendar attendances by the shift ones
in a conservative way, only removing those that belong to the exact
shift. That way, if no shift is specified, the usual calendar will
apply.

But when the shift is at or around midnight, there can be 2 dates
involved, the starting day, and the ending day. If the calendar assigned
to the employee has attendance entries in both of them, the replacing
of them won't be correct.

Thus, we should remove all the attendances entries belonging to any of
the days of the shift, no matter the hours.

TT61053
@pedrobaeza pedrobaeza added this to the 18.0 milestone Feb 19, 2026
@pedrobaeza
Copy link
Member Author

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-31-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit a87815d into OCA:18.0 Feb 19, 2026
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 7878c28. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 18.0-fix-hr_shift-midnight branch February 19, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants