diff options
| author | XavierDo <xdo@odoo.com> | 2018-11-19 10:21:36 +0000 |
|---|---|---|
| committer | XavierDo <xdo@odoo.com> | 2018-11-28 11:35:12 +0000 |
| commit | 136fee6fcf976cc7b23a699732b832d643473fdd (patch) | |
| tree | 1b5a243a2a5efa7695fb016761133ae97f2298f6 /addons/mail_bot/models/mail_channel.py | |
| parent | db21ef75783af1c90cfa966130c976bc138b58c0 (diff) | |
[FIX] mail_bot: only display odoobot once in mention suggestions
Before this commit odoobot was appearing twice in mention
suggestions when talking to odoobot.
The initial need to be able to ping odoobot from everywhere led to the
override of channel_fetch_listeners. This is not usefull anymore.
This fix simply removes this override to avoid this problem since we
don't have a real use case where we need to ping odoobot in another
channel.
Task 1907142
closes odoo/odoo#28791
Diffstat (limited to 'addons/mail_bot/models/mail_channel.py')
| -rw-r--r-- | addons/mail_bot/models/mail_channel.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/addons/mail_bot/models/mail_channel.py b/addons/mail_bot/models/mail_channel.py index 3e2258902bf..efada26b88a 100644 --- a/addons/mail_bot/models/mail_channel.py +++ b/addons/mail_bot/models/mail_channel.py @@ -12,13 +12,6 @@ class Channel(models.Model): self.env['mail.bot']._apply_logic(self, kwargs, command="help") # kwargs are not usefull but... @api.model - def channel_fetch_listeners(self, uuid): - """ Return the id, name and email of partners listening to the given channel """ - result = super().channel_fetch_listeners(uuid) - odoobot = self.env.ref("base.partner_root").sudo() - return result + [{'id': odoobot.id, 'name': odoobot.name, 'email': odoobot.email}] - - @api.model def init_odoobot(self): if self.env.user.odoobot_state == 'not_initialized': partner = self.env.user.partner_id |
