openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16978
[Bug 1070757] [NEW] [6.0, 6.1, trunk] Sorting object by many2one field fail
Public bug reported:
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
** Affects: openobject-server
Importance: Undecided
Status: New
--
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:
[6.0, 6.1, trunk] Sorting object by many2one field fail
Status in OpenERP Server:
New
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
Follow ups
-
[Bug 1070757] Re: [wishlist] _order and _parent_order should support sorting using inherited fields and many2one fields and translatable fields
From: OpenERP, 2012-12-10
-
[Bug 1070757] Re: [wishlist] _order and _parent_order should support sorting using inherited fields and many2one fields and translatable fields
From: Launchpad Bug Tracker, 2012-12-10
-
[Bug 1070757] Re: [wishlist] _order and _parent_order should support sorting using inherited fields and many2one fields and translatable fields
From: Ferdinand @ Camptocamp, 2012-11-15
-
[Bug 1070757] Re: [wishlist] _order should support sorting using inherited fields and many2one fields and translatable fields
From: Cedric Snauwaert (OpenERP), 2012-11-15
-
[Bug 1070757] Re: [6.0, 6.1, trunk] Sorting object by many2one field fail
From: Olivier Dony (OpenERP), 2012-10-24
-
[Bug 1070757] Re: [6.0, 6.1, trunk] Sorting object by many2one field fail
From: Paulius Sladkevičius, 2012-10-24
-
[Bug 1070757] [NEW] [6.0, 6.1, trunk] Sorting object by many2one field fail
From: Paulius Sladkevičius, 2012-10-24
References