mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_m2x_options: quick search filter only if search value
Before this commit, an empty filter was applied when opening the search more if nothing in the quick search.
This commit is contained in:
@@ -258,15 +258,19 @@ odoo.define("web_m2x_options.web_m2x_options", function(require) {
|
||||
var ids = _.map(results, function(x) {
|
||||
return x[0];
|
||||
});
|
||||
dynamicFilters = [
|
||||
{
|
||||
description: _.str.sprintf(
|
||||
_t("Quick search: %s"),
|
||||
search_val
|
||||
),
|
||||
domain: [["id", "in", ids]],
|
||||
},
|
||||
];
|
||||
if (search_val) {
|
||||
dynamicFilters = [
|
||||
{
|
||||
description: _.str.sprintf(
|
||||
_t("Quick search: %s"),
|
||||
search_val
|
||||
),
|
||||
domain: [["id", "in", ids]],
|
||||
},
|
||||
];
|
||||
} else {
|
||||
dynamicFilters = [];
|
||||
}
|
||||
}
|
||||
self._searchCreatePopup(
|
||||
"search",
|
||||
|
||||
Reference in New Issue
Block a user