mirror of https://github.com/OCA/web.git
Merge pull request #1152 from Tecnativa/11.0-web_advanced_search-fix_x2many
[FIX] web_advanced_search: Ignore field domainpull/1154/head
commit
8d79ed75f6
|
@ -179,7 +179,14 @@ odoo.define("web_advanced_search", function (require) {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
// See https://stackoverflow.com/a/11508530/1468388
|
// See https://stackoverflow.com/a/11508530/1468388
|
||||||
params.fields[this.field.name] = _.omit(this.field, "onChange");
|
// to know how to include this in the previous step in ES6
|
||||||
|
params.fields[this.field.name] = _.omit(
|
||||||
|
this.field,
|
||||||
|
// User needs all records, to actually produce a new domain
|
||||||
|
"domain",
|
||||||
|
// Onchanges make no sense in this context, there's no record
|
||||||
|
"onChange"
|
||||||
|
);
|
||||||
if (this.field.type.endsWith("2many")) {
|
if (this.field.type.endsWith("2many")) {
|
||||||
// X2many fields behave like m2o in the search context
|
// X2many fields behave like m2o in the search context
|
||||||
params.fields[this.field.name].type = "many2one";
|
params.fields[this.field.name].type = "many2one";
|
||||||
|
|
Loading…
Reference in New Issue