[FIX] orm/fields.function: function/related fields with type=m2o must properly return tuples (name_get)

bzr revid: odo@openerp.com-20100813002321-13vb9675qvqr16kc
This commit is contained in:
Olivier Dony 2010-08-13 02:23:21 +02:00
parent 57191c139d
commit 3e858f1da5
1 changed files with 3 additions and 1 deletions

View File

@ -657,7 +657,9 @@ class function(_column):
self.selectable = False
if store:
self._classic_read = True
if self._type != 'many2one':
# m2o fields need to return tuples with name_get, not just foreign keys
self._classic_read = True
self._classic_write = True
if type=='binary':
self._symbol_get=lambda x:x and str(x)