From 3378f9c771910fb61a13a452a8f8a1fb577b9c23 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Tue, 11 Oct 2016 16:12:19 +0200 Subject: [FIX] web: correctly saves last change in wizards with many2omany With this change, form_relational_widgets will wait for the 'web.ListEditor' module to be loaded before patching the list view. This is particularly important for wizards containing and editable list view. Note that to achieve this, I had to fix a horrible hack in session. --- addons/web/static/src/js/framework/session.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src/js/framework') diff --git a/addons/web/static/src/js/framework/session.js b/addons/web/static/src/js/framework/session.js index 18fccecc331..6af97721926 100644 --- a/addons/web/static/src/js/framework/session.js +++ b/addons/web/static/src/js/framework/session.js @@ -141,9 +141,12 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, { } var def = this._groups_def[group]; if (!def) { - var Model = window.openerp.web.Model; - var Users = new Model('res.users'); - def = this._groups_def[group] = Users.call('has_group', [group]); + def = this._groups_def[group] = this.rpc('/web/dataset/call_kw/res.users/has_group', { + "model": "res.users", + "method": "has_group", + "args": [group], + "kwargs": {} + }); } return def; }, -- cgit v1.2.3