From 90ecf5b90fb8493789ec14557ae9f43f3dcaef01 Mon Sep 17 00:00:00 2001 From: mtr Date: Mon, 28 Mar 2011 18:22:11 +0530 Subject: [PATCH] [IMP] hr_payroll:assigned default value for condition_select field on salary rules. bzr revid: mtr@mtr-20110328125211-iv509sw789vp8t2l --- addons/hr_payroll/hr_payroll.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/hr_payroll/hr_payroll.py b/addons/hr_payroll/hr_payroll.py index 926e7723685..b92f9c51c60 100644 --- a/addons/hr_payroll/hr_payroll.py +++ b/addons/hr_payroll/hr_payroll.py @@ -1339,7 +1339,7 @@ class hr_salary_rule(osv.osv): 'gratuity':fields.boolean('Use for Gratuity ?', required=False), 'condition_select': fields.selection([('range', 'Range'), ('python', 'Python Expression')], "Condition based on"), 'computational_expression':fields.text('Computational Expression', required=True, readonly=False, help='This will use to computer the % fields values, in general its on basic, but You can use all heads code field in small letter as a variable name i.e. hra, ma, lta, etc...., also you can use, static varible basic'), - 'conditions':fields.char('Condition', size=1024, required=True, readonly=False, help='Applied this head for calculation if condition is true'), + 'conditions':fields.char('Condition', size=1024, required=True, readonly=False, help='Applied this rule for calculation if condition is true.You can specify condition like basic > 1000.'), 'sequence': fields.integer('Sequence', required=True, help='Use to arrange calculation sequence'), 'active':fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the salary rule without removing it."), 'python_compute':fields.text('Python Code'), @@ -1361,6 +1361,7 @@ class hr_salary_rule(osv.osv): 'company_id': lambda self, cr, uid, context: \ self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id, + 'condition_select': 'python', } # def _execute_function(self, cr, uid, id, value, context=None):