Skip to content

Commit

Permalink
Merge PR #1025 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by etobella
  • Loading branch information
OCA-git-bot committed Oct 9, 2023
2 parents 27084cb + c6064a7 commit c61df16
Show file tree
Hide file tree
Showing 14 changed files with 631 additions and 0 deletions.
88 changes: 88 additions & 0 deletions mail_partner_opt_out/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
====================
Mail Partner Opt Out
====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github
:target: https://github.com/OCA/social/tree/14.0/mail_partner_opt_out
:alt: OCA/social
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_partner_opt_out
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/205/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds the capability for a user to add a partner's email address
to the blackmail list so that she will not receive any emails from mass
mailing campaigns

**Table of contents**

.. contents::
:local:

Usage
=====

Go to a partner. Next to the partner's email address you will see
a plus symbol. Once you press it the partner's email address will be
blacklisted and then a ban will appear. If you click that ban the email address
will be removed from the blacklist.

You can also filter for the Blacklist attribute, to see all the partner's that
their email has been added to the blacklist.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/social/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/social/issues/new?body=module:%20mail_partner_opt_out%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* ForgeFlow

Contributors
~~~~~~~~~~~~

* ForgeFlow, S.L. ([email protected])

* Jordi Ballester Alomar ([email protected])

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/social <https://github.com/OCA/social/tree/14.0/mail_partner_opt_out>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions mail_partner_opt_out/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
15 changes: 15 additions & 0 deletions mail_partner_opt_out/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 ForgeFlow S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Mail Partner Opt Out",
"summary": "Add the partner's email to the blackmailed list",
"version": "15.0.1.0.0",
"development_status": "Beta",
"category": "Social Network",
"website": "https://github.com/OCA/social",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "LGPL-3",
"installable": True,
"data": ["views/res_partner_views.xml"],
"depends": ["mail"],
}
39 changes: 39 additions & 0 deletions mail_partner_opt_out/i18n/mail_partner_opt_out.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_partner_opt_out
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: mail_partner_opt_out
#: model_terms:ir.ui.view,arch_db:mail_partner_opt_out.res_partner_view_form_inherit_mail
msgid "Click to add this email to the blacklist."
msgstr ""

#. module: mail_partner_opt_out
#: model:ir.model.fields,field_description:mail_partner_opt_out.field_mail_thread_blacklist__display_name
msgid "Display Name"
msgstr ""

#. module: mail_partner_opt_out
#: model:ir.model.fields,field_description:mail_partner_opt_out.field_mail_thread_blacklist__id
msgid "ID"
msgstr ""

#. module: mail_partner_opt_out
#: model:ir.model.fields,field_description:mail_partner_opt_out.field_mail_thread_blacklist____last_update
msgid "Last Modified on"
msgstr ""

#. module: mail_partner_opt_out
#: model:ir.model,name:mail_partner_opt_out.model_mail_thread_blacklist
msgid "Mail Blacklist mixin"
msgstr ""
1 change: 1 addition & 0 deletions mail_partner_opt_out/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import mail_thread_blacklist
10 changes: 10 additions & 0 deletions mail_partner_opt_out/models/mail_thread_blacklist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from odoo import models


class MailBlackListMixin(models.AbstractModel):
_inherit = "mail.thread.blacklist"

def mail_blacklist_add(self):
for rec in self:
if not rec.is_blacklisted and rec.email:
self.env["mail.blacklist"].sudo()._add(self.email)
3 changes: 3 additions & 0 deletions mail_partner_opt_out/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* ForgeFlow, S.L. ([email protected])

* Jordi Ballester Alomar ([email protected])
3 changes: 3 additions & 0 deletions mail_partner_opt_out/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module adds the capability for a user to add a partner's email address
to the blackmail list so that she will not receive any emails from mass
mailing campaigns
7 changes: 7 additions & 0 deletions mail_partner_opt_out/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Go to a partner. Next to the partner's email address you will see
a plus symbol. Once you press it the partner's email address will be
blacklisted and then a ban will appear. If you click that ban the email address
will be removed from the blacklist.

You can also filter for the Blacklist attribute, to see all the partner's that
their email has been added to the blacklist.
Binary file added mail_partner_opt_out/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c61df16

Please sign in to comment.