[FIX] fields.reference: missing coercion to int for res_id, as pointed out by XMO

bzr revid: odo@openerp.com-20120803134111-jrzrszqobm0r02on
This commit is contained in:
Olivier Dony
2012-08-03 15:41:11 +02:00
parent bc70c8711b
commit da9ccf503a
+1 -1
View File
@@ -203,7 +203,7 @@ class reference(_column):
model_name, res_id = value.split(',')
model = obj.pool.get(model_name)
if model and res_id:
return model.name_get(cr, uid, [res_id], context=context)[0][1]
return model.name_get(cr, uid, [int(res_id)], context=context)[0][1]
return tools.ustr(value)
class char(_column):