[Fix] crm : fix the log message

bzr revid: sbh@tinyerp.com-20110117135706-mgwjddzdtoqkl8mi
This commit is contained in:
UCO(OpenERP) 2011-01-17 19:27:06 +05:30 committed by Sbh (OpenERP)
parent a7f4b3c3d1
commit 758f918bc8
1 changed files with 2 additions and 2 deletions

View File

@ -301,9 +301,9 @@ class crm_lead(crm_case, osv.osv):
message=''
for case in self.browse(cr, uid, ids, context=context):
if case.type == 'lead' or context.get('stage_type',False)=='lead':
message = _("The stage of lead '%s' has been changed to '%s'.") % (case.name, case.stage_id.name)
message = _("The stage of lead '%s' has been changed to '%s'.") % (case.name, stage_obj.name)
elif case.type == 'opportunity':
message = _("The stage of opportunity '%s' has been changed to '%s'.") % (case.name, case.stage_id.name)
message = _("The stage of opportunity '%s' has been changed to '%s'.") % (case.name, stage_obj.name)
self.log(cr, uid, case.id, message)
return super(crm_lead,self).write(cr, uid, ids, vals, context)