From eb98ba3fd6a806ec062046983a4715f58b92b37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 17 Oct 2013 11:43:55 +0200 Subject: [PATCH] [FIX] list_view: when composing the active_domain in list view because of the list header being checked, also take into account the current action domain; bzr revid: tde@openerp.com-20131017094355-murxot4rqirw3g68 --- addons/web/static/src/js/view_list.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index f9ec22bf712..9c613935aa1 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -802,9 +802,11 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi }, /** * Calculate the active domain of the list view. This should be done only - * if the header checkbox has been checked. + * if the header checkbox has been checked. This is done by evaluating the + * search results, and then adding the dataset domain (i.e. action domain). */ get_active_domain: function () { + var self = this; if (this.$('.oe_list_record_selector').prop('checked')) { var search_view = this.getParent().searchview; var search_data = search_view.build_search_data(); @@ -813,7 +815,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi contexts: search_data.contexts, group_by_seq: search_data.groupbys || [] }).then(function (results) { - return results.domain; + var domain = self.dataset.domain.concat(results.domain || []); + return domain }); } else {