[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user