diff options
| author | Didier (did) <did@odoo.com> | 2020-09-04 10:09:46 +0000 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2020-09-04 17:03:09 +0000 |
| commit | 8bc94d9b1ab1922d13ca90079e3ec4dca543c537 (patch) | |
| tree | 5a50a09907f51c646d44d8bc3f711332f7947d01 /addons/website_livechat/models | |
| parent | f3f4a5db3a1f21f8234cccf47db9097ebf92c0aa (diff) | |
[FIX] website_livechat: missing decorator on message_post
Incorrect override of message_post.
Without this decorator, message_post returns a string `mail.message(ID,)` via
RPC. Discuss needs the message ID to scroll chat window
closes odoo/odoo#57122
X-original-commit: 3939d3aa3b60e0f606a9f7defd695417f7b3f383
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Diffstat (limited to 'addons/website_livechat/models')
| -rw-r--r-- | addons/website_livechat/models/mail_channel.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_livechat/models/mail_channel.py b/addons/website_livechat/models/mail_channel.py index 86ab7aeb2c3..fd3189b8400 100644 --- a/addons/website_livechat/models/mail_channel.py +++ b/addons/website_livechat/models/mail_channel.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import fields, models, _ +from odoo import api, fields, models, _ class MailChannel(models.Model): @@ -62,6 +62,7 @@ class MailChannel(models.Model): return message + @api.returns('mail.message', lambda value: value.id) def message_post(self, **kwargs): """Override to mark the visitor as still connected. If the message sent is not from the operator (so if it's the visitor or |
