diff --git a/addons/web_kanban/static/src/js/kanban.js b/addons/web_kanban/static/src/js/kanban.js index 187694693b0..41b3b58e9bf 100644 --- a/addons/web_kanban/static/src/js/kanban.js +++ b/addons/web_kanban/static/src/js/kanban.js @@ -259,10 +259,13 @@ instance.web_kanban.KanbanView = instance.web.View.extend({ var remaining = groups.length - 1, groups_array = []; return $.when.apply(null, _.map(groups, function (group, index) { + var def = $.when([]); var dataset = new instance.web.DataSetSearch(self, self.dataset.model, new instance.web.CompoundContext(self.dataset.get_context(), group.model.context()), group.model.domain()); - return dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }) - .then(function(records) { + if (group.attributes.length >= 1) { + def = dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit }); + } + return def.then(function(records) { self.dataset.ids.push.apply(self.dataset.ids, dataset.ids); groups_array[index] = new instance.web_kanban.KanbanGroup(self, records, group, dataset); if (!remaining--) {