[FIX] sale_crm: correctly return id only (would break if readonly field)

bzr revid: mat@openerp.com-20131122142211-pvbw55ikk74132zm
This commit is contained in:
Martin Trigaux 2013-11-22 15:22:11 +01:00
parent 56d579b1e0
commit d96d2d8725
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ class crm_make_sale(osv.osv_memory):
if not active_id:
return False
lead = lead_obj.read(cr, uid, active_id, ['partner_id'])
return lead['partner_id']
lead = lead_obj.read(cr, uid, active_id, ['partner_id'], context=context)
return lead['partner_id'][0]
def view_init(self, cr, uid, fields_list, context=None):
return super(crm_make_sale, self).view_init(cr, uid, fields_list, context=context)