Browse Source
Merge pull request #1152 from Tecnativa/11.0-web_advanced_search-fix_x2many
[FIX] web_advanced_search: Ignore field domain
pull/1154/head
Pedro M. Baeza
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
1 deletions
-
web_advanced_search/static/src/js/web_advanced_search.js
|
@ -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"; |
|
|