From 9e7bc3623ab17427011bc152ae8f81285f397488 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Tue, 21 Feb 2017 14:55:18 +0100 Subject: [PATCH] [FIX] hr_timesheet: recomputation depends of the task progress The task progress value depends on the stage of the task, if it's a folded stage or not. If the task was being changed of stage, from a non-folded stage to a folded stage, the recomputation of the progress was not done, while it was needed as a task in a final stage is considered to be done. This is a regression during migration to the new api in e6ac7a7d2571ce046a1d9befd64d4216054494c7 --- addons/hr_timesheet/project_timesheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet/project_timesheet.py b/addons/hr_timesheet/project_timesheet.py index 3b067c4d024..cf2c15af6d2 100644 --- a/addons/hr_timesheet/project_timesheet.py +++ b/addons/hr_timesheet/project_timesheet.py @@ -20,7 +20,7 @@ class Task(models.Model): for task in self: task.subtask_count = self.search_count([('id', 'child_of', task.id), ('id', '!=', task.id)]) - @api.depends('timesheet_ids.unit_amount', 'planned_hours', 'child_ids.stage_id', + @api.depends('stage_id', 'timesheet_ids.unit_amount', 'planned_hours', 'child_ids.stage_id', 'child_ids.planned_hours', 'child_ids.effective_hours', 'child_ids.children_hours', 'child_ids.timesheet_ids.unit_amount') def _hours_get(self): for task in self.sorted(key='id', reverse=True):