openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #17792
[Bug 1070757] Re: [wishlist] _order and _parent_order should support sorting using inherited fields and many2one fields and translatable fields
you may look into
http://bazaar.launchpad.net/~c2c/c2c-rd-addons/7.0/files/head:/one2many_sorted/
which solves the problem for o2m and we use it in many reports int his
branch
sorted output is a basic need for wherever many (>5-10) records are
displayed/printed
(Bad) Examples are many menus like Settings, all Configuration sub
menus, access rights, .....
I agree that alphabetic is not a solution for everything, but at least
one CAN remember the name and will FIND the item easily.
--
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/1070757
Title:
[wishlist] _order and _parent_order should support sorting using
inherited fields and many2one fields and translatable fields
Status in OpenERP Server:
Confirmed
Bug description:
If object (e.g. sale.order) is sorted by many2one (e.g. _order =
'user_id'), sorting is done by value of sale order table (user_id,
integer) excluding many2one field value (e.g. user name).
From the technical side I see that orm.py _generate_order_by method is
not fully used when _search is done.
One of fix is to set self.order for the _search function if it's order
parameter is None.
To reproduce bug:
1. set _order = 'user_id' for the sale_order
2. create user with name 'C'
3. create user with name 'A'
4. create user with name 'B'
5. Create sale orders and assign each user to sale order
6. Open sale_order list
Result observed:
Sale orders order are: C, A, B
Result expected:
Sale orders order are: A, B, C
I've attached screenshot. Used trunk rev: 4504
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1070757/+subscriptions
References