[FIX] hr_timesheet_sheet: menu to check past timesheets

For a simple employee (meaning, not a HR officer),
it wasn't possible to view past timesheets.

Indeed, the "Weekly" menu opens the current timesheet,
and the menu "Timesheets to approve" is available only
for HR officers.

opw-657860
This commit is contained in:
Denis Ledoux
2015-12-01 11:00:47 +01:00
parent 00ee6e7ba4
commit 390aa7a78d
@@ -194,6 +194,30 @@
</field>
</record>
<record id="act_hr_timesheet_sheet_my_timesheets" model="ir.actions.act_window">
<field name="name">My Timesheets</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('employee_id.user_id', '=', uid)]</field>
<field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
new timesheet.
</p><p>
You must record timesheets every day and confirm at the end
of the week. Once the timesheet is confirmed, it should be
validated by a manager.
</p><p>
Timesheets can also be invoiced to customers, depending on the
configuration of each project's related contract.
</p>
</field>
</record>
<menuitem action="act_hr_timesheet_sheet_my_timesheets" id="menu_act_hr_timesheet_sheet_my_timesheets" parent="hr_attendance.menu_hr_time_tracking"
sequence="3"/>
<record id="act_hr_timesheet_sheet_form" model="ir.actions.act_window">
<field name="name">Timesheets to Approve</field>
<field name="type">ir.actions.act_window</field>
@@ -226,6 +250,7 @@
<menuitem action="act_hr_timesheet_sheet_form" id="menu_act_hr_timesheet_sheet_form" parent="hr_attendance.menu_hr_time_tracking"
sequence="11" groups="base.group_hr_user"/>
<!--
Company inheritancy
-->