[IMP] improve code

bzr revid: fka@tinyerp.com-20121205085819-d6i1ool120ax8uft
This commit is contained in:
Foram Katharotiya (OpenERP) 2012-12-05 14:28:19 +05:30
parent 48f9d6ca8f
commit fce2550ac1
1 changed files with 1 additions and 1 deletions

View File

@ -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)