From: Denis Ledoux Date: Wed, 16 Oct 2013 15:34:57 +0000 (+0200) Subject: [FIX]crm: leads/opps merge order, condition was not correct: lead/opp with stage... X-Git-Tag: InsPy_master01~869^2~13 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=bbeb6e60aae5fa224f7346a4c58b515274ab023b;p=odoo%2Fodoo.git [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 --- diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index a4350e5..046d441 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))