odoo/odoo#236257
Created by Fun Services, Abderraouf Ghrissi (abgh)
Merged
at 6e3b3ba0302632120400886d41b3526458d2e6e0
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:19.0-project-runbot-error-abgh
- head
- 3d2c7146859082faf3168b414320589f319dcdf2
- merged
- 5 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