From 37e2e524fb4aeeb1a79b520e42afb9c2de35ba75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 27 Jan 2009 00:46:53 +0100 Subject: [PATCH] Disable by default sort on One2Many fields --- trytond/osv/orm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index e82e52721e..f5333c13d7 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -2020,7 +2020,8 @@ class ORM(object): and getattr(self._columns[field], arg): res[field][arg] = copy.copy(getattr(self._columns[field], arg)) - if isinstance(self._columns[field], fields.Function) \ + if isinstance(self._columns[field], + (fields.Function, fields.One2Many)) \ and not self._columns[field].order_field: res[field]['sortable'] = False