diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 9baade2d2f..819b24d447 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -2984,6 +2984,10 @@ class ORM(object): and self._columns[field_name]._type == 'selection': selections = self.fields_get(cursor, user, [field_name], context=context)[field_name]['selection'] + if not isinstance(selections, (tuple, list)): + selections = getattr(self, + self._columns[field_name].selection)(cursor, + user, context=context) order = 'CASE ' + table_name + '.' + field_name for selection in selections: order += ' WHEN \'%s\' THEN \'%s\'' % selection