From fce2550ac137fcfc610cecbe950ac6eec7195fa2 Mon Sep 17 00:00:00 2001 From: "Foram Katharotiya (OpenERP)" Date: Wed, 5 Dec 2012 14:28:19 +0530 Subject: [PATCH] [IMP] improve code bzr revid: fka@tinyerp.com-20121205085819-d6i1ool120ax8uft --- addons/crm/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 12888146ed9..02a8fc93d0e 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -282,7 +282,7 @@ class crm_lead(base_stage, format_address, osv.osv): obj_id = super(crm_lead, self).create(cr, uid, vals, context) section_id = self.browse(cr, uid, obj_id, context=context).section_id if section_id: - lead_subtype_ids = subtype_obj.search(cr, uid, ['|', ('res_model', '=', False), ('res_model', '=', 'crm.case.section')], context=context) + lead_subtype_ids = subtype_obj.search(cr, uid, ['|', ('res_model', '=', False), ('res_model', '=', self._name)], context=context) lead_subtypes = subtype_obj.browse(cr, uid, lead_subtype_ids, context=context) followers = [follow.id for follow in section_id.message_follower_ids] follower_ids = follower_obj.search(cr, uid, [('res_model', '=', 'crm.case.section'), ('res_id', '=', section_id)], context=context)