From fc2e8b3165b00159e87f7bf7d09dd00c5c310c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 22 Jul 2008 19:46:08 +0200 Subject: [PATCH] Add attributes sortable on fields_get for issue197 --- trytond/osv/orm.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index fbff9f8d23..ae7bfe4673 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -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,