<?xml version="1.0"?>
<openerp>
    <data>



        <record model="ir.ui.view" id="view_hr_payslip_inherit_form">
            <field name="name">hr.payslip.inherit.form</field>
            <field name="model">hr.payslip</field>
            <field name="inherit_id" ref="hr_payroll.view_hr_payslip_form"/>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <field name="paid" position="after">
                    <field name="period_id"/>
                    <field name="journal_id" required="1"/>
                    <field name="move_id" readonly="1"/>
                </field>
            </field>
        </record>

    <!-- Adding Account fields to the Salary Rules -->

        <record id="hr_salary_rule_form_inherit" model="ir.ui.view">
            <field name="name">hr.salary.rule.form.inherit</field>
            <field name="model">hr.salary.rule</field>
            <field name="inherit_id" ref="hr_payroll.hr_salary_rule_form"/>
            <field name="arch" type="xml">
              <xpath expr="/form/notebook/page[@string='Child Rules']" position="after">
                    <page string="Accounting">
                        <field name="account_debit" />
                        <field name="account_credit"/>
                        <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
                        <field name="account_tax_id"/>
                    </page>
                </xpath>
            </field>
        </record>

    <!-- Contract View -->

        <record id="hr_contract_form_inherit" model="ir.ui.view">
            <field name="name">hr.contract.view.form.inherit</field>
            <field name="model">hr.contract</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
            <field name="arch" type="xml">
                <xpath expr="/form/notebook/page/group/field[@name='advantages']" position="after">
                   <separator colspan="4" string="Accounting"/>
                    <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
                    <field name="journal_id"/>
                </xpath>
            </field>
        </record>

    </data>
</openerp>
