diff options
| author | Xavier Morel <xmo@openerp.com> | 2011-10-03 11:07:09 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2011-10-03 11:07:09 +0200 |
| commit | 03e842f67276f64483a63a442d49371772cfa3ba (patch) | |
| tree | f5b147253b5d8b97940c211af7fb2bfbc5009a62 /addons | |
| parent | 013e01a52b940559f73f98a15bbaf8eb5f4bcd12 (diff) | |
[FIX] double-load on successful login
Session#session_restore is automatically called when the client
session is started, and it performs an RPC call. This RPC call is
checked and leads to the opening of the login form iif the user is not
currently logged in (does not have a valid session).
Due to the behavior of Session#rpc_ajax, this failure on grounds of
invalid session leads to the restore continuation being stored for
deferred execution once the user logs in.
Issue is that both Session#session_login and Session#session_restore
call Session#on_session_valid which tries to load all modules. As a
result and because the '_modules_loaded' flag is only set five billion
years after 'load_modules' is called both calls will try to load all
modules in parallel, leading to double downloading and execution of
all JS and CSS files coming from module data (including translation
files).
bzr revid: xmo@openerp.com-20111003090709-1izso4hrbzk91sf3
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/static/src/js/core.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 2e9294ded12..5bc6bc92b68 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -486,8 +486,6 @@ openerp.web.Session = openerp.web.CallbackEnabled.extend( /** @lends openerp.web self.user_context = result.context; self.db = result.db; self.session_save(); - if (self.uid) - self.on_session_valid(); return true; }).then(success_callback); }, |
