From 0d01561462a6eed1a4c7112e043f56a78f06341b Mon Sep 17 00:00:00 2001 From: "Andrea Grazioso (agr-odoo)" Date: Thu, 11 Mar 2021 16:19:33 +0000 Subject: [PATCH] [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#68118 X-original-commit: 0ae22aa773f9343fc79937cceb5bf60c5fb3ba3c Signed-off-by: Nicolas Lempereur (nle) Signed-off-by: agr-odoo --- addons/web/static/src/js/views/calendar/calendar_model.js | 4 ++++ 1 file changed, 4 insertions(+) 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 0948383b021..cb0eeec5143 100644 --- a/addons/web/static/src/js/views/calendar/calendar_model.js +++ b/addons/web/static/src/js/views/calendar/calendar_model.js @@ -615,6 +615,10 @@ return AbstractModel.extend({ return; } + _.each(filter.filters, function (filter) { + filter.display = !filter.active; + }); + var fs = []; var undefined_fs = []; _.each(events, function (event) {