mirror of https://github.com/OCA/web.git
[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.pull/2888/head
parent
8aa946c8e8
commit
89cf226768
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "web_m2x_options",
|
"name": "web_m2x_options",
|
||||||
"version": "13.0.1.0.0",
|
"version": "13.0.1.0.1",
|
||||||
"category": "Web",
|
"category": "Web",
|
||||||
"author": "ACSONE SA/NV, "
|
"author": "ACSONE SA/NV, "
|
||||||
"0k.io, "
|
"0k.io, "
|
||||||
|
|
|
@ -258,15 +258,19 @@ odoo.define("web_m2x_options.web_m2x_options", function(require) {
|
||||||
var ids = _.map(results, function(x) {
|
var ids = _.map(results, function(x) {
|
||||||
return x[0];
|
return x[0];
|
||||||
});
|
});
|
||||||
dynamicFilters = [
|
if (search_val) {
|
||||||
{
|
dynamicFilters = [
|
||||||
description: _.str.sprintf(
|
{
|
||||||
_t("Quick search: %s"),
|
description: _.str.sprintf(
|
||||||
search_val
|
_t("Quick search: %s"),
|
||||||
),
|
search_val
|
||||||
domain: [["id", "in", ids]],
|
),
|
||||||
},
|
domain: [["id", "in", ids]],
|
||||||
];
|
},
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
dynamicFilters = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self._searchCreatePopup(
|
self._searchCreatePopup(
|
||||||
"search",
|
"search",
|
||||||
|
|
Loading…
Reference in New Issue