[FIX] only probability > 0 for stage assignation when convertion of lead into opportunity

bzr revid: acl@openerp.com-20130103133841-oeadynn3lctw1uu8
This commit is contained in:
Anael Closson 2013-01-03 14:38:41 +01:00
parent ddc024b473
commit 9bd0ccb864
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 {