From 6f12f4ba67142771e4cf4ddbef800a0ae775c62e Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 6 Mar 2014 15:36:21 +0100 Subject: [PATCH] [FIX] crm: lead_to_opp wizard, use email address to find duplicated lead in single convert lead to opp bzr revid: dle@openerp.com-20140306143621-z5mgcl2cm7kn6we0 --- addons/crm/wizard/crm_lead_to_opportunity.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index 10b69e793ef..33bdb46452d 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -69,11 +69,10 @@ class crm_lead2opportunity_partner(osv.osv_memory): if context.get('active_id'): tomerge = [int(context['active_id'])] - email = False partner_id = res.get('partner_id') lead = lead_obj.browse(cr, uid, int(context['active_id']), context=context) + email = lead.partner_id and lead.partner_id.email or lead.email_from - #TOFIX: use mail.mail_message.to_mail tomerge.extend(self._get_duplicated_leads(cr, uid, partner_id, email)) tomerge = list(set(tomerge))