[FIX] web: do not apply default_order if list grouped

If the list view is grouped (with a groubpy filter),
the default order must always be the order of the groupby
This commit is contained in:
Denis Ledoux 2015-02-09 14:43:43 +01:00
parent 05e1b3d5ea
commit ca7036776d
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
//Sort
var default_order = this.fields_view.arch.attrs.default_order,
unsorted = !this.dataset._sort.length;
if (unsorted && default_order) {
if (unsorted && default_order && !this.grouped) {
this.dataset.set_sort(default_order.split(','));
}