[FIX] web: restore form_view_initial_mode support
The key `form_view_initial_mode` can be set in the action context, to open the action in edit mode, mainly. This key wasn't supported since the new view refactoring so this commit restores its support.
This commit is contained in:
committed by
Aaron Bohy
parent
5b968ad371
commit
ebcf35b66c
@@ -363,7 +363,7 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
|
||||
var View = this.registry.get(arch.attrs.js_class || view_descr.type);
|
||||
var params = _.extend({}, view_options, {userContext: this.getSession().user_context});
|
||||
if (view_descr.type === "form" && ((this.action.target === 'new' || this.action.target === 'inline') ||
|
||||
(view_options && view_options.mode === 'edit'))) {
|
||||
(view_options && (view_options.mode === 'edit' || view_options.context.form_view_initial_mode)))) {
|
||||
params.mode = params.initial_mode || 'edit';
|
||||
}
|
||||
view_descr.searchview_hidden = View.prototype.searchview_hidden;
|
||||
|
||||
Reference in New Issue
Block a user