cannot search() entries with order "id DESC"
Bug #1044341 reported by
Florent
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) | Status tracked in Trunk | |||||
6.1 |
Fix Released
|
Low
|
OpenERP Publisher's Warranty Team | |||
Trunk |
Fix Released
|
Low
|
OpenERP's Framework R&D |
Bug Description
Hello,
I've experienced this bug both with 6.1 and with trunk.
When using the optional argument "order" for the osv method search(), the choice "id DESC" will sort ascending (like "id ASC" or plain "id").
It is not possible to sort by "id DESC".
The issue is in openerp.
When the field is "id", the direction is not taken into account.
http://
Please fix it for the supported branch 6.1 and for trunk.
--
Florent
Related branches
lp:~openerp-dev/openobject-server/6.1-opw-575909-rgo
- Rifakat Husen (OpenERP) (community): Approve
- Florent (community): Approve (all)
- Naresh(OpenERP): Pending requested
-
Diff: 12 lines (+1/-1)1 file modifiedopenerp/osv/orm.py (+1/-1)
lp:~openerp-dev/openobject-server/trunk-bug-1044341-tta
Rejected
for merging
into
lp:openobject-server
- OpenERP Core Team: Pending requested
-
Diff: 14 lines (+2/-2)1 file modifiedopenerp/osv/orm.py (+2/-2)
Changed in openobject-server: | |
status: | New → Confirmed |
importance: | Undecided → Low |
assignee: | nobody → OpenERP Publisher's Warranty Team (openerp-opw) |
tags: | added: maintenance |
To post a comment you must log in.
The issue is also visible when clicking the header "ID" of the column in tree view: it never sorts descending.
The "_order" attribute of BaseModel is not affected. If you put _order='id DESC', the entries are displayed in descending order.
However, as soon as you click the header "ID", the direction "descending" is lost.