diff --git a/web_fetchmail_no_followers/model/mail_thread.py b/web_fetchmail_no_followers/model/mail_thread.py index 9ab37f7b..b65ab6bd 100644 --- a/web_fetchmail_no_followers/model/mail_thread.py +++ b/web_fetchmail_no_followers/model/mail_thread.py @@ -48,13 +48,9 @@ def MailNoFollowersMessagePost(self, cr, uid, thread_id, body='', subject=None, class MailNoFollowers(models.Model): ''' I define this class so this code will be executed only if module is installed in database. Otherwise it will be always executed. - Odoo call __init__ once on install and once on uninstall. This way we switch to standard method without a server restart. ''' _name = 'mail.thread' def __init__(self, *arg, **kwargs): - if mail_thread.message_post == message_post_super: - mail_thread.message_post = MailNoFollowersMessagePost - else: - mail_thread.message_post = message_post_super + mail_thread.message_post = MailNoFollowersMessagePost