odoo/enterprise#82274

Created by fw-bot
Merged at fa802819003a6a31055c63140638e222c4510934

Statuses:

Linked pull requests
label
odoo-dev:saas-18.2-18.0-fix-planning-handle-flexible-leave-in-gantt-duch-424600-fw
head
cb90566a9da44c00eafddfc15f68aaa9408b0d5f
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: #81899
Forward-Port-Of: #79532