summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-01-12 13:29:10 +0100
committerqsm-odoo <qsm@odoo.com>2017-01-12 13:37:10 +0100
commit241f778e22b6ab662fd8d60e5a098b7da77520a0 (patch)
tree6e66c886fdeb9dffbfb31adfd251ef815c8eec9a /addons/web/static/src
parentd9c7c30856c280b516a0c98cf5d5e18ebe13e37b (diff)
[FIX] web: allow empty domain value with the in_dialog option
The "in_dialog" option of the domain field was not working correctly when the field value was falsy as it did not consider it to be "[]" in that case (as it is done without the "in_dialog" option). Same goes for the dialog which displays the matched records.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/form_widgets.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index 129865996f8..c445e3d6d31 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -509,14 +509,14 @@ var FieldDomain = common.AbstractField.extend(common.ReinitializeFieldMixin).ext
return new common.SelectCreateDialog(this, {
title: _t("Selected records"),
res_model: this.model,
- domain: this.get("value"),
+ domain: this.get("value") || "[]",
no_create: true,
readonly: true,
disable_multiple_selection: true,
}).open();
},
openDomainDialog: function () {
- new DomainSelectorDialog(this, this.model, this.get("value"), {
+ new DomainSelectorDialog(this, this.model, this.get("value") || "[]", {
readonly: this.get("effective_readonly"),
fs_filters: this.options.fs_filters,
debugMode: session.debug,