From f5bfa3d3b653c8ec8a9a1820eeff995a7f954ca9 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Fri, 21 Apr 2017 08:48:35 +0200 Subject: [FIX] web: FormView: don't modify record's context Before this rev., some keys were added to the context of a record if there were x2many fields in the form view with a context defined on their node (containing *_view_ref keys, specifying the fields_view to load to display the relational data). Those keys should not be added to the main record's context, and it may cause errors (e.g. click on the 'Procurements' stat button in the Product form view). --- addons/web/static/src/js/chrome/view_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/chrome/view_manager.js') diff --git a/addons/web/static/src/js/chrome/view_manager.js b/addons/web/static/src/js/chrome/view_manager.js index 978271d9228..502f1f2c5b6 100644 --- a/addons/web/static/src/js/chrome/view_manager.js +++ b/addons/web/static/src/js/chrome/view_manager.js @@ -354,7 +354,7 @@ var ViewManager = Widget.extend(ControlPanelMixin, { var self = this; var arch = view.fields_view.arch; var View = this.registry.get(arch.attrs.js_class || view.type); - var params = _.extend({}, view_options); + var params = _.extend({}, view_options, {userContext: this.getSession().user_context}); if (view.type === "form" && ((this.action.target === 'new' || this.action.target === 'inline') || (view_options && view_options.mode === 'edit'))) { params.mode = params.initial_mode || 'edit'; -- cgit v1.2.3