From bbeb6e60aae5fa224f7346a4c58b515274ab023b Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 16 Oct 2013 17:34:57 +0200 Subject: [PATCH] [FIX]crm: leads/opps merge order, condition was not correct: lead/opp with stage sequence = 1 where regarded as canceled, or they are acutally regarded as new. bzr revid: dle@openerp.com-20131016153457-42a235ks80226b8o --- addons/crm/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index a4350e5ce5b..046d4419809 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -616,7 +616,7 @@ class crm_lead(format_address, osv.osv): # An Opportunity always has higher confidence level than a lead, unless its stage probability is 0.0 for opportunity in opportunities: sequence = -1 - if opportunity.stage_id and opportunity.stage_id.probability != 0 and opportunity.stage_id.sequence != 1: + if opportunity.stage_id and (opportunity.stage_id.probability != 0 or opportunity.stage_id.sequence == 1): sequence = opportunity.stage_id.sequence sequenced_opps.append(((int(sequence != -1 and opportunity.type == 'opportunity'), sequence, -opportunity.id), opportunity))