From 8aed28bafbff1bc66d260de4d568f4f9d7668b4c Mon Sep 17 00:00:00 2001 From: "Audric Onockx (auon)" Date: Wed, 24 May 2023 15:47:50 +0000 Subject: [PATCH] [FIX] project: make _get_subtasks_recursively actually recursive Previous commit (https://github.com/odoo/odoo/pull/116570) renamed this method _get_subtasks_recursively. But instead of calling itself in the return statment, the method _get_all_subtasks was called resulting in a non-recursive function and to potential undesired behavior as _get_all_subtasks calls _get_subtask_ids_per_task_id that calls _get_subtasks_recursively in some cases. With this commit, we just call _get_subtasks_recursively on the children to make it actually recursive, like it was in the first place. closes odoo/odoo#123149 X-original-commit: 3a6f5e4d8eddaa4effbf96d8b59d47afc0ee9503 Signed-off-by: Xavier Bol (xbo) Signed-off-by: Audric Onockx (auon) --- addons/project/models/project_task.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/models/project_task.py b/addons/project/models/project_task.py index 9af5933e743..931c46637d8 100644 --- a/addons/project/models/project_task.py +++ b/addons/project/models/project_task.py @@ -1401,7 +1401,7 @@ class Task(models.Model): children = self.child_ids if not children: return self.env['project.task'] - return children + children._get_all_subtasks() + return children + children._get_subtasks_recursively() def action_open_parent_task(self): return {