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
- # Partner wants to receive emails, comments and notification
- if partner.notify_email == 'always' and message.type not in ('email', 'comment', 'notification'):
- continue
notify_pids.append(partner.id)
return notify_pids
_name = "res.partner"
_inherit = ['res.partner', 'mail.thread']
_mail_flat_thread = False
+ _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 Messages by Email', required=True,
++ ], '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"),
}
</td>
<td><div class="oe_view_manager_view_search" t-opentag="true"/></td>
</tr>
-- <tr class="oe_header_row" t-if="widget.action.params.view_inbox and widget.action.params.show_compose_message" >
-- <td colspan="2">
-- <button type="button" class="oe_write_full oe_highlight">
-- Compose a new message
-- </button>
-- <span class='oe_alternative'>
-- or
-- <a href='#' class='oe_write_onwall oe_bold' help='Your followers can read this message'>Write to my followers</a>
-- </span>
-- </td>
-- </tr>
</tbody>
</table>
<div class="oe_mail-placeholder"></div>