From 2917b38f28d5c2d6c53c706e613da7b8e2ad7b52 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 14 Aug 2018 12:08:04 +0200 Subject: [PATCH] [FIX] crm: do not consider leads without emails as duplicated --- addons/crm/crm_lead.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index bdc01a8781b..8d8fac62078 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -607,6 +607,8 @@ class crm_lead(format_address, osv.osv): """ Search for opportunities that have the same partner and that arent done or cancelled """ + if not email: + return [] partner_match_domain = [] for email in set(email_split(email) + [email]): partner_match_domain.append(('email_from', '=ilike', email))