From 013baed41376f3b5b84bfa4a29cacb3774af6e28 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Mon, 7 May 2018 15:19:08 +0200 Subject: [FIX] web: navigate through records in Kanban with progressbar Recently, rev. c0809dd41 removed a protection in the reload of Kanban views with progressbars. This protection ensured that the manual reload of the progressbars was only done when one of the records of the Kanban view was updated (and not when a column, or the whole view was). However, removing it highlighted a bug linked to the manual reload of progressbars, which messed up the list of ids in the environment. As a consequence, for instance, if the user archived the records of a column, and then opendc a record in form view, it couldn't use the pager anymore. Besides fixing this bug, this rev. re-introduces the protection, and refines it to prevent 2 useless RPCs when the whole Kanban view was reloaded. opw~1841276 opw~1841342 --- addons/web/static/src/js/views/basic/basic_model.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'addons/web/static/src/js/views/basic/basic_model.js') diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index d325d558b96..9e8afe1629f 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -3864,11 +3864,13 @@ var BasicModel = AbstractModel.extend({ }); } return $.when.apply($, defs).then(function () { - // generate the res_ids of the main list, being the concatenation - // of the fetched res_ids in each group - list.res_ids = _.flatten(_.map(arguments, function (group) { - return group ? group.res_ids : []; - })); + if (!options || !options.onlyGroups) { + // generate the res_ids of the main list, being the concatenation + // of the fetched res_ids in each group + list.res_ids = _.flatten(_.map(arguments, function (group) { + return group ? group.res_ids : []; + })); + } return list; }); }); -- cgit v1.2.3