From 7f10ef33aaa1dcb415796e70237a5a7e9cc7f4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 23 Jan 2009 23:51:02 +0100 Subject: [PATCH] Don't order by selection translated if order_field is not None --- 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 be70e0ada7..dbd065a7e6 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -3053,7 +3053,8 @@ class ORM(object): return order_by, tables, tables_args if field_name in self._columns \ - and self._columns[field_name]._type == 'selection': + and self._columns[field_name]._type == 'selection' \ + and self._columns[field_name].order_field is None: selections = self.fields_get(cursor, user, [field_name], context=context)[field_name]['selection'] if not isinstance(selections, (tuple, list)):