Browse Source

Enhance to prevent users to be added also on sending message

Rename module to web_mail_no_followers
Enhance to prevent users to be added also on sending message
pull/292/head
Carlos Almeida 8 years ago
parent
commit
22b0e4bd9b
  1. 0
      web_mail_no_followers/README.rst
  2. 0
      web_mail_no_followers/__init__.py
  3. 2
      web_mail_no_followers/__openerp__.py
  4. 0
      web_mail_no_followers/i18n/web_fetchmail_no_followers.pot
  5. 0
      web_mail_no_followers/model/__init__.py
  6. 10
      web_mail_no_followers/model/mail_thread.py
  7. 0
      web_mail_no_followers/static/description/icon.png

0
web_fetchmail_no_followers/README.rst → web_mail_no_followers/README.rst

0
web_fetchmail_no_followers/__init__.py → web_mail_no_followers/__init__.py

2
web_fetchmail_no_followers/__openerp__.py → 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',

0
web_fetchmail_no_followers/i18n/web_fetchmail_no_followers.pot → web_mail_no_followers/i18n/web_fetchmail_no_followers.pot

0
web_fetchmail_no_followers/model/__init__.py → web_mail_no_followers/model/__init__.py

10
web_fetchmail_no_followers/model/mail_thread.py → 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'

0
web_fetchmail_no_followers/static/description/icon.png → web_mail_no_followers/static/description/icon.png

Before

Width: 128  |  Height: 128  |  Size: 9.2 KiB

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

Loading…
Cancel
Save