From 4a80e6e92281b940102b83a0e758f2897b99e9a5 Mon Sep 17 00:00:00 2001 From: sofiagvaladze Date: Tue, 23 May 2023 15:06:26 +0200 Subject: [PATCH] [IMP] hr: refine simple user form view When we go to the simple user view, no need to show "Create Employee" option unless we are inviting a new user. Also, to standardize the behavior, we remove the context that conditionally used to hide the option. Moreover, we add smartbutton leading to the related employees' view to the simple user form view. task-3334739 closes odoo/odoo#122870 Related: odoo/enterprise#41646 Signed-off-by: Yannick Tivisse (yti) --- addons/hr/views/hr_employee_views.xml | 4 ++-- addons/hr/views/res_users.xml | 14 +++++++++++++- addons/sales_team/views/crm_team_views.xml | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/addons/hr/views/hr_employee_views.xml b/addons/hr/views/hr_employee_views.xml index 82148005032..5943da1864d 100644 --- a/addons/hr/views/hr_employee_views.xml +++ b/addons/hr/views/hr_employee_views.xml @@ -198,7 +198,7 @@ - + @@ -422,7 +422,7 @@ code - action = records.with_context(allow_create_employee=False).action_create_user() + action = records.action_create_user() diff --git a/addons/hr/views/res_users.xml b/addons/hr/views/res_users.xml index a3be05158da..b8f0524ac35 100644 --- a/addons/hr/views/res_users.xml +++ b/addons/hr/views/res_users.xml @@ -205,9 +205,21 @@ res.users + +
+ +
+
- +
diff --git a/addons/sales_team/views/crm_team_views.xml b/addons/sales_team/views/crm_team_views.xml index 9bf957568b2..717347af5d9 100644 --- a/addons/sales_team/views/crm_team_views.xml +++ b/addons/sales_team/views/crm_team_views.xml @@ -53,7 +53,7 @@ + class="w-100">