Wednesday, February 2, 2022
1 change · master
New functionality added to Odoo
Adds French-specific time off handling so leave is counted against the company calendar even when an employee works a different schedule. This helps ensure consistent payroll and work entry calculations for French employees, including part-time schedules or calendars with non-working gaps.
Original PR description
l10n_fr_hr_holidays: Adds a new module for french time off. This module contains the time off logic for France. In France, when taking a time off using a different calendar from the company's…
l10n_fr_hr_holidays: Adds a new module for french time off. This module contains the time off logic for France. In France, when taking a time off using a different calendar from the company's calendar you have to count the days as if you were taking time off in the company calendar. For example let's say you have an employee working only monday through wednesday, if that employee were to take a time off ending with wednesday afternoon, the time off would count up until friday (if the company calendar if monday->friday), so that a whole week is always 5 days regardless of the employee calendar. This is also the case for 'holes' in the employee calendar, for example a calendar where one would work monday, wednesday and friday only. l10n_fr_work_entry_holidays: By default time off only generate work entries for intersections between time off and attendance period, so that when taking a time off for a whole month you wouldn't get work entries on the weekend if you normally don't work that day. But since l10n_fr_hr_holidays computes the number of days it would normally cost with french rules. We also have to make sure that the work entries are generated appropriately. Essentially this modules adds the logic required to fill the holes needed using the company calendar instead of the employee one. OTHER: Fixes a redundant call to super function in `hr.leave`.`_get_number_of_days`, improving its performance a bit