Add attributes sortable on fields_get for issue197

This commit is contained in:
Cédric Krier committed 2008-07-22 19:46:08 +02:00
1 parent 271ba1118e
commit fc2e8b3165
1 file changed
+3
+3
View File
@@ -1913,6 +1913,9 @@ class ORM(object):
if hasattr(self._columns[field], arg) \
and getattr(self._columns[field], arg):
res[field][arg] = getattr(self._columns[field], arg)
if isinstance(self._columns[field], fields.Function) \
and not self._columns[field].order_field:
res[field]['sortable'] = False
# translate the field label
res_trans = translation_obj._get_source(cursor,