[FIX] orm: grouping of date and datetime conflicts ordering on dates with date and datetime - hotfix
bzr revid: acl@openerp.com-20140220135127-1hh7s6dx6p2wuhz9
This commit is contained in:
parent
7080279bde
commit
5e593b34d0
|
@ -2609,6 +2609,9 @@ class BaseModel(object):
|
|||
for order_splits in orderby.split(','):
|
||||
order_split = order_splits.split()
|
||||
orderby_field = order_split[0]
|
||||
if isinstance(self._all_columns[orderby_field].column, openerp.osv.fields.date) or \
|
||||
isinstance(self._all_columns[orderby_field].column, openerp.osv.fields.datetime):
|
||||
continue
|
||||
orderby_dir = len(order_split) == 2 and order_split[1].upper() == 'ASC' and 'ASC' or 'DESC'
|
||||
if orderby_field == groupby:
|
||||
orderby_item = self._generate_order_by(order_splits, query).replace('ORDER BY ', '')
|
||||
|
|
Loading…
Reference in New Issue