summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-08-17 13:39:29 +0200
committerlen-odoo <35492570+len-odoo@users.noreply.github.com>2018-08-30 14:55:06 +0200
commit68332a0177990020f11b94317a6d3a81ff906d69 (patch)
tree7779d739bfb1ed4b8aea14ce607627f86802a7c6 /addons/web/static/src/js/fields
parent1ece9412be6ce30c46757a1a6a5025db62d9af85 (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')
-rw-r--r--addons/web/static/src/js/fields/basic_fields.js5
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));