[FIX] project_task_line: invalid reference in computed field

This commit is contained in:
Cedric Collins
2023-11-13 16:16:13 -06:00
committed by Mayank Patel
parent 160022949b
commit 26f3a3408d

View File

@@ -12,7 +12,7 @@ class ProjectTask(models.Model):
for task in self:
subtasks = task._get_all_subtasks()
task.subtask_count = len(subtasks)
task.subtask_count_done = len(subtasks.filtered(lambda t: t.stage_id.is_closed))
task.subtask_count_done = len(subtasks.filtered(lambda t: t.is_closed))
def action_subtask(self):
action = self.env.ref('project.action_view_all_task').sudo().read()[0]