From 8caf00378ce8905c05b46b7b722177f8fb278e70 Mon Sep 17 00:00:00 2001 From: Yannick Tivisse <yti@odoo.com> Date: Fri, 8 Nov 2019 13:58:31 +0000 Subject: [PATCH] [IMP] project: Don't display stages if project is not set Purpose ======= If the user creates a task and if the project isn't set, then all the stages that are not linked to a project are displayed, which is polluting the form view. Specifications ============== If no project is set on the task form view, do not display any stages in the statusbar. closes odoo/odoo#40041 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com> --- addons/project/views/project_views.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml index 3165406e3d8b..d63d710a32ca 100644 --- a/addons/project/views/project_views.xml +++ b/addons/project/views/project_views.xml @@ -442,7 +442,7 @@ <header> <button name="action_assign_to_me" string="Assign to Me" type="object" class="oe_highlight" attrs="{'invisible' : [('user_id', '!=', False)]}"/> - <field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}"/> + <field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('project_id', '=', False)]}"/> </header> <sheet string="Task"> <div class="oe_button_box" name="button_box"> -- GitLab