From ca71ebad9bd6f5c0775e8158efaa339728571067 Mon Sep 17 00:00:00 2001 From: alt-odoo Date: Mon, 10 May 2021 22:04:04 +0000 Subject: [PATCH] [FIX] project: incorrect creation of recurring tasks In case X several recurrences are processed in the same cron execution, only the last recurring task was created X times, while the other tasks were not created. There is also a missing id preventing a correct use of the default stage for the new created task. closes odoo/odoo#70784 X-original-commit: 5ea2fcbecf572be24af9b2aac76de9e5d5709d2c Signed-off-by: Yannick Tivisse (yti) Signed-off-by: Alex Tuyls --- addons/project/models/project_task_recurrence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/models/project_task_recurrence.py b/addons/project/models/project_task_recurrence.py index 7bed6b431a2..e229ec8b28d 100644 --- a/addons/project/models/project_task_recurrence.py +++ b/addons/project/models/project_task_recurrence.py @@ -221,7 +221,7 @@ class ProjectTaskRecurrence(models.Model): children = [] # copy the subtasks of the original task for child in task.child_ids: - child_values = self._new_task_values(child) + child_values = recurrence._new_task_values(child) child_values['parent_id'] = new_task.id children.append(child_values) self.env['project.task'].create(children)