diff --git a/web_fetchmail_no_followers/README.rst b/web_mail_no_followers/README.rst similarity index 100% rename from web_fetchmail_no_followers/README.rst rename to web_mail_no_followers/README.rst diff --git a/web_fetchmail_no_followers/__init__.py b/web_mail_no_followers/__init__.py similarity index 100% rename from web_fetchmail_no_followers/__init__.py rename to web_mail_no_followers/__init__.py diff --git a/web_fetchmail_no_followers/__openerp__.py b/web_mail_no_followers/__openerp__.py similarity index 95% rename from web_fetchmail_no_followers/__openerp__.py rename to web_mail_no_followers/__openerp__.py index 6f17668a..2e72bc82 100644 --- a/web_fetchmail_no_followers/__openerp__.py +++ b/web_mail_no_followers/__openerp__.py @@ -22,7 +22,7 @@ ############################################################################## { - 'name': 'Do not add followers on fetching mail', + 'name': 'Do not add followers on sending or receiving mails', 'version': '8.0.0.1.0', 'author': "ThinkOpen Solutions Brasil, Odoo Community Association (OCA)", 'category': 'Web', diff --git a/web_fetchmail_no_followers/i18n/web_fetchmail_no_followers.pot b/web_mail_no_followers/i18n/web_fetchmail_no_followers.pot similarity index 100% rename from web_fetchmail_no_followers/i18n/web_fetchmail_no_followers.pot rename to web_mail_no_followers/i18n/web_fetchmail_no_followers.pot diff --git a/web_fetchmail_no_followers/model/__init__.py b/web_mail_no_followers/model/__init__.py similarity index 100% rename from web_fetchmail_no_followers/model/__init__.py rename to web_mail_no_followers/model/__init__.py diff --git a/web_fetchmail_no_followers/model/mail_thread.py b/web_mail_no_followers/model/mail_thread.py similarity index 84% rename from web_fetchmail_no_followers/model/mail_thread.py rename to web_mail_no_followers/model/mail_thread.py index 34ba111b..4eb97431 100644 --- a/web_fetchmail_no_followers/model/mail_thread.py +++ b/web_mail_no_followers/model/mail_thread.py @@ -35,8 +35,13 @@ def MailNoFollowersMessageFetch(self, cr, uid, thread_id, body='', attachments=None, context=None, content_subtype='html', **kwargs): - nosub_ctx = dict(context, mail_create_nosubscribe=True, - mail_create_nolog=True) + # add mail_create_nosubscribe to not subscribe any messages for fetchmail + nosub_ctx = dict(context, mail_create_nosubscribe=True) + # remove key mail_create_nosubscribe to not subscribe partners on send + if 'mail_post_autofollow' in nosub_ctx: + del nosub_ctx['mail_post_autofollow'] + if 'mail_post_autofollow_partner_ids1' in nosub_ctx: + del nosub_ctx['mail_post_autofollow_partner_ids'] thread_id = message_post_super(self, cr, uid, thread_id, body=body, subject=subject, type=type, @@ -49,7 +54,6 @@ def MailNoFollowersMessageFetch(self, cr, uid, thread_id, body='', 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. - This way we switch to standard method without a server restart. ''' _name = 'mail.thread' diff --git a/web_fetchmail_no_followers/static/description/icon.png b/web_mail_no_followers/static/description/icon.png similarity index 100% rename from web_fetchmail_no_followers/static/description/icon.png rename to web_mail_no_followers/static/description/icon.png