summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2017-03-27 16:28:08 +0200
committerMartin Geubelle <mge@odoo.com>2017-03-27 16:28:46 +0200
commit3d0db90dae1ebb5fa6efbab27a0c2563b8371c4e (patch)
tree0db6e7fee637aa443efd063fe817294aeaacfa0a /addons
parent5a7db15aff7d88d689bf5f4e0d08dedff954ba6e (diff)
[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`.
Diffstat (limited to 'addons')
-rw-r--r--addons/web_kanban/static/src/js/kanban_view.js2
1 files changed, 1 insertions, 1 deletions
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) {