[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
This commit is contained in:
Nicolas Lempereur
2017-02-02 11:23:30 +01:00
parent b7c7591bfb
commit 8a0151b4bc
+3 -1
View File
@@ -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);
});