diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-11-12 09:48:10 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-11-14 12:57:16 +0000 |
| commit | c2ba5ef3de7df825b56ee2026fe81f7994f86850 (patch) | |
| tree | 0806fa83ccad50037911cea824c68bb1d706de0a /addons/web/static/src | |
| parent | 4e3e268083e2f4aaab783149cf350c1407288529 (diff) | |
[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) <mat@odoo.com>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_model.js | 6 |
1 files 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); } } |
