[FIX] crm: mass assign were not always deduplicating
bzr revid: dle@openerp.com-20140127103816-t9pga6sohbxaw5ux
This commit is contained in:
parent
c76e580da5
commit
567be50d0a
|
@ -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)
|
||||
|
|
|
@ -59,9 +59,9 @@
|
|||
<field name="section_id" groups="base.group_multi_salesteams"/>
|
||||
<field name="user_ids" widget="many2many_tags"/>
|
||||
</group>
|
||||
<label for="opportunity_ids" string="Leads with existing duplicates (for information)" help="Leads that you selected that have duplicates. If the list is empty, it means that no duplicates were found"/>
|
||||
<label for="opportunity_ids" string="Leads with existing duplicates (for information)" help="Leads that you selected that have duplicates. If the list is empty, it means that no duplicates were found" attrs="{'invisible': [('deduplicate', '=', False)]}"/>
|
||||
<group attrs="{'invisible': [('deduplicate', '=', False)]}">
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1">
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1" readonly="1">
|
||||
<tree create="false" delete="false">
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
|
|
Loading…
Reference in New Issue