Thursday, April 27, 2023
1 change · master
New functionality added to Odoo
Adds French-specific time off rules so part-time employees' leave is counted against the company working calendar, aligning totals with local requirements. It also adjusts related work entries so payroll and absence records reflect those French leave calculations correctly.
Original PR description
original PR : https://github.com/odoo/odoo/pull/76097 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…
original PR : https://github.com/odoo/odoo/pull/76097 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. Both modules will be automatically installed when installing hr_holidays if the company is located in France. OTHER: Fixes a redundant call to super function in hr.leave._get_number_of_days, improving its performance a bit