diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-10-11 16:12:19 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2016-11-07 13:39:08 +0100 |
| commit | 3378f9c771910fb61a13a452a8f8a1fb577b9c23 (patch) | |
| tree | 5a772dc096780385c9434d56e82fcdab658f118c /addons/web/static/src/js/framework | |
| parent | 7cfbdd57b4c94b7ea44c93829de72337113d5dfe (diff) | |
[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.
Diffstat (limited to 'addons/web/static/src/js/framework')
| -rw-r--r-- | addons/web/static/src/js/framework/session.js | 9 |
1 files changed, 6 insertions, 3 deletions
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; }, |
