[FIX]hr_payroll : initialize result_rate in localdict to avoid next execution problem
authorPinakin Nayi (OpenERP) <pna@tinyerp.com>
Mon, 31 Mar 2014 05:01:22 +0000 (10:31 +0530)
committerPinakin Nayi (OpenERP) <pna@tinyerp.com>
Mon, 31 Mar 2014 05:01:22 +0000 (10:31 +0530)
bzr revid: pna@tinyerp.com-20140331050122-kqfw152vcippdl52

addons/hr_payroll/hr_payroll.py

index f944e8b..cc94ac4 100644 (file)
@@ -593,6 +593,7 @@ class hr_payslip(osv.osv):
                 key = rule.code + '-' + str(contract.id)
                 localdict['result'] = None
                 localdict['result_qty'] = 1.0
+                localdict['result_rate'] = 100
                 #check if the rule can be applied
                 if obj_rule.satisfy_condition(cr, uid, rule.id, localdict, context=context) and rule.id not in blacklist:
                     #compute the amount of the rule