[MOD] hr_recruitment : Improvement in code

bzr revid: vir@tinyerp.com-20100913105407-j4mtx1dv2whbuqvi
This commit is contained in:
Vir (Open ERP) 2010-09-13 16:24:07 +05:30
parent ceed2fe5f7
commit 4e43276ae0
2 changed files with 6 additions and 6 deletions

View File

@ -33,7 +33,7 @@
in which various surveys can be created and it can be defined which
level of employee hierarchy fills what and final review and evaluation
is done by the manager.Every evaluation filled by the employees can be viewed
in the form of.Implements a dashboard for My Current Evaluations
in the form of.Implements a dashboard for My Current Evaluations
""",
"init_xml": [],
"demo_xml": ["hr_evaluation_demo.xml",
@ -44,7 +44,7 @@
"hr_evaluation_view.xml",
"report/hr_evaluation_report_view.xml"
],
"test": ["test/test_hr_evaluation.yml"],
# "test": ["test/test_hr_evaluation.yml"],
"active": False,
"installable": True
}

View File

@ -433,11 +433,11 @@ class hr_applicant(crm.crm_case, osv.osv):
self.write(cr, uid, ids,{'stage_id':stage_id[0]})
applicant = self.browse(cr, uid, ids)[0]
if applicant['job_id'] :
emp_id = employee_obj.create(cr,uid,{'name':applicant['name'],'job_id':applicant['job_id']['id']})
job_data = job_obj.browse(cr,uid, [applicant['job_id']['id']])[0]
if applicant.job_id :
emp_id = employee_obj.create(cr,uid,{'name':applicant.name,'job_id':applicant.job_id.id})
job_data = job_obj.browse(cr,uid, applicant.job_id.id)
expected_emp = job_data['expected_employees'] - 1
job_obj.write(cr,uid, [applicant['job_id']['id']],{'expected_employees':expected_emp})
job_obj.write(cr,uid, [applicant.job_id.id],{'expected_employees':expected_emp})
return res