[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-01-26 12:39:15 +02:00 committed by Géry Debongnie
parent 43cdec0517
commit 4f9ac6c093
1 changed files with 2 additions and 2 deletions

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 || {})
);