mirror of https://github.com/OCA/web.git
Merge pull request #764 from Tecnativa/10.0-web_advanced_search_x2x-fix_string_leafs
[FIX] web_advanced_search_x2x: Allow to combine multiple domainspull/766/head
commit
85d519d937
|
@ -5,7 +5,7 @@
|
|||
|
||||
{
|
||||
"name": "Search x2x fields",
|
||||
"version": "10.0.2.0.1",
|
||||
"version": "10.0.2.0.2",
|
||||
"author": "Therp BV, "
|
||||
"Tecnativa, "
|
||||
"Odoo Community Association (OCA)",
|
||||
|
|
|
@ -153,11 +153,15 @@ odoo.define('web_advanced_search_x2x.search_filters', function (require) {
|
|||
var domain = new data.CompoundDomain(),
|
||||
name = this.field.name;
|
||||
$.map(value, function (el) {
|
||||
domain.add([[
|
||||
_.str.sprintf("%s.%s", name, el[0]),
|
||||
el[1],
|
||||
el[2],
|
||||
]]);
|
||||
var leaf = el;
|
||||
if (typeof el !== "string") {
|
||||
leaf = [
|
||||
_.str.sprintf("%s.%s", name, el[0]),
|
||||
el[1],
|
||||
el[2],
|
||||
];
|
||||
}
|
||||
domain.add([leaf]);
|
||||
});
|
||||
return domain;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue