[MERGE] only probability > 0 for stage assigned to leads into opportunities.

bzr revid: chs@openerp.com-20130103140830-q3bo9vbtbgcr9iiv
This commit is contained in:
Christophe Simonis 2013-01-03 15:08:30 +01:00
commit 8c2999d35c
1 changed files with 2 additions and 2 deletions

View File

@ -680,9 +680,9 @@ class crm_lead(base_stage, format_address, osv.osv):
section_id = lead.section_id and lead.section_id.id or False
if section_id:
stage_ids = crm_stage.search(cr, uid, [('sequence','>=',1), ('section_ids','=', section_id)])
stage_ids = crm_stage.search(cr, uid, [('sequence', '>=', 1), ('section_ids', '=', section_id), ('probability', '>', 0)])
else:
stage_ids = crm_stage.search(cr, uid, [('sequence','>=',1)])
stage_ids = crm_stage.search(cr, uid, [('sequence', '>=', 1), ('probability', '>', 0)])
stage_id = stage_ids and stage_ids[0] or False
return {