← Back to team overview

openerp-india team mailing list archive

[Bug 1070757] Re: [wishlist] _order and _parent_order should support sorting using inherited fields and many2one fields and translatable fields

 

A fix landed in trunk at revision 4669 (revid
tde@xxxxxxxxxxx-20121210154652-6sab9usb38i7adlh). order and _order
parameters are now handled the same way by the ORM, as this solution as
been found to be acceptable to uniformize and clean the behavior of
those parameters (see discussions in the various merge proposals).

Regards,

Thibault.

** Changed in: openobject-server
       Status: Confirmed => Fix Released

-- 
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:
  Fix Released

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