[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:
Jérome Maes
2017-09-13 08:41:32 +02:00
parent 04836cc257
commit a9d5e45f2b
@@ -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>