diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-09-17 17:49:09 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-09-17 17:49:09 +0200 |
| commit | 080f8b1f96dec30fd9568a81342b5d20cc9d521a (patch) | |
| tree | 14cecabb2c6502e73d93178bd322722e2e62f07d /addons/mail_bot | |
| parent | c12bd7125a1c64339e02ae0563f667b8de931b3b (diff) | |
| parent | d8ce75466e4a6728cccfc7696a65a399e9cf23f1 (diff) | |
[MERGE] forward port branch saas-12.3 up to d8ce75466e4
Diffstat (limited to 'addons/mail_bot')
| -rw-r--r-- | addons/mail_bot/models/mail_bot.py | 2 | ||||
| -rw-r--r-- | addons/mail_bot/models/mail_channel.py | 2 |
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', |
