diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index e80cf5ee285..3707e318b10 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -704,7 +704,10 @@ class crm_lead(format_address, osv.osv): 'date_conversion': fields.datetime.now(), } if not lead.stage_id or lead.stage_id.type=='lead': - val['stage_id'] = self.stage_find(cr, uid, [lead], team_id, [('type', 'in', ('opportunity', 'both'))], context=context) + stage_id = self.stage_find(cr, uid, [lead], team_id, [('type', 'in', ['opportunity', 'both'])], context=context) + val['stage_id'] = stage_id + if stage_id: + val['probability'] = self.pool['crm.stage'].browse(cr, uid, stage_id, context=context).probability return val def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, team_id=False, context=None):