summaryrefslogtreecommitdiff
path: root/addons/mail_bot
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-09-20 14:16:48 +0000
committerChristophe Simonis <chs@odoo.com>2019-09-20 14:33:54 +0000
commit58a83d12228fbbd4e9dde542e133d264204ee0f3 (patch)
tree60aaf45e3281e88fddc58fea8fe75de0ad4e2f46 /addons/mail_bot
parentf6da4d57bcc8e19ae0bd6d571926706bee46e08f (diff)
parent4a1321bc99dd7d8d153aceb2d0076161ce28bcd7 (diff)
[MERGE] forward port branch saas-12.4 up to 4a1321bc99d
closes odoo/odoo#37127 Signed-off-by: Christophe Simonis <chs@odoo.com>
Diffstat (limited to 'addons/mail_bot')
-rw-r--r--addons/mail_bot/models/mail_bot.py2
-rw-r--r--addons/mail_bot/models/mail_channel.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail_bot/models/mail_bot.py b/addons/mail_bot/models/mail_bot.py
index 2e0ab860255..10686b14ba3 100644
--- a/addons/mail_bot/models/mail_bot.py
+++ b/addons/mail_bot/models/mail_bot.py
@@ -30,7 +30,7 @@ class MailBot(models.AbstractModel):
if answer:
message_type = values.get('message_type', 'comment')
subtype_id = values.get('subtype_id', self.env['ir.model.data'].xmlid_to_res_id('mail.mt_comment'))
- record.with_context({"mail_create_nosubscribe": True}).sudo().message_post(body=answer, author_id=odoobot_id, message_type=message_type, subtype_id=subtype_id)
+ record.with_context(mail_create_nosubscribe=True).sudo().message_post(body=answer, author_id=odoobot_id, message_type=message_type, subtype_id=subtype_id)
def _get_answer(self, record, body, values, command=False):
# onboarding
diff --git a/addons/mail_bot/models/mail_channel.py b/addons/mail_bot/models/mail_channel.py
index efada26b88a..0fc6c6f056b 100644
--- a/addons/mail_bot/models/mail_channel.py
+++ b/addons/mail_bot/models/mail_channel.py
@@ -16,7 +16,7 @@ class Channel(models.Model):
if self.env.user.odoobot_state == 'not_initialized':
partner = self.env.user.partner_id
odoobot_id = self.env['ir.model.data'].xmlid_to_res_id("base.partner_root")
- channel = self.with_context({"mail_create_nosubscribe": True}).create({
+ channel = self.with_context(mail_create_nosubscribe=True).create({
'channel_partner_ids': [(4, partner.id), (4, odoobot_id)],
'public': 'private',
'channel_type': 'chat',