odoo/enterprise#82377

Created by fw-bot
Merged at 1855903b794bde6ab05600aefbdab5dd1b8fdba6

Statuses:

Linked pull requests
label
odoo-dev:master-18.0-fix-planning-handle-flexible-leave-in-gantt-duch-425836-fw
head
1c5baaf7a96420c8e54971e5b1dc9e9cb4168f8a
merged
7 months ago by Fun Services, Xavier Bol (xbo)
odoo/odoo odoo/enterprise
18.0 #198032 #79532
saas-18.1 #202849 #81899
saas-18.2 #203617 #82274
saas-18.3
saas-18.4
19.0
master #203826 #82377

[FW][FIX] planning, planning_holidays: fix flexible resource leave in pla…

…nning gantt

Prior to this commit, flexible resources did not have their leaves reflected as gray cells in the planning gantt view. This was due to the work_intervals being ignored for the calculation of flexible resources availability.

This commit adds measures to handle the leaves for flexible resources by setting a dummy attendance (which covers the whole length of the period in gantt interval), and then injects their leaves intervals.

To replicate:
1. set timeoffs to a flexible resource (whole day and half day)
2. open planning app
3. in the gantt view, the day in which the timeoff was set for a whole day should be fully grayed (in the default month granularity view)
4. when selecting only a day as the granularity of the gantt view, the day in which the timeoff was set for a half day should be half grayed. (from 00:00-12:00 in case of a morning timeoff, and from 12:00-24:00 in case of an afternoon timeoff)

ticket-id: 4492625
community: 198032

Forward-Port-Of: #82274
Forward-Port-Of: #79532