- remove unused _round_to_nearest_half
- evaluate _l10n_fr_leave_applies once in _get_number_of_days_batch and
count working dates without a day-by-day loop
- compute the calendar working hours once per date lookup loop
- move pytz import to the top of resource_calendar.py
No functional change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the next scheduled working day of a part-time employee after the
leave is a public holiday, the leave end date was not postponed to the
day before the actual return, so company working days in between were
not counted (e.g. Wed PM-Fri employee, leave 23/12 -> 31/12 with 01/01
being a Friday: 6 days counted instead of 9).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Odoo displays allocation hours with the hours per day of the employee's
resource calendar. Converting recovery hours with another calendar (planning
calendar or company calendar) made the generated allocation display a wrong
number of hours (e.g. 18.21h instead of 19h).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:35:27 +01:00
2 changed files with 42 additions and 14 deletions
self.assertEqual(len(recovery_allocation),1,"Il doit y avoir une allocation de récupération générée")
self.assertEqual(recovery_allocation.number_of_days,1.25,"The recovery allocation should be 1,25 days")
self.assertAlmostEqual(recovery_allocation.number_of_hours_display,8.75,msg="The recovery allocation should display 8.75 hours")
@tagged("post_install","-at_install")
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.