From c7fd06cf77c9f42cfd689c1ec27a94b6b79763f9 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Fri, 19 Feb 2016 12:54:15 +0100 Subject: [PATCH] [FIX] crm: don't add explicit '&' because it is not mandatory and can causes other bug if domain is empty [], the search_domain generated will be invalid ['&',('field','=', value)] --- 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 18c5fa637f6..71fa808ab38 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -323,7 +323,7 @@ class crm_lead(format_address, osv.osv): else: search_domain = [('team_id', '=', False)] # AND with the domain in parameter - search_domain = ['&'] + list(domain) + search_domain + search_domain += list(domain) # perform search, return the first found stage_ids = self.pool.get('crm.stage').search(cr, uid, search_domain, order=order, limit=1, context=context) if stage_ids: