odoo/odoo#237105

Created by fw-bot
Merged at d73eba8415ce0e6dba72676235d229e6ec08f7ca

Statuses:

label
odoo-dev:master-19.0-project-runbot-error-abgh-478010-fw
head
ddaf20d9347ddc29a981e043bd6259850c16de34
merged
4 months ago by Fun Services, Xavier Bol (xbo)
odoo/odoo
19.0 #236257
saas-19.1
saas-19.2
master #237105

[FIX] project_forecast: fix weeks comparison

Steps to reproduce:
1- install project_forecast
2- run test_creating_a_planning_shift_with_flexible_hours_allocated_hours_are_correct => test fail

Source:
When slots span across multiple years (e.g., 2019 → 2026), https://github.com/odoo/odoo/blob/f8f72b15598576f5870e49879e96fc5c127a6100/addons/resource/models/resource_resource.py#L338 this comparison becomes invalid, it compares week numbers only, ignoring the year. For instance, week 23 of 2019 is considered after week 18 of 2026.

Fix:
compare year and week

Forward-Port-Of: #236257