From 43eb0502b6ffad42a7d90d6fdcc66fb7827109fb Mon Sep 17 00:00:00 2001 From: mtr Date: Fri, 27 May 2011 12:53:52 +0530 Subject: [PATCH] [IMP] hr_payroll: improved code to have access of all the fields on rules object bzr revid: mtr@mtr-20110527072352-tdexanp29hxmnepi --- addons/hr_payroll/hr_payroll.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 18d0f80dd81..42e37f1d996 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -568,7 +568,7 @@ class hr_payslip(osv.osv): previous_amount = rule.code in localdict and localdict[rule.code] or 0.0 #set/overwrite the amount computed for this rule in the localdict localdict[rule.code] = amount - rules[rule.code] = amount + rules[rule.code] = rule #sum the amount for its salary category localdict = _sum_salary_rule_category(localdict, rule.category_id, amount - previous_amount) #create/overwrite the rule in the temporary results @@ -797,7 +797,7 @@ result = contract.wage * 0.10''', # payslip: object containing the payslips # employee: hr.employee object # contract: hr.contract object -# rules: object containing the rules code (previously computed) +# rules: object containing the rules code (as hr.salary.rule object) # categories: dictionary containing the computed salary rule categories (sum of amount of all rules belonging to that category). Keys are the category codes. # worked_days: object containing the computed worked days # inputs: object containing the computed inputs