diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2017-02-02 11:00:23 +0100 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2017-02-02 11:23:30 +0100 |
| commit | 8a0151b4bcd4e5f1aea850c83653be4443f659c9 (patch) | |
| tree | c32d0fef26a808c23ffbf375e50c65c4e0e99ee8 /addons/mail/static/src/js/chat_manager.js | |
| parent | b7c7591bfba41eba5be43ec490d6da9a2c7368fe (diff) | |
[FIX] mail: unhide relevant "Odoo Session Expired"
With how the chat manager was currently started, the "Odoo Session
Expired" could cause an arcane js error which would overshadow it.
This is caused by doing an RPC request too soon which invalidate the
session too soon which disable web client `show_application`.
With this commit, we have the error message "Odoo Session Expired"
instead of:
"Uncaught TypeError: Cannot read property '$el' of undefined"
closes #15313
opw-706346
Diffstat (limited to 'addons/mail/static/src/js/chat_manager.js')
| -rw-r--r-- | addons/mail/static/src/js/chat_manager.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js index f60e8c2eb3d..e8dd83d9017 100644 --- a/addons/mail/static/src/js/chat_manager.js +++ b/addons/mail/static/src/js/chat_manager.js @@ -1044,7 +1044,9 @@ function init () { bus.on('notification', null, on_notification); - return session.rpc('/mail/client_action').then(function (result) { + return session.is_bound.then(function(){ + return session.rpc('/mail/client_action'); + }).then(function (result) { _.each(result.channel_slots, function (channels) { _.each(channels, add_channel); }); |
