Merge lp:~openerp-dev/openerp-web/6.1-opw-581785-cbi into lp:openerp-web/6.1
Status: | Needs review |
---|---|
Proposed branch: | lp:~openerp-dev/openerp-web/6.1-opw-581785-cbi |
Merge into: | lp:openerp-web/6.1 |
Diff against target: |
15 lines (+5/-0) 1 file modified
addons/web/static/src/js/data.js (+5/-0) |
To merge this branch: | bzr merge lp:~openerp-dev/openerp-web/6.1-opw-581785-cbi |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+134066@code.launchpad.net |
Description of the change
The bug that was encountered: When sorting by product on pricelist versions, you get a wrong order.
The reason: The web client does this by comapring using < and >. If the field is a many2one (as in this case), its value is an array [id, name]. Thus, using < and > on arrays does a comapre on the first element first. The products are does sorted by id, and not by name.
The fix: This introduces a check to see whether the field is a many2one field. In that case, I explicitly do a compare of the 2nd element in the array to correctly sort by name.
Unmerged revisions
- 2480. By Chris Biersbach (OpenERP)
-
[FIX] When sorting by a many2one field in list view, the id was taken as sorting criterium. THis now detects many2one fields and instead uses the name to get behavior consistent with what the user expects.