From 0ae22aa773f9343fc79937cceb5bf60c5fb3ba3c Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Thu, 11 Mar 2021 16:19:33 +0000 Subject: [FIX] web: hide filters not relevant to the current screen Open Calendar weekly view Scroll the weeks The 'Responsible' filter will accumulate entries from the events and not deleting them. This create issue with the view in db with heavy calendar use and a lot of responsibles This reverts commit 64d0fe411840fb43c96f0252a7ff5e74bd7cdc90, coming from task 2146842, addressing the following issue in calendar view (i.e. in planning app) not reproducible anymore " In calendar view, when you unselect all filters of a category, all events disappear (it's expected), but all filters also disappear. So you can't selectd anything, you must reload the view to unlock the situation. " opw-2479920 closes odoo/odoo#67710 Signed-off-by: Nicolas Lempereur (nle) --- addons/web/static/src/js/views/calendar/calendar_model.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addons/web/static/src') diff --git a/addons/web/static/src/js/views/calendar/calendar_model.js b/addons/web/static/src/js/views/calendar/calendar_model.js index b9950426af1..50b187c0c6f 100644 --- a/addons/web/static/src/js/views/calendar/calendar_model.js +++ b/addons/web/static/src/js/views/calendar/calendar_model.js @@ -614,6 +614,10 @@ return AbstractModel.extend({ return; } + _.each(filter.filters, function (filter) { + filter.display = !filter.active; + }); + var fs = []; var undefined_fs = []; _.each(events, function (event) { -- cgit v1.2.3