From a9d5e45f2b500f9854ec287c4057ba8ae3d0a242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Thu, 24 Aug 2017 10:41:51 +0200 Subject: [PATCH] [IMP] sale_timesheet: hide stat button on SO if user does not have the good rights Only project user can see stat button for project and task on SO form view, and only timesheet user can see the detailled timesheet stat button. This avoid to give malny access rights to user that does not required them for their daily business. --- addons/sale_timesheet/views/sale_order_views.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/sale_timesheet/views/sale_order_views.xml b/addons/sale_timesheet/views/sale_order_views.xml index ccb4ffd66c3..ea4f103ada3 100644 --- a/addons/sale_timesheet/views/sale_order_views.xml +++ b/addons/sale_timesheet/views/sale_order_views.xml @@ -11,7 +11,8 @@ name="action_view_timesheet" class="oe_stat_button" icon="fa-clock-o" - attrs="{'invisible': [('timesheet_count', '=', 0)]}" groups="base.group_user"> + attrs="{'invisible': [('timesheet_count', '=', 0)]}" + groups="hr_timesheet.group_hr_timesheet_user"> @@ -31,7 +32,8 @@ name="action_view_task" class="oe_stat_button" icon="fa-tasks" - attrs="{'invisible': [('tasks_count', '=', 0)]}" groups="base.group_user"> + attrs="{'invisible': [('tasks_count', '=', 0)]}" + groups="project.group_project_user">