Files
gzth/yuthon_holiday/views/inherit_hr_leave_allocation_views.xml
T
2024-10-21 17:46:52 +08:00

34 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="view_yuthon_holiday_allocation_tree" model="ir.ui.view">
<field name="name">yuthon.holiday.allocation.tree</field>
<field name="model">hr.leave.allocation</field>
<field name="inherit_id" ref="hr_holidays.hr_leave_allocation_view_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree/field[@name='duration_display']" position="attributes">
<attribute name="string">假期余额</attribute>
</xpath>
<xpath expr="//tree/field[@name='holiday_status_id']" position="attributes">
<attribute name="optional">hide</attribute>
</xpath>
<xpath expr="//tree/field[@name='date_from']" position="attributes">
<attribute name="string">开始时间</attribute>
</xpath>
<xpath expr="//tree/field[@name='date_to']" position="attributes">
<attribute name="string">结束时间</attribute>
</xpath>
</field>
</record>
<record id="view_yuthon_holiday_allocation_form" model="ir.ui.view">
<field name="name">yuthon.holiday.allocation.form</field>
<field name="model">hr.leave.allocation</field>
<field name="inherit_id" ref="hr_holidays.hr_leave_allocation_view_form_manager"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='employee_ids']" position="before">
<field name="users_role_ids" widget="many2many_tags" invisible="holiday_type != 'employee'"/>
<field name="new_employee_holidays" invisible="holiday_type != 'employee'"/>
<field name="holiday_month" invisible="new_employee_holidays != 'limit'"/>
</xpath>
</field>
</record>
</odoo>