You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we add a line to a sheet wich contains a time off line, we have an Error: You cannot modify timesheets that are linked to time off requests. Please use the Time Off application to modify your time off requests instead
Some mechanisms has been introduced to avoid holidays modifications from other places than holidays app:
The problem is, when we add a new line on a sheet, all related account analytic line records are updated, even the ones already have the good sheet_id defined, because of:
Module
hr_timesheet_sheet
Describe the bug
When we add a line to a sheet wich contains a time off line, we have an Error:
You cannot modify timesheets that are linked to time off requests. Please use the Time Off application to modify your time off requests instead
Some mechanisms has been introduced to avoid holidays modifications from other places than holidays app:
https://github.com/odoo/odoo/blob/c226098a20e9d70090bc9ae6b4c2b82483ae0f4b/addons/project_timesheet_holidays/models/account_analytic.py#L31-L37
You can see here the changes made to be able to bypass this:
odoo/odoo#120597
By the way, I think the useful solution was the first proposal, but...
A change in hr_timesheet_sheet to get it working is here:
timesheet/hr_timesheet_sheet/models/account_analytic_line.py
Lines 138 to 139 in aaf0b28
The problem is, when we add a new line on a sheet, all related account analytic line records are updated, even the ones already have the good sheet_id defined, because of:
timesheet/hr_timesheet_sheet/models/hr_timesheet_sheet.py
Lines 680 to 682 in aaf0b28
The solution is to just add new records:
## Versions
A PR is comming
The text was updated successfully, but these errors were encountered: