Skip to content

Conversation

@fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Nov 3, 2025

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):

  • 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

Co-authored-by: @mepe-odoo

Forward-Port-Of: #233817
Forward-Port-Of: #193186

@robodoo
Copy link
Contributor

robodoo commented Nov 3, 2025

Pull request status dashboard

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Nov 3, 2025
@fw-bot
Copy link
Contributor Author

fw-bot commented Nov 3, 2025

@yava-odoo @tivisse this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@fw-bot
Copy link
Contributor Author

fw-bot commented Nov 3, 2025

@yava-odoo @tivisse ci/l10n failed on this forward-port PR

@yava-odoo yava-odoo force-pushed the master-18.0-l10n-in-hr-holidays-sandwich-leave-yava-474044-fw branch from 69f2d9e to da0b68d Compare November 4, 2025 04:59
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]>
@yava-odoo yava-odoo force-pushed the master-18.0-l10n-in-hr-holidays-sandwich-leave-yava-474044-fw branch from da0b68d to e4dd001 Compare November 4, 2025 12:55
@yava-odoo
Copy link
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]>
@robodoo robodoo added the 19.1 label Nov 5, 2025
@robodoo robodoo closed this Nov 5, 2025
@fw-bot fw-bot deleted the master-18.0-l10n-in-hr-holidays-sandwich-leave-yava-474044-fw branch November 12, 2025 09:06
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

Labels

19.1 forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants