diff options
| author | Aaron Bohy <aab@odoo.com> | 2018-08-17 13:39:29 +0200 |
|---|---|---|
| committer | len-odoo <35492570+len-odoo@users.noreply.github.com> | 2018-08-30 14:55:06 +0200 |
| commit | 68332a0177990020f11b94317a6d3a81ff906d69 (patch) | |
| tree | 7779d739bfb1ed4b8aea14ce607627f86802a7c6 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 1ece9412be6ce30c46757a1a6a5025db62d9af85 (diff) | |
[FIX] web: fix evaluation context of the domain selector
The domain was instantiated without being given any evaluation context.
As a result, the uid variable was not defined,
crashing the js if present in a user-defined filter.
opw 1866852
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index 61b13be7be5..d624651ac85 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -2264,19 +2264,18 @@ var FieldDomain = AbstractField.extend({ // Convert char value to array value var value = this.value || "[]"; - var domain = Domain.prototype.stringToArray(value); // Create the domain selector or change the value of the current one... var def; if (!this.domainSelector) { - this.domainSelector = new DomainSelector(this, this._domainModel, domain, { + this.domainSelector = new DomainSelector(this, this._domainModel, value, { readonly: this.mode === "readonly" || this.inDialog, filters: this.fsFilters, debugMode: session.debug, }); def = this.domainSelector.prependTo(this.$el); } else { - def = this.domainSelector.setDomain(domain); + def = this.domainSelector.setDomain(value); } // ... then replace the other content (matched records, etc) return def.then(this._replaceContent.bind(this)); |
