[IMP] Improved write method for change stage id.

bzr revid: jra@tinyerp.com-20120229121004-5p1otoss3d9i8vzv
This commit is contained in:
Jiten (OpenERP)
2012-02-29 17:40:04 +05:30
parent 91a38360e4
commit 273472b095
+2 -2
View File
@@ -518,8 +518,8 @@ class hr_applicant(crm.crm_case, osv.osv):
def write(self, cr, uid, ids, vals, context=None):
if 'stage_id' in vals and vals['stage_id']:
stage = self.pool.get('hr.recruitment.stage').browse(cr, uid, vals['stage_id'], context=context)
text = _("Changed Stage to <b>%s</b>.") % stage.name
self.message_append(cr, uid, ids, text, body_text=text, context=context)
self.message_append_note(cr, uid, ids, _('System notification'),
_("Changed Stage to <b>%s</b>.") % stage.name, type='notification')
return super(hr_applicant,self).write(cr, uid, ids, vals, context=context)
hr_applicant()