[FIX] web: properly transfer javascript options
Fix options not being passed from view declaration to JS frontend function. If passing option 'no_create': True, "Create" button was still visible.
This commit is contained in:
parent
43cdec0517
commit
4f9ac6c093
|
@ -3469,12 +3469,12 @@ instance.web.form.CompletionFieldMixin = {
|
||||||
var pop = new instance.web.form.SelectCreatePopup(this);
|
var pop = new instance.web.form.SelectCreatePopup(this);
|
||||||
pop.select_element(
|
pop.select_element(
|
||||||
self.field.relation,
|
self.field.relation,
|
||||||
{
|
_.extend(this.options || {}, {
|
||||||
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,
|
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,
|
||||||
initial_ids: ids ? _.map(ids, function(x) {return x[0];}) : undefined,
|
initial_ids: ids ? _.map(ids, function(x) {return x[0];}) : undefined,
|
||||||
initial_view: view,
|
initial_view: view,
|
||||||
disable_multiple_selection: true
|
disable_multiple_selection: true
|
||||||
},
|
}),
|
||||||
self.build_domain(),
|
self.build_domain(),
|
||||||
new instance.web.CompoundContext(self.build_context(), context || {})
|
new instance.web.CompoundContext(self.build_context(), context || {})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue