From 3d0db90dae1ebb5fa6efbab27a0c2563b8371c4e Mon Sep 17 00:00:00 2001 From: Martin Geubelle Date: Mon, 27 Mar 2017 16:28:08 +0200 Subject: [PATCH] [FIX] web_kanban: do no read something you already know When the groups are loaded in the kanban view, a `read` is done on the relation model to load extra fields. This `read` was done regardless if there really were extra fields to read. This is a priori not a big issue, except if the user has no read access to the relation model and can only perform a `name_get`. --- addons/web_kanban/static/src/js/kanban_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_kanban/static/src/js/kanban_view.js b/addons/web_kanban/static/src/js/kanban_view.js index 30a3517a7bc..33b7e75af38 100644 --- a/addons/web_kanban/static/src/js/kanban_view.js +++ b/addons/web_kanban/static/src/js/kanban_view.js @@ -229,7 +229,7 @@ var KanbanView = View.extend({ // fetch group data (display information) var group_ids = _.without(_.map(groups, function (elem) { return elem.attributes.value[0];}), undefined); - if (options.grouped_by_m2o && group_ids.length) { + if (options.grouped_by_m2o && group_ids.length && group_by_fields_to_read.length) { return new data.DataSet(self, options.relation) .read_ids(group_ids, _.union(['display_name'], group_by_fields_to_read)) .then(function(results) {