From 6a1e65b5616df2ed0c0273481524f7dcee6f6ceb Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 6 Mar 2014 10:23:30 +0100 Subject: [PATCH] [FIX] crm: crm_to_lead tests, force assignation, to check round robin bzr revid: dle@openerp.com-20140306092330-wuhfw36f3xpwdy4d --- addons/crm/test/lead2opportunity_assign_salesmen.yml | 2 +- addons/crm/wizard/crm_lead_to_opportunity.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/test/lead2opportunity_assign_salesmen.yml b/addons/crm/test/lead2opportunity_assign_salesmen.yml index de88a96cb50..12d212ec5fd 100644 --- a/addons/crm/test/lead2opportunity_assign_salesmen.yml +++ b/addons/crm/test/lead2opportunity_assign_salesmen.yml @@ -65,7 +65,7 @@ Salesman create a mass convert wizard and convert all the leads. - !python {model: crm.lead2opportunity.partner.mass}: | - context.update({'active_model': 'crm.lead', 'active_ids': [ref("test_crm_lead_01"), ref("test_crm_lead_02"), ref("test_crm_lead_03"), ref("test_crm_lead_04"), ref("test_crm_lead_05"), ref("test_crm_lead_06")], 'active_id': ref("test_crm_lead_01")}) + context.update({'active_model': 'crm.lead', 'active_ids': [ref("test_crm_lead_01"), ref("test_crm_lead_02"), ref("test_crm_lead_03"), ref("test_crm_lead_04"), ref("test_crm_lead_05"), ref("test_crm_lead_06")], 'active_id': ref("test_crm_lead_01"), 'no_force_assignation': False}) id = self.create(cr, uid, {'user_ids': [(6, 0, [ref('test_res_user_01'), ref('test_res_user_02'), ref('test_res_user_03'), ref('test_res_user_04')])], 'section_id': ref('crm.section_sales_department'), 'deduplicate': False}, context=context) self.mass_convert(cr, uid, [id], context=context) - diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index ea95a3c5425..10b69e793ef 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -274,7 +274,7 @@ class crm_lead2opportunity_mass_convert(osv.osv_memory): active_ids = active_ids.union(remaining_lead_ids) ctx['active_ids'] = list(active_ids) # Remove me in trunk - ctx['no_force_assignation'] = True + ctx['no_force_assignation'] = ctx.get('no_force_assignation', True) # Uncomment me in trunk # ctx['no_force_assignation'] = not data.force_assignation return self.action_apply(cr, uid, ids, context=ctx)