From 7b4748835c83f30522642ea87dece05d9af0ce14 Mon Sep 17 00:00:00 2001 From: Darshan Kalola Date: Wed, 14 Jun 2017 20:07:20 +0530 Subject: [PATCH] [FIX] project: merge tasks should be filled automatically. With the new views, the merge task feature did not properly precomplete the selected tasks. This is because they do not support the command 4 when creating a new record. This will be fixed at some point, but meanwhile, we can just simply return the selected ids in the default_get. This makes the code slightly simpler. (PR #17566, issue 746867) --- addons/project/wizard/project_task_merge_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/wizard/project_task_merge_wizard.py b/addons/project/wizard/project_task_merge_wizard.py index 02ad9b7b1c5..1389a9d4899 100644 --- a/addons/project/wizard/project_task_merge_wizard.py +++ b/addons/project/wizard/project_task_merge_wizard.py @@ -63,7 +63,7 @@ class ProjectTaskMergeWizard(models.TransientModel): selected_tasks = self.env['project.task'].browse(self.env.context.get('active_ids', False)) assigned_tasks = selected_tasks.filtered(lambda task: task.user_id) result.update({ - 'task_ids': [(4, task.id) for task in selected_tasks], + 'task_ids': selected_tasks.ids, 'user_id': assigned_tasks and assigned_tasks[0].user_id.id or False, 'target_project_id': selected_tasks[0].project_id.id, 'target_task_id': selected_tasks[0].id