[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.
This commit is contained in:
@@ -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">
|
||||
<field name="timesheet_count" widget="statinfo" string="Timesheets"/>
|
||||
</button>
|
||||
</xpath>
|
||||
@@ -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">
|
||||
<field name="tasks_count" widget="statinfo" string="Tasks"/>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
Reference in New Issue
Block a user