[FIX] l10n_be_hr_payroll: Prevent 'Child Allowance' to exceed 'Withholding Taxes'

Note: Small fix, long diff. Read the specifcation section to understand why.

PURPOSE
=======

The child allowance is an amount to decrease the withholding taxes due to family charges.

SPECIFICATION
=============

Instead of having a salary rule with a fixed amount for the child allowance, we should have a salary rule on which the amount is computed with a python code, that take the minimum between the original fixed amount and the remaining withholding taxes to pay.

As the field 'amount_python_compute' isn't in the field declaration on the csv file, we have to add it and modify all the lines. The result is a quite long diff for a small fix.
This commit is contained in:
Yannick Tivisse
2017-05-08 12:45:14 +02:00
parent ac8800f0e0
commit aeae2fb64f
2 changed files with 1423 additions and 1423 deletions
File diff suppressed because it is too large Load Diff
@@ -279,7 +279,7 @@ elif salary <= 2461.27:
<field name="sequence">140</field>
<field name="amount_select">fix</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(employee.dependent_children)</field>
<field name="condition_python">result = bool(employee.dependent_children) and (categories.PP + categories.PPRed + categories.FamRed + categories.ChA &lt; 0.0)</field>
</record>
<record id="hr_payroll_rules_child" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_child_alw"/>
@@ -296,7 +296,7 @@ elif salary &lt;= 2461.27:
a) Reduction for dependent children</field>
<field name="condition_select">python</field>
<field name="condition_python">result = bool(employee.dependent_children)</field>
<field name="condition_python">result = bool(employee.dependent_children) and (categories.PP + categories.PPRed + categories.FamRed + categories.ChA &lt; 0.0)</field>
</record>
<record id="hr_salary_rule_other_family_charges_reductions" model="hr.salary.rule">
<field name="category_id" ref="hr_salary_rule_category_family_reductions"/>