Files
enterprise-addons/timesheet_grid/views/hr_employee.xml
T

50 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="hr_employee_view_form_inherit_timesheet_validation" model="ir.ui.view">
<field name="name">hr.employee.form.timesheet.validation</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr_timesheet.hr_employee_view_form_inherit_timesheet"/>
<field name="arch" type="xml">
<xpath expr="//label[@for='hourly_cost']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
<xpath expr="//div[@name='hourly_cost']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
<xpath expr="//group[@name='managers']" position="inside">
<field name="timesheet_manager_id" string="Timesheet" widget="many2one_avatar"/>
</xpath>
<xpath expr="//group[@name='managers']" position="attributes">
<attribute name="invisible">0</attribute>
</xpath>
</field>
</record>
<record id="view_employee_tree_inherit_timesheet" model="ir.ui.view">
<field name="name">hr.employee.list.timesheet</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='work_location_id']" position="after">
<field name="timesheet_manager_id" optional="hide" widget="many2one_avatar"/>
</xpath>
</field>
</record>
<record id="hr_employee_search_view" model="ir.ui.view">
<field name="name">hr.employee.search.view</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_filter"/>
<field name="arch" type="xml">
<xpath expr="//separator[@name='secondary_groupby_separator']" position="after">
<filter name="group_timesheet_manager" string="Timesheet Approver" context="{'group_by': 'timesheet_manager_id'}"/>
</xpath>
<xpath expr="//field[@name='parent_id']" position="after">
<field name="timesheet_manager_id" domain="[('company_id', 'in', allowed_company_ids)]"/>
</xpath>
</field>
</record>
</data>
</odoo>