[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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user