[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.
This commit is contained in:
qsm-odoo
2017-01-12 13:37:10 +01:00
parent d9c7c30856
commit 241f778e22
@@ -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,