diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-01-06 18:56:37 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-01-07 18:16:20 +0100 |
| commit | 100d604cb0ebd6aa3f57c9809c6771b0b4b72a07 (patch) | |
| tree | c209ee020b0882e6cc5ba0643b9870f1250b63ec /addons/im_livechat/controllers | |
| parent | 61cf01b7a8d9bedb577af0cf64f20bbeeb8c031c (diff) | |
[FIX] im_livechat: correct loader js code
Diffstat (limited to 'addons/im_livechat/controllers')
| -rw-r--r-- | addons/im_livechat/controllers/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/im_livechat/controllers/main.py b/addons/im_livechat/controllers/main.py index 43e547e2fb1..30ae212c8b2 100644 --- a/addons/im_livechat/controllers/main.py +++ b/addons/im_livechat/controllers/main.py @@ -30,7 +30,8 @@ class LivechatController(http.Controller): username = kwargs.get("username", _("Visitor")) channel = request.env['im_livechat.channel'].sudo().browse(channel_id) info = request.env['im_livechat.channel'].get_livechat_info(channel.id, username=username) - return request.render('im_livechat.loader', {'info': info, 'web_session_required': True}) if info['available'] else False + js = request.render('im_livechat.loader', {'info': info, 'web_session_required': True}) + return request.make_response(js, headers=[('Content-Type', 'application/javascript')]) @http.route('/im_livechat/init', type='json', auth="public") def livechat_init(self, channel_id): |
