Merge lp:~unifield-team/unifield-web/listgrid-unlimited-pager-sort-fix into lp:unifield-web

Proposed by Vincent GREINER
Status: Rejected
Rejected by: jftempo
Proposed branch: lp:~unifield-team/unifield-web/listgrid-unlimited-pager-sort-fix
Merge into: lp:unifield-web
Diff against target: 16 lines (+5/-1)
1 file modified
addons/openerp/widgets/listgrid.py (+5/-1)
To merge this branch: bzr merge lp:~unifield-team/unifield-web/listgrid-unlimited-pager-sort-fix
Reviewer Review Type Date Requested Status
jftempo Pending
Review via email: mp+290723@code.launchpad.net

Description of the change

treeview, unlimited page size, sort was not working
(no order param passed to search orm method)

To post a comment you must log in.

Unmerged revisions

4786. By Vincent GREINER

[FIX] order column issue with unlimited paging / listgrid unlimited order: order was not properly injected (and was passed as 0)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/openerp/widgets/listgrid.py'
--- addons/openerp/widgets/listgrid.py 2016-03-16 15:50:01 +0000
+++ addons/openerp/widgets/listgrid.py 2016-04-01 12:02:07 +0000
@@ -184,7 +184,11 @@
184 else:184 else:
185 ids = proxy.search(search_param, self.offset, self.limit, False, context)185 ids = proxy.search(search_param, self.offset, self.limit, False, context)
186 else:186 else:
187 ids = proxy.search(search_param, 0, 0, 0, context)187 if self.sort_key:
188 sort = self.sort_key + ' ' + self.sort_order + ',id'
189 else:
190 sort = False
191 ids = proxy.search(search_param, 0, 0, sort, context)
188 if len(ids) < self.limit:192 if len(ids) < self.limit:
189 if self.offset > 0:193 if self.offset > 0:
190 self.count = len(ids) + self.offset194 self.count = len(ids) + self.offset

Subscribers

People subscribed via source and target branches

to all changes: