[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
e6ac7a7d25
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user