diff --git a/addons/mail/data/mail_data.xml b/addons/mail/data/mail_data.xml index cdd7eb12c69..8e52f7e1f7d 100644 --- a/addons/mail/data/mail_data.xml +++ b/addons/mail/data/mail_data.xml @@ -53,7 +53,7 @@ - none + none diff --git a/addons/mail/data/mail_demo.xml b/addons/mail/data/mail_demo.xml index dde8d1d9804..09415ba89e0 100644 --- a/addons/mail/data/mail_demo.xml +++ b/addons/mail/data/mail_demo.xml @@ -4,76 +4,76 @@ - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none - none + none diff --git a/addons/mail/mail_followers.py b/addons/mail/mail_followers.py index 0059df90530..86246bc2745 100644 --- a/addons/mail/mail_followers.py +++ b/addons/mail/mail_followers.py @@ -96,13 +96,7 @@ class mail_notification(osv.Model): if message.author_id and message.author_id.email == partner.email: continue # Partner does not want to receive any emails or is opt-out - if partner.notification_email_send == 'none': - continue - # Partner wants to receive only emails and comments - if partner.notification_email_send == 'comment' and message.type not in ('email', 'comment'): - continue - # Partner wants to receive only emails - if partner.notification_email_send == 'email' and message.type != 'email': + if partner.notify_email == 'none': continue notify_pids.append(partner.id) return notify_pids diff --git a/addons/mail/res_partner.py b/addons/mail/res_partner.py index 8b8f0d3c145..bf801511761 100644 --- a/addons/mail/res_partner.py +++ b/addons/mail/res_partner.py @@ -31,21 +31,18 @@ class res_partner_mail(osv.Model): _mail_mass_mailing = _('Customers') _columns = { - 'notification_email_send': fields.selection([ + 'notify_email': fields.selection([ ('none', 'Never'), - ('email', 'Incoming Emails only'), - ('comment', 'Incoming Emails and Discussions'), - ('all', 'All Messages (discussions, emails, followed system notifications)'), - ], 'Receive Messages by Email', required=True, + ('always', 'All Messages'), + ], 'Receive Inbox Notifications by Email', required=True, + oldname='notification_email_send', help="Policy to receive emails for new messages pushed to your personal Inbox:\n" "- Never: no emails are sent\n" - "- Incoming Emails only: for messages received by the system via email\n" - "- Incoming Emails and Discussions: for incoming emails along with internal discussions\n" "- All Messages: for every notification you receive in your Inbox"), } _defaults = { - 'notification_email_send': lambda *args: 'comment' + 'notify_email': lambda *args: 'always' } def message_get_suggested_recipients(self, cr, uid, ids, context=None): diff --git a/addons/mail/res_partner_view.xml b/addons/mail/res_partner_view.xml index 7df5d27c9d0..5066d85e682 100644 --- a/addons/mail/res_partner_view.xml +++ b/addons/mail/res_partner_view.xml @@ -8,7 +8,7 @@ - +
diff --git a/addons/mail/res_users.py b/addons/mail/res_users.py index 42e739d8051..8fe1482b427 100644 --- a/addons/mail/res_users.py +++ b/addons/mail/res_users.py @@ -54,10 +54,10 @@ class res_users(osv.Model): init_res = super(res_users, self).__init__(pool, cr) # duplicate list to avoid modifying the original reference self.SELF_WRITEABLE_FIELDS = list(self.SELF_WRITEABLE_FIELDS) - self.SELF_WRITEABLE_FIELDS.extend(['notification_email_send', 'display_groups_suggestions']) + self.SELF_WRITEABLE_FIELDS.extend(['notify_email', 'display_groups_suggestions']) # duplicate list to avoid modifying the original reference self.SELF_READABLE_FIELDS = list(self.SELF_READABLE_FIELDS) - self.SELF_READABLE_FIELDS.extend(['notification_email_send', 'alias_domain', 'alias_name', 'display_groups_suggestions']) + self.SELF_READABLE_FIELDS.extend(['notify_email', 'alias_domain', 'alias_name', 'display_groups_suggestions']) return init_res def _auto_init(self, cr, context=None): diff --git a/addons/mail/res_users_view.xml b/addons/mail/res_users_view.xml index 2bf54b4bafd..eef2924134f 100644 --- a/addons/mail/res_users_view.xml +++ b/addons/mail/res_users_view.xml @@ -10,7 +10,7 @@ - + @@ -24,7 +24,7 @@ - +