[FIX] kanban: respect default_order when a groupby is active
The `default_order` attribute of a <kanban> view was applied
for a non-grouped kanban view, but was simply ignored when
the kanban view was grouped, a common situation.
When a groupby is active, the main order is the column being
grouped, but the `default_order` is still useful as
a secondary sort ordering, within the kanban columns.
This patch complements the original patch of
rev. 5c0804eaef
from PR #520.
This commit is contained in:
parent
8b6d72d8c8
commit
52fe671e61
|
@ -279,6 +279,9 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
|
||||||
var def = $.when([]);
|
var def = $.when([]);
|
||||||
var dataset = new instance.web.DataSetSearch(self, self.dataset.model,
|
var dataset = new instance.web.DataSetSearch(self, self.dataset.model,
|
||||||
new instance.web.CompoundContext(self.dataset.get_context(), group.model.context()), group.model.domain());
|
new instance.web.CompoundContext(self.dataset.get_context(), group.model.context()), group.model.domain());
|
||||||
|
if (self.dataset._sort) {
|
||||||
|
dataset.set_sort(self.dataset._sort);
|
||||||
|
}
|
||||||
if (group.attributes.length >= 1) {
|
if (group.attributes.length >= 1) {
|
||||||
def = dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit });
|
def = dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue