From 882c8526030c6fee178f2c2026cc0ca80f6de2fd Mon Sep 17 00:00:00 2001 From: ilru-odoo Date: Tue, 13 Feb 2024 13:08:42 +0000 Subject: [PATCH] [FIX] project: prevent auto-assignment of projects to sub-tasks **Issue Description**: From versions 16.3 to the master branch, a sub-task should never be assigned to a project automatically. However, when accessing `Sub-tasks` through the smart button and creating a new one, the context pass variable such as `'default_project_id': 4`. This leads to the sub-task being created with an assigned project immediately. **Steps to Reproduce**: 1. Open `Project` app. 2. Enter any project, then navigate to any task. 3. Within the task, go to `sub-task` tab. 4. At the top center of the page, click on 'Sub-task' smart button. 5. Then, create a new sub-task using the 'New' button. 6. You will observe that the sub-task is immediately assigned to a project, which should not happen. **Proposed Solution**: By removing the passing of the default_project_id variable from the context when open a sub-task action, we ensure that sub-tasks are not automatically assigned to a project, as intended. opw-3708537 closes odoo/odoo#154101 X-original-commit: c45ac4c9584f961ea0cdedffdf2b4bbe9058e8d9 Signed-off-by: Xavier Bol (xbo) Signed-off-by: Ilya Rudy (ilru) --- addons/project/views/project_task_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/views/project_task_views.xml b/addons/project/views/project_task_views.xml index 7beaf335c58..2b7e8aa0c8a 100644 --- a/addons/project/views/project_task_views.xml +++ b/addons/project/views/project_task_views.xml @@ -293,7 +293,7 @@