<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
    <record id="pe_payroll_config_tree" model="ir.ui.view">
        <field name="name">hr.contract.pe_payroll_config.tree</field>
        <field name="model">hr.contract.pe_payroll_config</field>
        <field name="arch" type="xml">
            <tree string="Peru Employee Payroll Forms">
                <field name="employee_id"/>
                <field name="name"/>
                <field name="retirement_type"/>
                <field name="create_date"/>
                <field name="write_date"/>
            </tree>
        </field>
    </record>

    <record id="pe_payroll_config_form" model="ir.ui.view">
        <field name="name">hr.contract.pe_payroll_config.form</field>
        <field name="model">hr.contract.pe_payroll_config</field>
        <field name="arch" type="xml">
            <form string="Employee Payroll Forms">
                <sheet>
                    <group name="General">
                        <field name="employee_id"/>
                        <field name="name"/>
                    </group>
                    <group>
                        <group name="employee" string="Employee">
                            <field name="has_minor_dependent" help="Eligible for Household Allowance"/>
                            <field name="ee_5ta_cat_exempt"/>
                            <field name="retirement_type"/>
                            <field name="afp_type" attrs="{'invisible': [('retirement_type', '!=', 'afp')]}"/>
                            <field name="afp_comision_type" attrs="{'invisible': [('retirement_type', '!=', 'afp')]}"/>
                        </group>
                        <group name="employer" string="Employer">
                            <field name="comp_ss_type" />
                            <p attrs="{'invisible': [('comp_ss_type', '!=', 'eps')]}">Not supported. Specify rule.</p>
                            <field name="comp_ss_eps_ee_rule_id" attrs="{'invisible': [('comp_ss_type', '!=', 'eps')]}" />
                            <field name="comp_ss_eps_rule_id" attrs="{'invisible': [('comp_ss_type', '!=', 'eps')]}" />
                        </group>
                    </group>
                </sheet>
            </form>
        </field>
    </record>

    <record id="pe_payroll_config_search" model="ir.ui.view">
        <field name="name">hr.contract.pe_payroll_config.search</field>
        <field name="model">hr.contract.pe_payroll_config</field>
        <field name="arch" type="xml">
            <search string="Peru Employee Payroll Forms Search">
                <field name="employee_id"/>
                <field name="name"/>
            </search>
        </field>
    </record>

    <record id="pe_payroll_config_action_main" model="ir.actions.act_window">
        <field name="name">Peru Employee Payroll Forms</field>
        <field name="res_model">hr.contract.pe_payroll_config</field>
        <field name="view_mode">tree,form</field>
        <field name="help" type="html">
            <p>
                No Forms
            </p>
        </field>
    </record>

    <menuitem id="pe_payroll_config_menu_main" name="Peru Payroll Forms"
              action="pe_payroll_config_action_main"
              sequence="50" parent="hr_payroll.menu_hr_payroll_employees_root"/>
</odoo>
