-
Notifications
You must be signed in to change notification settings - Fork 30.4k
[FIX] l10n_in_hr_holidays: fixed duration of the sandwich leave #234193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
fw-bot
wants to merge
1
commit into
odoo:master
from
odoo-dev:master-18.0-l10n-in-hr-holidays-sandwich-leave-yava-474044-fw
Closed
[FIX] l10n_in_hr_holidays: fixed duration of the sandwich leave #234193
fw-bot
wants to merge
1
commit into
odoo:master
from
odoo-dev:master-18.0-l10n-in-hr-holidays-sandwich-leave-yava-474044-fw
Conversation
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
Contributor
Contributor
Author
|
@yava-odoo @tivisse this PR targets master and is the last of the forward-port chain. To merge the full chain, use
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
Contributor
Author
|
@yava-odoo @tivisse ci/l10n failed on this forward-port PR |
69f2d9e to
da0b68d
Compare
Before this commit, if you created a leave of a type that had sandwich leave
enabled on a non-working day, it would show a negative duration.
This commit fixes some issues related to sandwich leave cases
(where Saturday and Sunday are considered non-working days):
- Friday - Monday across weekend - counted (4 days).
- Hour-based leave types: weekend bridging increases hours accordingly
- Public holiday in the middle (Tue-Thu with Wed PH) - counted (3 days).
- Stop/Start exactly on a public holiday
(Tue-Wed(Public holiday), or Wed(Public holiday)-Thu) - trimmed to 1 day.
- Public holiday only - 0 days.
- Two single-day leaves around a Public holiday
- When the second leave is created, it bridges via a public holiday (2 days),
- The first one remains 1 day if it stands alone
- Mixed leave types:
- If the linked leave type doesn’t have sandwich enabled, no sandwich rules.
- If both leave enable sandwich (with different types) - sandwich rule applies
- Refusing/canceling a linked leave must immediately adjust the other
side’s duration (e.g., Monday refused - Friday drops from 3 - 1 day)
Task-4430044
X-original-commit: 7f7ca3c
Co-authored-by: mepe-odoo <[email protected]>
da0b68d to
e4dd001
Compare
Contributor
|
@robodoo r+ |
robodoo
pushed a commit
that referenced
this pull request
Nov 5, 2025
Before this commit, if you created a leave of a type that had sandwich leave
enabled on a non-working day, it would show a negative duration.
This commit fixes some issues related to sandwich leave cases
(where Saturday and Sunday are considered non-working days):
- Friday - Monday across weekend - counted (4 days).
- Hour-based leave types: weekend bridging increases hours accordingly
- Public holiday in the middle (Tue-Thu with Wed PH) - counted (3 days).
- Stop/Start exactly on a public holiday
(Tue-Wed(Public holiday), or Wed(Public holiday)-Thu) - trimmed to 1 day.
- Public holiday only - 0 days.
- Two single-day leaves around a Public holiday
- When the second leave is created, it bridges via a public holiday (2 days),
- The first one remains 1 day if it stands alone
- Mixed leave types:
- If the linked leave type doesn’t have sandwich enabled, no sandwich rules.
- If both leave enable sandwich (with different types) - sandwich rule applies
- Refusing/canceling a linked leave must immediately adjust the other
side’s duration (e.g., Monday refused - Friday drops from 3 - 1 day)
Task-4430044
closes #234193
X-original-commit: 7f7ca3c
Signed-off-by: Yannick Tivisse (yti) <[email protected]>
Signed-off-by: Yash Vaishnav (yava) <[email protected]>
Co-authored-by: mepe-odoo <[email protected]>
robodoo
pushed a commit
that referenced
this pull request
Nov 5, 2025
Before this commit, if you created a leave of a type that had sandwich leave
enabled on a non-working day, it would show a negative duration.
This commit fixes some issues related to sandwich leave cases
(where Saturday and Sunday are considered non-working days):
- Friday - Monday across weekend - counted (4 days).
- Hour-based leave types: weekend bridging increases hours accordingly
- Public holiday in the middle (Tue-Thu with Wed PH) - counted (3 days).
- Stop/Start exactly on a public holiday
(Tue-Wed(Public holiday), or Wed(Public holiday)-Thu) - trimmed to 1 day.
- Public holiday only - 0 days.
- Two single-day leaves around a Public holiday
- When the second leave is created, it bridges via a public holiday (2 days),
- The first one remains 1 day if it stands alone
- Mixed leave types:
- If the linked leave type doesn’t have sandwich enabled, no sandwich rules.
- If both leave enable sandwich (with different types) - sandwich rule applies
- Refusing/canceling a linked leave must immediately adjust the other
side’s duration (e.g., Monday refused - Friday drops from 3 - 1 day)
Task-4430044
closes #234193
X-original-commit: 7f7ca3c
Signed-off-by: Yannick Tivisse (yti) <[email protected]>
Signed-off-by: Yash Vaishnav (yava) <[email protected]>
Co-authored-by: mepe-odoo <[email protected]>
erga-odoo
pushed a commit
to erga-odoo/odoo
that referenced
this pull request
Nov 14, 2025
Before this commit, if you created a leave of a type that had sandwich leave
enabled on a non-working day, it would show a negative duration.
This commit fixes some issues related to sandwich leave cases
(where Saturday and Sunday are considered non-working days):
- Friday - Monday across weekend - counted (4 days).
- Hour-based leave types: weekend bridging increases hours accordingly
- Public holiday in the middle (Tue-Thu with Wed PH) - counted (3 days).
- Stop/Start exactly on a public holiday
(Tue-Wed(Public holiday), or Wed(Public holiday)-Thu) - trimmed to 1 day.
- Public holiday only - 0 days.
- Two single-day leaves around a Public holiday
- When the second leave is created, it bridges via a public holiday (2 days),
- The first one remains 1 day if it stands alone
- Mixed leave types:
- If the linked leave type doesn’t have sandwich enabled, no sandwich rules.
- If both leave enable sandwich (with different types) - sandwich rule applies
- Refusing/canceling a linked leave must immediately adjust the other
side’s duration (e.g., Monday refused - Friday drops from 3 - 1 day)
Task-4430044
closes odoo#234193
X-original-commit: 7f7ca3c
Signed-off-by: Yannick Tivisse (yti) <[email protected]>
Signed-off-by: Yash Vaishnav (yava) <[email protected]>
Co-authored-by: mepe-odoo <[email protected]>
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.

Before this PR, if you created a leave of a type that had sandwich leave
enabled on a non-working day, it would show a negative duration.
This PR fixes some issues related to sandwich leave cases
(where Saturday and Sunday are considered non-working days):
(e.g., Monday refused - Friday drops from 3 - 1 day)
Task-4430044
Co-authored-by: @mepe-odoo
Forward-Port-Of: #233817
Forward-Port-Of: #193186