summaryrefslogtreecommitdiff
path: root/addons/website_livechat/models
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2019-10-24 11:09:01 +0000
committerThibault Delavallée <tde@odoo.com>2019-12-02 15:18:44 +0000
commite2b33f460d0f2359e65107f8615c7e827350b4e7 (patch)
treeaacc4e64a6253dc57f3369ba5e2cc67312dfe2ea /addons/website_livechat/models
parent06f169a0ee0f7508f861c47ee2f39467df7b6dc1 (diff)
[REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE Clean posting process and improve mail.message definition and comprehension. SPECIFICATIONS In order to be more explicit subtype parameter is renamed to subtype_xmlid. It therefore clearly indicates it should be a valid subtype Xml ID. Support of ill formatted Xml IDs is removed because there is no reason to try to add some random prefix. Give something that exists or go to hell, punk ! LINKS Task ID 2071556 PR #38692
Diffstat (limited to 'addons/website_livechat/models')
-rw-r--r--addons/website_livechat/models/mail_channel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_livechat/models/mail_channel.py b/addons/website_livechat/models/mail_channel.py
index 5f3b05b2ccd..6f0ddee0fc7 100644
--- a/addons/website_livechat/models/mail_channel.py
+++ b/addons/website_livechat/models/mail_channel.py
@@ -69,7 +69,7 @@ class MailChannel(models.Model):
message = _('has left the conversation.')
leave_message = '%s %s' % (name, message)
self.message_post(author_id=self.env.ref('base.user_root').sudo().partner_id.id,
- body=leave_message, message_type='comment', subtype='mt_comment')
+ body=leave_message, message_type='comment', subtype_xmlid='mail.mt_comment')
def message_post(self, **kwargs):
"""Override to mark the visitor as still connected.