From 33f2f16249694f02da5e2f65dcafc1a0aca390e9 Mon Sep 17 00:00:00 2001 From: mtr Date: Mon, 23 May 2011 16:52:03 +0530 Subject: [PATCH] [IMP] hr_payroll: inherited 'Inputline' class and changed help strings bzr revid: mtr@mtr-20110523112203-3xj8q54ffiqxmyz3 --- addons/hr_payroll/hr_payroll.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 8c95bda99e8..94d993bdb80 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -468,17 +468,10 @@ class hr_payslip(osv.osv): def get_payslip_lines(self, cr, uid, contract_ids, payslip_id, context): - class Categories(object): - def __init__(self, pool, cr, uid, employee_id, dict): - self.pool = pool - self.cr = cr - self.uid = uid - self.employee_id = employee_id - self.dict = dict + class Categories(InputLine): def __getattr__(self, key): - value = self.dict[key] - return value + return self.dict[key] def _sum_salary_rule_category(categories_dict, category, amount): if category.parent_id: @@ -734,7 +727,7 @@ class hr_salary_rule(osv.osv): # employee: hr.employee object # contract: hr.contract object # rules: rules code (previously computed) -# categories: dictionary containing the computed salary rule categories (sum of amount of all rules belonging to that category). Keys are the category codes. +# categories: object containing the computed salary rule categories. # worked_days: dictionary containing the computed worked days. Keys are the worked days codes. # inputs: dictionary containing the computed inputs. Keys are the inputs codes. @@ -749,7 +742,7 @@ result = contract.wage * 0.10''', # employee: hr.employee object # contract: hr.contract object # rules: rules code (previously computed) -# categories: dictionary containing the computed salary rule categories (sum of amount of all rules belonging to that category). Keys are the category codes. +# categories: object containing the computed salary rule categories. # worked_days: dictionary containing the computed worked days. Keys are the worked days codes. # inputs: dictionary containing the computed inputs. Keys are the inputs codes.