diff --git a/mail_partner_opt_out/README.rst b/mail_partner_opt_out/README.rst new file mode 100644 index 0000000000..f89f75c84b --- /dev/null +++ b/mail_partner_opt_out/README.rst @@ -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 `_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ForgeFlow + +Contributors +~~~~~~~~~~~~ + +* ForgeFlow, S.L. (contact@forgeflow.com) + + * Jordi Ballester Alomar (jordi.ballester@forgeflow.com) + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_partner_opt_out/__init__.py b/mail_partner_opt_out/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/mail_partner_opt_out/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mail_partner_opt_out/__manifest__.py b/mail_partner_opt_out/__manifest__.py new file mode 100644 index 0000000000..9122eedbd0 --- /dev/null +++ b/mail_partner_opt_out/__manifest__.py @@ -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"], +} diff --git a/mail_partner_opt_out/i18n/mail_partner_opt_out.pot b/mail_partner_opt_out/i18n/mail_partner_opt_out.pot new file mode 100644 index 0000000000..15f7c4b136 --- /dev/null +++ b/mail_partner_opt_out/i18n/mail_partner_opt_out.pot @@ -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 "" diff --git a/mail_partner_opt_out/models/__init__.py b/mail_partner_opt_out/models/__init__.py new file mode 100644 index 0000000000..32620734ac --- /dev/null +++ b/mail_partner_opt_out/models/__init__.py @@ -0,0 +1 @@ +from . import mail_thread_blacklist diff --git a/mail_partner_opt_out/models/mail_thread_blacklist.py b/mail_partner_opt_out/models/mail_thread_blacklist.py new file mode 100644 index 0000000000..736a1e0b01 --- /dev/null +++ b/mail_partner_opt_out/models/mail_thread_blacklist.py @@ -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) diff --git a/mail_partner_opt_out/readme/CONTRIBUTORS.rst b/mail_partner_opt_out/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..65caa64fa2 --- /dev/null +++ b/mail_partner_opt_out/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* ForgeFlow, S.L. (contact@forgeflow.com) + + * Jordi Ballester Alomar (jordi.ballester@forgeflow.com) diff --git a/mail_partner_opt_out/readme/DESCRIPTION.rst b/mail_partner_opt_out/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..175a0155ae --- /dev/null +++ b/mail_partner_opt_out/readme/DESCRIPTION.rst @@ -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 diff --git a/mail_partner_opt_out/readme/USAGE.rst b/mail_partner_opt_out/readme/USAGE.rst new file mode 100644 index 0000000000..f576e53971 --- /dev/null +++ b/mail_partner_opt_out/readme/USAGE.rst @@ -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. diff --git a/mail_partner_opt_out/static/description/icon.png b/mail_partner_opt_out/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/mail_partner_opt_out/static/description/icon.png differ diff --git a/mail_partner_opt_out/static/description/index.html b/mail_partner_opt_out/static/description/index.html new file mode 100644 index 0000000000..280ff373a3 --- /dev/null +++ b/mail_partner_opt_out/static/description/index.html @@ -0,0 +1,437 @@ + + + + + + +Mail Partner Opt Out + + + +
+

Mail Partner Opt Out

+ + +

Beta License: LGPL-3 OCA/social Translate me on Weblate Try me on Runbot

+

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

+ +
+

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. +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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • ForgeFlow
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/mail_partner_opt_out/views/res_partner_views.xml b/mail_partner_opt_out/views/res_partner_views.xml new file mode 100644 index 0000000000..3874630c87 --- /dev/null +++ b/mail_partner_opt_out/views/res_partner_views.xml @@ -0,0 +1,20 @@ + + + + res.partner.view.form.inherit.mail + res.partner + + + +