diff options
| author | Antony Lesuisse <al@openerp.com> | 2012-12-27 11:07:53 +0100 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2012-12-27 11:07:53 +0100 |
| commit | 61bff67159b74db7d099814f4e44cf04ca0f67ba (patch) | |
| tree | 90a290b7e9f3401614b36bb969327db6641b1992 /addons/web/static/src/js/coresetup.js | |
| parent | abca385d7527cdf68c7afaca864be026abc33c9b (diff) | |
| parent | a49e82615d59dd7de98a5d732894373fbf156d81 (diff) | |
[MERGE] get_session_info cleanup
bzr revid: al@openerp.com-20121227100753-q1jyl37k09ku2px2
Diffstat (limited to 'addons/web/static/src/js/coresetup.js')
| -rw-r--r-- | addons/web/static/src/js/coresetup.js | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index a8b0510389b..43d292b66db 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -49,7 +49,6 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess _(this.module_list).each(function (mod) { self.module_loaded[mod] = true; }); - this.context = {}; this.active_id = null; return this.session_init(); }, @@ -67,7 +66,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess return deferred.then(function() { return self.load_modules(); }); } return $.when( - deferred, + deferred, self.rpc('/web/webclient/bootstrap_translations', {mods: instance._modules}).then(function(trans) { instance.web._t.database.set_bundle(trans); }) @@ -86,13 +85,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess // If immediately follows a login (triggered by trying to restore // an invalid session or no session at all), refresh session data // (should not change, but just in case...) - _.extend(self, { - session_id: result.session_id, - db: result.db, - username: result.login, - uid: result.uid, - user_context: result.context - }); + _.extend(self, result); }); }, session_is_valid: function() { @@ -109,14 +102,7 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess if (!result.uid) { return $.Deferred().reject(); } - - _.extend(self, { - session_id: result.session_id, - db: result.db, - username: result.login, - uid: result.uid, - user_context: result.context - }); + _.extend(self, result); if (!_volatile) { self.set_cookie('session_id', self.session_id); } |
