From e4cffe267efb63efc6e59f2ccc3da0df1537e70d Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Fri, 22 Mar 2013 16:01:10 +0100 Subject: [PATCH] [FIX] crm_lead bzr revid: chm@openerp.com-20130322150110-mdgra3ppqui5eanj --- 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 4dfef9f1f46..1f601c3edcf 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -94,7 +94,7 @@ class crm_lead(base_stage, format_address, osv.osv): def onchange_user_id(self, cr, uid, ids, section_id, user_id, context=None): if user_id: section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context) - if section_id not in section_ids: + if section_id and section_id not in section_ids: section_id = section_ids[0] return {'value': {'section_id': section_id}}