diff options
| author | fja-odoo <fja@odoo.com> | 2019-09-24 16:24:53 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2019-10-01 19:49:46 +0000 |
| commit | fe1dddb1ec2173c2581c122b34b3ae68e56892d0 (patch) | |
| tree | 889df8424aa9d0e6064a71f32127cf760eedd6b3 /addons/website_livechat | |
| parent | 75014ffba4f716cf423bc3712b950c6cd3876153 (diff) | |
[FIX] website: allow visitor sort by last visit time
A visitor needs to be sorted by last visit datetime, to do so we need to
remove the temp table and ignore concurrent updates.
task-2072877
Diffstat (limited to 'addons/website_livechat')
| -rw-r--r-- | addons/website_livechat/models/mail_channel.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/addons/website_livechat/models/mail_channel.py b/addons/website_livechat/models/mail_channel.py index 4152de2cfd5..12e3b3d0bbc 100644 --- a/addons/website_livechat/models/mail_channel.py +++ b/addons/website_livechat/models/mail_channel.py @@ -79,8 +79,5 @@ class MailChannel(models.Model): message_author_id = message.author_id visitor = self.livechat_visitor_id if len(self) == 1 and visitor and message_author_id != self.livechat_operator_id: - self.env['website.visitor.lastconnection'].create({ - 'visitor_id': visitor.id, - 'connection_datetime': fields.datetime.now() - }) + visitor._update_visitor_last_visit() return message |
