summaryrefslogtreecommitdiff
path: root/addons/mail_bot
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/mail_bot
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/mail_bot')
-rw-r--r--addons/mail_bot/models/mail_channel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail_bot/models/mail_channel.py b/addons/mail_bot/models/mail_channel.py
index 0fc6c6f056b..8b792780971 100644
--- a/addons/mail_bot/models/mail_channel.py
+++ b/addons/mail_bot/models/mail_channel.py
@@ -24,6 +24,6 @@ class Channel(models.Model):
'name': 'OdooBot'
})
message = _("Hello,<br/>Odoo's chat helps employees collaborate efficiently. I'm here to help you discover its features.<br/><b>Try to send me an emoji :)</b>")
- channel.sudo().message_post(body=message, author_id=odoobot_id, message_type="comment", subtype="mail.mt_comment")
+ channel.sudo().message_post(body=message, author_id=odoobot_id, message_type="comment", subtype_xmlid="mail.mt_comment")
self.env.user.odoobot_state = 'onboarding_emoji'
return channel