summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSbh (OpenERP) <sbh@tinyerp.com>2010-12-17 18:20:28 +0530
committerSbh (OpenERP) <sbh@tinyerp.com>2010-12-17 18:20:28 +0530
commit3bbba67ea486cd2032b8740adca0a908f5d0cc4d (patch)
tree00873b39cb2bd16404a4e3c44a24c631cbe23c0e
parent06c40ea9526e34a170d209dd4d8ce575d4e76ac0 (diff)
parent69cadabda6ba99cef703a123323acb4afce6be0a (diff)
[MERGE] bug fix
bzr revid: sbh@tinyerp.com-20101217125028-zkmlmyj5be03s1h1
-rw-r--r--addons/crm/crm_lead.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 7aefcc3fb60..f1667282d65 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -302,12 +302,12 @@ class crm_lead(crm_case, osv.osv):
if 'stage_id' in vals and vals['stage_id']:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
self.history(cr, uid, ids, _('Stage'), details=stage_obj.name)
+ message=''
for case in self.browse(cr, uid, ids, context=context):
- if case.type == 'lead':
+ 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)
elif case.type == 'opportunity':
message = _("The stage of opportunity '%s' has been changed to '%s'.") % (case.name, case.stage_id.name)
- self.log(cr, uid, case.id, message)
return super(crm_lead,self).write(cr, uid, ids, vals, context)
def stage_next(self, cr, uid, ids, context=None):