[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:
Dainius Kaniava
2017-04-28 21:13:28 +02:00
committed by Géry Debongnie
parent 43cdec0517
commit 4f9ac6c093
+2 -2
View File
@@ -3469,12 +3469,12 @@ instance.web.form.CompletionFieldMixin = {
var pop = new instance.web.form.SelectCreatePopup(this);
pop.select_element(
self.field.relation,
{
_.extend(this.options || {}, {
title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,
initial_ids: ids ? _.map(ids, function(x) {return x[0];}) : undefined,
initial_view: view,
disable_multiple_selection: true
},
}),
self.build_domain(),
new instance.web.CompoundContext(self.build_context(), context || {})
);