[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
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user