[FIX] project: add default project when user wants to add subtask
Before this commit, thef3974bea4badds the project as filter in the search view when the user wants to add a subtask on a task in the form view. This feature has been broken due to a change on the search view. The main search has no longer the display_project_id field, only the one inherited the main one has that field. (commitda868d28e2) This commit changes the search view to use to correctly have the project of the parent task as default project when the user wants to search a subtask to add on the task displayed in the form view. closes odoo/odoo#104878 X-original-commit: 4e1ee0f9ae6f39154a528fec2c16943df807ab7f Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com> Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
@@ -1195,7 +1195,7 @@
|
||||
</page>
|
||||
<page name="sub_tasks_page" string="Sub-tasks" attrs="{'invisible': [('allow_subtasks', '=', False)]}">
|
||||
<field name="child_ids"
|
||||
context="{'default_project_id': project_id if not parent_id or not display_project_id else display_project_id, 'default_user_ids': user_ids, 'default_parent_id': id,
|
||||
context="{'search_view_ref' : 'project.view_task_search_form_extended', 'default_project_id': project_id if not parent_id or not display_project_id else display_project_id, 'default_user_ids': user_ids, 'default_parent_id': id,
|
||||
'default_partner_id': partner_id, 'default_milestone_id': allow_milestones and milestone_id, 'search_default_display_project_id': project_id }"
|
||||
widget="many2many"
|
||||
domain="['!', ('id', 'parent_of', id)]">
|
||||
|
||||
Reference in New Issue
Block a user