diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-04-21 08:48:35 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-25 08:07:17 +0200 |
| commit | f5bfa3d3b653c8ec8a9a1820eeff995a7f954ca9 (patch) | |
| tree | 1cf332dc47268bc1006316d0d5d73b41189d9806 /addons/web/static/src/js/chrome/view_manager.js | |
| parent | 6e850085042ee0132157823a97da8ffe47a9279e (diff) | |
[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).
Diffstat (limited to 'addons/web/static/src/js/chrome/view_manager.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/view_manager.js | 2 |
1 files changed, 1 insertions, 1 deletions
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'; |
