[FIX] osv/orm: fixed the use of 'order' argument given to a search function in order to allow to order by 'ID DESC' and by '<another valid order> + ID ASC/DESC'

bzr revid: qdp-launchpad@openerp.com-20121121130736-guj7np9nk65zx3o1
This commit is contained in:
Quentin (OpenERP) 2012-11-21 14:07:36 +01:00
parent b4742249b4
commit 18b7592b8d
1 changed files with 1 additions and 1 deletions

View File

@ -4722,7 +4722,7 @@ class BaseModel(object):
order_direction = order_split[1].strip() if len(order_split) == 2 else ''
inner_clause = None
if order_field == 'id':
order_by_clause = '"%s"."%s"' % (self._table, order_field)
order_by_elements.append('"%s"."id" %s' % (self._table, order_direction))
elif order_field in self._columns:
order_column = self._columns[order_field]
if order_column._classic_read: