From 567be50d0aa650366d8db47e4c2422f9edac2ab7 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 27 Jan 2014 11:38:16 +0100 Subject: [PATCH] [FIX] crm: mass assign were not always deduplicating bzr revid: dle@openerp.com-20140127103816-t9pga6sohbxaw5ux --- addons/crm/wizard/crm_lead_to_opportunity.py | 2 +- addons/crm/wizard/crm_lead_to_opportunity_view.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index e2fb70bfa56..21a553a59ff 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -257,7 +257,7 @@ class crm_lead2opportunity_mass_convert(osv.osv_memory): if data.name == 'convert' and data.deduplicate: merged_lead_ids = [] remaining_lead_ids = [] - for lead in data.opportunity_ids: + for lead in self.pool['crm.lead'].browse(cr, uid, context.get('active_ids', []), context=context): duplicated_lead_ids = self._get_duplicated_leads(cr, uid, lead.partner_id.id, lead.partner_id and lead.partner_id.email or lead.email_from) if len(duplicated_lead_ids) > 1: lead_id = self.pool.get('crm.lead').merge_opportunity(cr, uid, duplicated_lead_ids, False, False, context=context) diff --git a/addons/crm/wizard/crm_lead_to_opportunity_view.xml b/addons/crm/wizard/crm_lead_to_opportunity_view.xml index 130aa4192d6..58fbe244ba4 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity_view.xml +++ b/addons/crm/wizard/crm_lead_to_opportunity_view.xml @@ -59,9 +59,9 @@ -