Skip to content

Commit

Permalink
[11.0][MIG] hr_timesheet_sheet (OCA#125)
Browse files Browse the repository at this point in the history
* [10.0] hr_timesheet_sheet

* [11.0][MIG] hr_timesheet_sheet

* [REMOVE] hr_timesheet.sheet.account

* [REMOVE] 'new' state

* [ADD] Tests

* [UPD] Adapt to multicompany

* [ADD] Add more tests (include multicompany tests)

* [FIX] project_task_stage_allow_timesheet: show error message only if task

* [ADD] Migration scripts to v11
  • Loading branch information
MiquelRForgeFlow authored and sergiocorato committed Sep 6, 2023
1 parent b04ba0e commit 26bf165
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _check_task_allow_timesheet(self):
for rec in self:
task = rec.task_id
stage = task.stage_id
if not stage.allow_timesheet:
if task and not stage.allow_timesheet:
raise ValidationError(_(
"You can't link a timesheet line to a task if its stage "
"doesn't allow it. (Task: %s, Stage: %s)"
Expand Down

0 comments on commit 26bf165

Please sign in to comment.