Module
project_timesheet_time_control
Describe the bug
When creating a timesheet line on a date outside of the current weekly sheet range, the line is not linked to any hr.timesheet.sheet.
If you later change the date of that line to fall inside the valid sheet range, the sheet_id is not recomputed correctly. As a result, the totals of the sheet are not updated.
To Reproduce
Affected versions:
Create a weekly sheet for week 39 (2025-09-22 → 2025-09-28).
Add a timesheet line with date 2025-09-29 (outside the range).
Save — the line is not linked to any sheet.
Change the date of the same line to 2025-09-28 (inside the range).
Observe that the line still has no sheet_id, and the totals of the sheet remain unchanged.
Expected behavior
When the date (or employee/company) of a line changes, the system should recompute sheet_id and link the line to the correct sheet.