[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)]
This commit is contained in:
Jeremy Kersten
2016-02-19 12:54:18 +01:00
parent e3714cd7ce
commit c7fd06cf77
+1 -1
View File
@@ -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: