openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #15102
[Bug 1044341] Re: cannot search() entries with order "id DESC"
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.
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1044341
Title:
cannot search() entries with order "id DESC"
Status in OpenERP Server:
New
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.osv.orm.BaseModel._generate_order_by(...).
When the field is "id", the direction is not taken into account.
http://bazaar.launchpad.net/~openerp/openobject-server/trunk/view/head:/openerp/osv/orm.py#L4616
Please fix it for the supported branch 6.1 and for trunk.
--
Florent
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1044341/+subscriptions
References