-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hr_timesheet_sheet: Unable to add new line on sheet if project_timesheet_holidays is installed #711
Labels
Comments
Hi @alexey-pelykh @gurneyalex ! |
maisim
added a commit
to maisim/timesheet
that referenced
this issue
Sep 16, 2024
Fixes inability to add lines to timesheets that containstime off lines, managed from project_timesheet_holidays. Fixes OCA#711
SodexisTeam
pushed a commit
to sodexis/timesheet
that referenced
this issue
Oct 18, 2024
Fixes inability to add lines to timesheets that containstime off lines, managed from project_timesheet_holidays. Fixes OCA#711
Borruso
pushed a commit
to Borruso/timesheet
that referenced
this issue
Nov 26, 2024
Fixes inability to add lines to timesheets that containstime off lines, managed from project_timesheet_holidays. Fixes OCA#711
Borruso
pushed a commit
to Borruso/timesheet
that referenced
this issue
Nov 26, 2024
Fixes inability to add lines to timesheets that containstime off lines, managed from project_timesheet_holidays. Fixes OCA#711
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: