Don't prefetch text and binary field in BrowseRecord

This commit is contained in:
Cédric Krier committed 2009-01-05 14:09:34 +01:00
1 parent 407193bf77
commit 8daffb9c3f
1 file changed
+4 -2
+4 -2
View File
@@ -126,7 +126,8 @@ class BrowseRecord(object):
# if the field is a classic one or a many2one,
# we'll fetch all classic and many2one fields
if col._classic_write and not col.translate:
if col._classic_write and not col.translate \
and col._type not in ('text', 'binary'):
# gen the list of "local" (ie not inherited)
# fields which are classic or many2one
ffields = [x for x in self._table._columns.items() \
@@ -137,7 +138,8 @@ class BrowseRecord(object):
# complete the field list with the inherited fields
# which are classic or many2one
ffields += [x for x in inherits if x[1]._classic_write \
and not x[1].translate]
and not x[1].translate \
and x[1]._type not in ('text', 'binary')]
# otherwise we fetch only that field
else:
ffields = [(name, col)]