view_employee_form_leave_inherit_action

This commit is contained in:
blackbelts 2025-06-19 10:08:30 +03:00
parent 6048d45792
commit 650124c868
2 changed files with 37 additions and 35 deletions

View File

@ -139,6 +139,7 @@
attrs="{'invisible': [('show_leaves','=', False)]}"
groups="base.group_user"
help="Remaining leaves">
<field string="Leaves Left" name="leaves_count" widget="statinfo"/>
</button>
</xpath>

View File

@ -10,37 +10,12 @@
<field name="search_view_id" ref="hr_holidays_community.view_hr_holidays_filter"/>
</record>
<!-- <record id="view_hr_holidays_tree_no_delete" model="ir.ui.view">-->
<!-- <field name="name">hr.holidays.tree.no.delete</field>-->
<!-- <field name="model">hr.holidays</field>-->
<!-- <field name="inherit_id" ref="hr_holidays_public.leaves_balance_tree_view"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <tree position="attributes">-->
<!--&lt;!&ndash; <attribute name="delete">false</attribute>&ndash;&gt;-->
<!-- <attribute name="edit">True</attribute>-->
<!-- <attribute name="create">True</attribute>-->
<!-- </tree>-->
<!-- </field>-->
<!-- </record>-->
<!-- <record id="view_hr_holidays_form_no_delete" model="ir.ui.view">-->
<!-- <field name="name">hr.holidays.form.no.delete</field>-->
<!-- <field name="model">hr.holidays</field>-->
<!-- <field name="inherit_id" ref="hr_holidays_community.edit_holiday_new"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <form position="attributes">-->
<!--&lt;!&ndash; <attribute name="delete">false</attribute>&ndash;&gt;-->
<!--&lt;!&ndash; <attribute name="edit">false</attribute>&ndash;&gt;-->
<!--&lt;!&ndash; <attribute name="create">false</attribute>&ndash;&gt;-->
<!-- </form>-->
<!-- </field>-->
<!-- </record>-->
<record model="ir.actions.act_window" id="leaves_balancee_action">
<field name="name">Leaves Balance</field>
<field name="res_model">hr.holidays</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('type','=','add'),('check_allocation_view','=','balance')]</field>
<field name="domain">[('type','=','add'),('check_allocation_view','=','balance')]</field>
<field name="context">{'default_type':'add', 'default_check_allocation_view': 'balance'}</field>
<field name="search_view_id" ref="hr_holidays_community.view_hr_holidays_filter"/>
@ -49,17 +24,43 @@
<!-- <record id="view_employee_form_leave_inherit_customm" model="ir.ui.view">-->
<!-- <field name="name">hr.employee.leave.form.inherit.custom</field>-->
<!-- <field name="model">hr.employee</field>-->
<!-- <field name="inherit_id" ref="hr_holidays_community.view_employee_form_leave_inherit"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <record id="view_employee_form_leave_inherit_custome" model="ir.ui.view">-->
<!-- <field name="name">hr.employee.leave.form.inherit.custom</field>-->
<!-- <field name="model">hr.employee</field>-->
<!-- <field name="inherit_id" ref="hr_holidays_community.view_employee_form_leave_inherit"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <xpath expr="//button[@name='%(hr_holidays_community.act_hr_employee_holiday_request)d']" position="attributes">-->
<!-- <attribute name="name">%(hr_holidays_public.leaves_balancee_action)d</attribute>-->
<!--&lt;!&ndash; <attribute name="name">%(hr_holidays_public.leaves_balance_action)d</attribute>&ndash;&gt;-->
<!--&lt;!&ndash; <attribute name="context">{'search_default_employee_id': active_id}</attribute>&ndash;&gt;-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
<record id="view_employee_form_leave_inherit_action" model="ir.ui.view">
<field name="name">hr.employee.leave.form.inherit.custom</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr_holidays_community.view_employee_form_leave_inherit"/>
<field name="arch" type="xml">
<!-- <xpath expr="//button[@name='%(hr_holidays_community.act_hr_employee_holiday_request)d']" position="attributes">-->
<!--&lt;!&ndash; <attribute name="name">%(hr_holidays_public.leaves_balancee_action)d</attribute>&ndash;&gt;-->
<!-- <attribute name="name">%(hr_holidays_public.leaves_balance_action)d</attribute>-->
<!-- <attribute name="name">%(hr_holidays_public.leaves_balancee_action)d</attribute>-->
<!-- <attribute name="context">{'search_default_employee_id': active_id}</attribute>-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
<xpath expr="//button[child::field[@name='leaves_count']]" position="attributes">
<attribute name="name">%(hr_holidays_public.leaves_balancee_action)d</attribute>
<attribute name="context">{'search_default_employee_id': active_id}</attribute>
</xpath>
</field>
</record>