<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="hr_contract_form_l10n_be_inherit" model="ir.ui.view">
            <field name="name">hr.contract.form.inherit</field>
            <field name="model">hr.contract</field>
            <field name="priority">20</field>
            <field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
            <field name="arch" type="xml">
            <data>
                 <xpath expr="//field[@name='struct_id']" position="after">
                    <field name="travel_reimbursement_amount"/>
                    <field name="car_company_amount"/>
                    <field name="car_employee_deduction"/>
                    <field name="misc_onss_deduction"/>
                    <field name="meal_voucher_amount"/>
                    <field name="meal_voucher_employee_deduction"/>
                    <field name="misc_advantage_amount"/>
                    <field name="additional_net_amount"/>
                    <field name="retained_net_amount"/>
                    <field name="insurance_employee_deduction"/>
                 </xpath>
            </data>
            </field>
        </record>

       <!-- <record id="view_employee_marital_required_form" model="ir.ui.view">
            <field name="name">hr.employee.inherit.form</field>
            <field name="model">hr.employee</field>
            <field name="priority">25</field>
            <field name="inherit_id" ref="hr.view_employee_form"/>
            <field name="arch" type="xml">
                <field name="marital" position="replace">
                </field>
            </field>
        </record> -->

        <record id="hr_employee_form__l10n_be_view_for" model="ir.ui.view">
            <field name="name">hr.employee.inherit.form</field>
            <field name="model">hr.employee</field>
            <field name="inherit_id" ref="hr_contract.hr_hr_employee_view_form2"/>
            <field name="priority">30</field>
            <field name="arch" type="xml">
            <data>
                <xpath expr="//field[@name='vehicle_distance']" position="after">
                    <field name="resident_bool" eval="False"/> 
                </xpath>
                <xpath expr="//field[@name='marital']" position="after">
                    <field name="spouse_fiscal_status" attrs="{'invisible':[('marital','!=','married')],'required':[('marital','=','married')]}" colspan="1" help="if spouse has professionnel income or not"/> 
                    <field name="disabled_spouse_bool" attrs="{'invisible':[('marital','!=','married')]}" colspan="1"/>
                </xpath>
                <xpath expr="//field[@name='children']" position="after">
                    <field name="disabled_children_bool"/>
                    <field name="disabled_children_number" attrs="{'invisible':[('disabled_children_bool','!=',True)]}" colspan="1" help="number of dependent children declared as disabled"/>
                </xpath>
            </data>
            </field>
        </record>
    </data>
</openerp>
