[MOD] small changes
bzr revid: vir@tinyerp.com-20101005071317-f4c4fk4ie3zg6lq9
This commit is contained in:
parent
75693c2b85
commit
29d7b9ad30
|
@ -115,12 +115,11 @@ class hr_employee(osv.osv):
|
|||
return True
|
||||
|
||||
def onchange_evaluation_plan_id(self, cr, uid, ids, evaluation_plan_id, evaluation_date, context=None):
|
||||
evaluation_date = evaluation_date or False
|
||||
evaluation_plan_obj=self.pool.get('hr_evaluation.plan')
|
||||
obj_evaluation = self.pool.get('hr_evaluation.evaluation')
|
||||
if context is None:
|
||||
context = {}
|
||||
if evaluation_plan_id:
|
||||
evaluation_plan_obj=self.pool.get('hr_evaluation.plan')
|
||||
obj_evaluation = self.pool.get('hr_evaluation.evaluation')
|
||||
flag = False
|
||||
evaluation_plan = evaluation_plan_obj.browse(cr, uid, [evaluation_plan_id], context=context)[0]
|
||||
if not evaluation_date:
|
||||
|
@ -192,11 +191,11 @@ class hr_evaluation(osv.osv):
|
|||
return res
|
||||
|
||||
def onchange_employee_id(self, cr, uid, ids, employee_id, context=None):
|
||||
employee_obj=self.pool.get('hr.employee')
|
||||
if context is None:
|
||||
context = {}
|
||||
evaluation_plan_id=''
|
||||
evaluation_plan_id=False
|
||||
if employee_id:
|
||||
employee_obj=self.pool.get('hr.employee')
|
||||
for employee in employee_obj.browse(cr, uid, [employee_id], context=context):
|
||||
if employee and employee.evaluation_plan_id and employee.evaluation_plan_id.id:
|
||||
evaluation_plan_id=employee.evaluation_plan_id.id
|
||||
|
|
|
@ -181,15 +181,15 @@ class hr_applicant(crm.crm_case, osv.osv):
|
|||
}
|
||||
|
||||
def onchange_job(self,cr, uid, ids, job, context=None):
|
||||
job_obj = self.pool.get('hr.job')
|
||||
if context is None:
|
||||
context = {}
|
||||
result = {}
|
||||
|
||||
if job:
|
||||
job_obj = self.pool.get('hr.job')
|
||||
result['department_id'] = job_obj.browse(cr, uid, job, context=context).department_id.id
|
||||
return {'value': result}
|
||||
return {'value': {'department_id': []}}
|
||||
return {'value': {'department_id': False}}
|
||||
|
||||
def stage_previous(self, cr, uid, ids, context=None):
|
||||
"""This function computes previous stage for case from its current stage
|
||||
|
|
Loading…
Reference in New Issue