From d0ed5c29563dd8c89a120035006d74f297c2ec9d Mon Sep 17 00:00:00 2001 From: Carlos Almeida Date: Sat, 16 Jan 2016 14:24:03 -0200 Subject: [PATCH] Update __init__ --- web_fetchmail_no_followers/model/mail_thread.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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