From da9ccf503a621de50f78b3920c8f40e4f12a2b97 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 3 Aug 2012 15:41:11 +0200 Subject: [PATCH] [FIX] fields.reference: missing coercion to int for res_id, as pointed out by XMO bzr revid: odo@openerp.com-20120803134111-jrzrszqobm0r02on --- openerp/osv/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 4fe3ab8fad7..fb13707d13d 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -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):