53 lines
2.3 KiB
XML
53 lines
2.3 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<!--
|
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
-->
|
|
<record id="hr_timesheet_action_from_department" model="ir.actions.act_window">
|
|
<field name="name">Timesheets to Review</field>
|
|
<field name="res_model">hr_timesheet.sheet</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="context">{
|
|
'search_default_department_id': [active_id],
|
|
'default_department_id': active_id,
|
|
'search_default_to_review': 1}
|
|
</field>
|
|
</record>
|
|
<!--Hr Department Inherit Kanban view-->
|
|
<record id="hr_department_view_kanban" model="ir.ui.view">
|
|
<field name="name">hr.department.kanban.inherit</field>
|
|
<field name="model">hr.department</field>
|
|
<field name="inherit_id" ref="hr.hr_department_view_kanban" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//templates" position="before">
|
|
<field
|
|
name="timesheet_sheet_to_approve_count"
|
|
groups="hr_timesheet.group_hr_timesheet_user"
|
|
/>
|
|
</xpath>
|
|
<xpath expr="//div[@name='kanban_primary_right']" position="inside">
|
|
<button
|
|
name="%(hr_timesheet_sheet.hr_timesheet_action_from_department)d"
|
|
type="action"
|
|
class="btn btn-secondary"
|
|
t-if="record.timesheet_sheet_to_approve_count.raw_value > 0"
|
|
groups="hr_timesheet.group_hr_timesheet_user"
|
|
>
|
|
<field name="timesheet_sheet_to_approve_count" /> Timesheets
|
|
</button>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('o_kanban_manage_reports')]" position="inside">
|
|
<div role="menuitem" groups="hr_timesheet.group_hr_timesheet_user">
|
|
<a
|
|
class="dropdown-item"
|
|
name="%(hr_timesheet_sheet.hr_timesheet_action_from_department)d"
|
|
type="action"
|
|
>
|
|
<field name="timesheet_sheet_to_approve_count" /> Timesheets
|
|
</a>
|
|
</div>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|