From ca1f1732d6555d20bba8bdb1e698cf9ecb9e4122 Mon Sep 17 00:00:00 2001 From: Vishmita Date: Tue, 18 Dec 2012 13:35:34 +0530 Subject: [PATCH] [IMP]In HR > Applications,when change department it shouldn't change stage bzr revid: vja@tinyerp.com-20121218080534-tu8tlrjvoby38ydk --- addons/hr_recruitment/hr_recruitment.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index de1539da55a..786b6d06125 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -253,9 +253,8 @@ class hr_applicant(base_stage, osv.Model): return {'value': {'department_id': False}} def onchange_department_id(self, cr, uid, ids, department_id=False, context=None): - obj_recru_stage = self.pool.get('hr.recruitment.stage') - stage_ids = obj_recru_stage.search(cr, uid, ['|',('department_id','=',department_id),('department_id','=',False)], context=context) - stage_id = stage_ids and stage_ids[0] or False + stage_ids = self.browse(cr, uid,ids,context=context) + stage_id = stage_ids and stage_ids[0].stage_id.id or False return {'value': {'stage_id': stage_id}} def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):