From c2ba5ef3de7df825b56ee2026fe81f7994f86850 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 12 Nov 2019 09:48:10 +0000 Subject: [PATCH] [FIX] web: avoid domains with empty list After loading the calendar view, making a search with an inactive domain in the list will trigger a search "partner_ids not in []" which returns zero result. The code intention was to initialise the avoidValues, not to send an empty list. To reproduce the issue: 1. create an event shared between user 1 and 2 2. as user 2, open the Calendar menu -> shared event is present 3. click on "week" tab (forcing a refresh) -> shared event no longer appears Fixes odoo/odoo#39839 closes odoo/odoo#40264 X-original-commit: 299a6dbcb53e583b177079116ada63a1255d1cfa Signed-off-by: Martin Trigaux (mat) --- addons/web/static/src/js/views/calendar/calendar_model.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 39253da7bac..18a13d0157e 100644 --- a/addons/web/static/src/js/views/calendar/calendar_model.js +++ b/addons/web/static/src/js/views/calendar/calendar_model.js @@ -384,10 +384,10 @@ return AbstractModel.extend({ authorizedValues[filter.fieldName].push(f.value); } } else { - if (!avoidValues[filter.fieldName]) - avoidValues[filter.fieldName] = []; - if (!f.active) { + if (!avoidValues[filter.fieldName]) + avoidValues[filter.fieldName] = []; + avoidValues[filter.fieldName].push(f.value); } }