Files
odoo_source/addons/mail_bot/models/mail_channel.py
T
tsm-odoo 4549de3b61 [IMP] mail_bot: don't use session for odoobot initialization
This PR prepares the ground for the one introducing the new environment in the
mail module. Indeed, the mail_bot messaging_initializer relies on the session
in order to known when to initiaze odoobot. With the new env, we won't be able
to access the session but will instead override init_messaging to automatically
initialize odoobot. Doing this first reduces the noise in the main PR.

task-2582313

closes odoo/odoo#90291

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-03 16:55:00 +02:00

13 lines
392 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, _
class Channel(models.Model):
_inherit = 'mail.channel'
def execute_command_help(self, **kwargs):
super().execute_command_help(**kwargs)
self.env['mail.bot']._apply_logic(self, kwargs, command="help") # kwargs are not usefull but...