From 3ba7186752e3766e897118f13e2df9b1a6484b5b Mon Sep 17 00:00:00 2001 From: dmonzonis Date: Fri, 10 Apr 2020 10:26:47 +0000 Subject: [PATCH] [IMP] mail_bot: Remove OdooBot ping answers Many users have complained about the automated OdooBot answers like "Pong" when the bot is pinged, that fill the chatter when the user has the mail_bot module installed, and add no real value. --- addons/mail_bot/models/mail_bot.py | 2 -- addons/test_mail/tests/test_odoobot.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/mail_bot/models/mail_bot.py b/addons/mail_bot/models/mail_bot.py index 10686b14ba3..7a4aebee197 100644 --- a/addons/mail_bot/models/mail_bot.py +++ b/addons/mail_bot/models/mail_bot.py @@ -75,8 +75,6 @@ class MailBot(models.AbstractModel): _("I'm afraid I don't understand. Sorry!"), _("Sorry I'm sleepy. Or not! Maybe I'm just trying to hide my unawareness of human language...
I can show you features if you write")+ ": '"+_('start the tour')+"'.", ]) - elif self._is_bot_pinged(values): - return random.choice([_("Yep, OdooBot is in the place!"), _("Pong.")]) return False def _body_contains_emoji(self, body): diff --git a/addons/test_mail/tests/test_odoobot.py b/addons/test_mail/tests/test_odoobot.py index 740a0444974..2e4dc55490a 100644 --- a/addons/test_mail/tests/test_odoobot.py +++ b/addons/test_mail/tests/test_odoobot.py @@ -44,7 +44,7 @@ class TestOdoobot(TestMailCommon, TestRecipients): self.assertNextMessage( self.test_record_employe.with_context({'mail_post_autofollow': True}).message_post(**kwargs), sender=self.odoobot, - answer=["Yep, OdooBot is in the place!"] + answer=False ) # Odoobot should not be a follower but user_employee and user_admin should follower = self.test_record.message_follower_ids.mapped('partner_id')