odex30_standard/hr_disciplinary_tracking/views/punishment_view.xml

73 lines
3.6 KiB
XML

<?xml version="1.0"?>
<odoo>
<data>
<record model="ir.actions.act_window" id="hr_punishment_action">
<field name="name">Punishment</field>
<field name="res_model">hr.punishment</field>
<field name="view_mode">list,form</field>
</record>
<record id="hr_punishment_form_view" model="ir.ui.view">
<field name="name">hr.punishmentpunishment</field>
<field name="model">hr.punishment</field>
<field name="arch" type="xml">
<form string="Employee Deductions">
<sheet>
<group>
<field name="name" string="Punishment name" required="1"/>
</group>
<group>
<group>
<field name="type" string="Type"/>
<field name="punishment_type" string="Punishment type"
invisible="type != 'penalty'"/>
<field name="with_or_not_reward" widget="radio"
invisible="type != 'termination'"/>
</group>
<group>
<field name="amount" string="Amount"
invisible="punishment_type != 'fixed_amount' or type != 'penalty'"/>
<field name="allowance" string="Allowance" widget="many2many_tags"
invisible="punishment_type != 'depend_on_salary' or type != 'penalty'"/>
<field name="termination_type" string="Termination type"
invisible="type != 'termination'"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
</group>
</group>
<group>
<group>
<field name="punishment_type_amount" string="Amount of Punishment type"
invisible="punishment_type != 'depend_on_salary' or type != 'penalty'"/>
</group>
<group>
<field name="duration" string="Duration"
invisible="punishment_type == 'fixed_amount' or punishment_type_amount != 'duration' or type != 'penalty'"/>
<field name="percentage" string="Percentage"
invisible="punishment_type_amount != 'percentage' or punishment_type == 'fixed_amount' or type != 'penalty'"/>
<field name="days_deduction"
invisible="type != 'penalty'"/>
</group>
</group>
</sheet>
<!--Discuss widgets for history and communication -->
<chatter/>
</form>
</field>
</record>
<record model="ir.ui.view" id="hr_punishment_tree_view">
<field name="name">punishment</field>
<field name="model">hr.punishment</field>
<field name="arch" type="xml">
<list string="Penalty type">
<field name="name" string="Punishment Name"/>
<field name="type" string="Type"/>
</list>
</field>
</record>
</data>
</odoo>