From accf7193744d4a42c3483f3cb08d430ceeb4e899 Mon Sep 17 00:00:00 2001 From: bth-openerp Date: Mon, 19 Aug 2013 12:14:10 +0530 Subject: [PATCH] [IMP]Added field value in write method. bzr revid: bth@tinyerp.com-20130819064410-52iu2dh3izt3256r --- addons/hr_recruitment/hr_recruitment.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index a6d74efc6fe..bd4f6c099f7 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -231,12 +231,6 @@ class hr_applicant(osv.Model): 'stage_id': _read_group_stage_ids } - def write(self, cr, uid, ids, vals, context=None): - for data in self.browse(cr, uid, ids, context=context): - if vals.get('stage_id'): - vals['previous_stage_id'] = data.stage_id.id - return super(hr_applicant, self).write(cr, uid, ids, vals, context=context) - def onchange_job(self, cr, uid, ids, job_id=False, context=None): if job_id: job_record = self.pool.get('hr.job').browse(cr, uid, job_id, context=context) @@ -402,6 +396,9 @@ class hr_applicant(osv.Model): # stage change: update date_last_stage_update if 'stage_id' in vals: vals['date_last_stage_update'] = fields.datetime.now() + for data in self.browse(cr, uid, ids, context=context): + vals['previous_stage_id'] = data.stage_id.id + # user_id change: update date_start if vals.get('user_id'): vals['date_start'] = fields.datetime.now()