<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="1">
        <record id="contrib_register_employees" model="hr.contribution.register">
            <field name="name">Employees</field>
            <field name="partner_id" eval="False"/>
        </record>

        <record id="BASIC" model="hr.salary.rule.category">
            <field name="name">Basic</field>
            <field name="code">BASIC</field>
        </record>

        <record id="ALW" model="hr.salary.rule.category">
            <field name="name">Allowance</field>
            <field name="code">ALW</field>
        </record>

        <record id="GROSS" model="hr.salary.rule.category">
            <field name="name">Gross</field>
            <field name="code">GROSS</field>
        </record>

        <record id="DED" model="hr.salary.rule.category">
            <field name="name">Deduction</field>
            <field name="code">DED</field>
        </record>

        <record id="NET" model="hr.salary.rule.category">
            <field name="name">Net</field>
            <field name="code">NET</field>
        </record>

        <record id="COMP" model="hr.salary.rule.category">
            <field name="name">Company Contribution</field>
            <field name="code">COMP</field>
        </record>

        <record id="hr_rule_basic" model="hr.salary.rule">
            <field name="name">Basic</field>
            <field name="sequence" eval="1"/>
            <field name="code">BASIC</field>
            <field name="category_id" ref="hr_payroll.BASIC"/>
            <field name="condition_select">none</field>
            <field name="amount_select">code</field>
            <field name="amount_python_compute">result = contract.wage</field>
        </record>

        <record id="hr_rule_taxable" model="hr.salary.rule">
            <field name="name">Gross</field>
            <field name="sequence" eval="100"/>
            <field name="code">GROSS</field>
            <field name="category_id" ref="hr_payroll.GROSS"/>
            <field name="condition_select">none</field>
            <field name="amount_select">code</field>
            <field name="amount_python_compute">result = categories.BASIC + categories.ALW</field>
        </record>

        <record id="hr_rule_net" model="hr.salary.rule">
            <field name="name">Net</field>
            <field name="sequence" eval="200"/>
            <field name="code">NET</field>
            <field name="category_id" ref="hr_payroll.NET"/>
            <field name="condition_select">none</field>
            <field name="amount_select">code</field>
            <field name="amount_python_compute">result = categories.BASIC + categories.ALW + categories.DED</field>
            <field name="register_id" ref="contrib_register_employees"/>
        </record>


        <!-- Salary Structure -->

         <record id="structure_base" model="hr.payroll.structure">
            <field name="code">BASE</field>
            <field name="name">Base for new structures</field>
            <field eval="[(6, 0, [ref('hr_rule_basic'), ref('hr_rule_taxable'),ref('hr_rule_net')])]" name="rule_ids"/>
            <field name="company_id" ref="base.main_company"/>
        </record>

        <!-- Decimal Precision -->

        <record forcecreate="True" id="decimal_payroll" model="decimal.precision">
            <field name="name">Payroll</field>
            <field name="digits">2</field>
        </record>

        <record forcecreate="True" id="decimal_payroll_rate" model="decimal.precision">
            <field name="name">Payroll Rate</field>
            <field name="digits">4</field>
        </record>


    </data>
</openerp>
