[FIX]hr_recruitment: fix onchange_job user_id referenced before assignment

This commit is contained in:
Cedric Snauwaert
2014-07-09 11:15:19 +02:00
parent c2868af0ad
commit 48d570aa31
+1
View File
@@ -253,6 +253,7 @@ class hr_applicant(osv.Model):
def onchange_job(self, cr, uid, ids, job_id=False, context=None):
department_id = False
user_id = False
if job_id:
job_record = self.pool.get('hr.job').browse(cr, uid, job_id, context=context)
department_id = job_record and job_record.department_id and job_record.department_id.id or False