summaryrefslogtreecommitdiff
path: root/addons/website_livechat/models
diff options
context:
space:
mode:
authorDavid Beguin <dbe@odoo.com>2019-11-06 16:27:36 +0000
committerDavid Beguin <dbe@odoo.com>2020-03-17 12:21:48 +0000
commit190dab8144b5dd46bb2492093d0d8d3abafb19b4 (patch)
tree9c1b6cbeb5d54ba170ab50042d1be967303ff3a6 /addons/website_livechat/models
parent69b1e1a05228f05b4cd5f2934167260e51101dce (diff)
[IMP] website_livechat : add various tests on livechat and visitors
Adds Python tests and javascripts tours on livechat (website and visitor integration). Because breaking livechat every two days in rush periods (or even not) is getting quite annoying. Those tests are testing : - The client side flow (open livechat, send messages, send rating and close the livechat session) - The channel and message author naming, visitor page view history - Chat request flow (complete chat request flow, open empty operator's chat request and cancel due to visitor's new chat session) Task ID : 2079087 PR #40052 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_livechat/models')
-rw-r--r--addons/website_livechat/models/im_livechat_channel.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/website_livechat/models/im_livechat_channel.py b/addons/website_livechat/models/im_livechat_channel.py
index 6718fd3e48b..3b805b80b7c 100644
--- a/addons/website_livechat/models/im_livechat_channel.py
+++ b/addons/website_livechat/models/im_livechat_channel.py
@@ -15,6 +15,7 @@ class ImLivechatChannel(models.Model):
if not user_id:
mail_channel_vals['anonymous_name'] = visitor_sudo.display_name + (' (%s)' % visitor_sudo.country_id.name if visitor_sudo.country_id else '')
# As chat requested by the visitor, delete the chat requested by an operator if any to avoid conflicts between two flows
+ # TODO DBE : Move this into the proper method (open or init mail channel)
chat_request_channel = self.env['mail.channel'].sudo().search([('livechat_visitor_id', '=', visitor_sudo.id), ('livechat_active', '=', True)])
for mail_channel in chat_request_channel:
mail_channel._close_livechat_session(cancel=True, speaking_with=operator.name)