Skip to content

Commit

Permalink
[FIX] project_timesheet_holidays: multi company issues
Browse files Browse the repository at this point in the history
Partial backport of ef1afb7

Task-1999686
Closes odoo#35520

closes odoo#35526

Signed-off-by: Christophe Simonis <[email protected]>
  • Loading branch information
jem-odoo committed Aug 7, 2019
1 parent 752b255 commit 5d64a51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions addons/project_timesheet_holidays/models/hr_holidays.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def _validate_leave_request(self):
'date': fields.Date.to_string(day_date),
'holiday_id': holiday.id,
'employee_id': holiday.employee_id.id,
'company_id': holiday_task.company_id.id or holiday_project.company_id.id,
})

return super(Holidays, self)._validate_leave_request()
Expand Down
2 changes: 1 addition & 1 deletion addons/project_timesheet_holidays/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _create_leave_project_task(self):
'name': _('Time Off'),
'project_id': company.leave_timesheet_project_id.id,
'active': False,
'company_id': False,
'company_id': company.id,
})
company.write({
'leave_timesheet_task_id': task.id,
Expand Down

0 comments on commit 5d64a51

Please sign in to comment.