odoo/odoo#192640
Created by Fun HR, Yash Vaishnav (yava)
Blocked
- Merge method
- Review
-
CI
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 25s)
- label
- odoo-dev:master-l10n-in-hr-work-entry-holidays-yava
- head
- bb5434ee3c9b44d9595738834d5dd1e01a8e237c
| odoo/odoo | |
|---|---|
| master | #192640 missing statuses missing r+ |
[ADD] l10n_in_hr_work_entry_holidays: create work entries for sandwich leaves
In this PR,
we addressed several issues related to the management of leave durations:
-
A bug was fixed that incorrectly counted the duration of leave taken on non-working days, such as Saturdays and Sundays, which previously resulted in a duration of -2 days. This has now been resolved.
-
When creating a leave request that overlaps with non-working days or public holidays, this commit ensures that non-working days are included in the leave calculation.
There are several scenarios to consider:
1) When creating leave that covers non-working days, a work entry will be generated for those days, starting from the next working day. The duration will be based on the average duration of the working schedule.
2) If leave is created that falls within a public holiday period, the work entry type for those public holidays will be updated to reflect the leave's work entry type.
3) If you create individual leaves around non-working days or public holidays, this will also fall under sandwich leave rules.
Accordingly, work entry will be generated.