<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <record id="hr_salary_rule_commission" model="hr.salary.rule">
        <field name="condition_select">python</field>
        <field name="condition_python">
result = inputs.COMMISSION.amount > 0.0 if inputs.COMMISSION else False
        </field>
        <field name="amount_select">code</field>
        <field name="amount_python_compute">
result = inputs.COMMISSION.amount if inputs.COMMISSION else 0
        </field>
        <field name="code">COMMISSION</field>
        <field name="category_id" ref="hr_payroll.BASIC"/>
        <field name="name">Commissions</field>
        <field name="sequence" eval="90"/>
    </record>

    <record id="hr_payroll.structure_base" model="hr.payroll.structure">
        <field eval="[(4, ref('hr_salary_rule_commission'), 0)]" name="rule_ids"/>
    </record>

</odoo>
