diff --git a/mail_debrand/README.rst b/mail_debrand/README.rst new file mode 100644 index 0000000..8ce988f --- /dev/null +++ b/mail_debrand/README.rst @@ -0,0 +1,111 @@ +============ +Mail Debrand +============ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-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_debrand + :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_debrand + :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 modifies the functionality of emails to remove the Odoo branding, +specifically the 'using Odoo' of notifications or the 'Powered by Odoo' + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +* Install it. +* Send an email. +* Nobody will know it comes from Odoo. + +Changelog +========= + +12.0.1.0.0 (2018-11-06) +~~~~~~~~~~~~~~~~~~~~~~~ + +* [NEW] Initial V12 version. Complete rewrite from v11. + +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 +~~~~~~~ + +* Tecnativa +* Eficent +* Onestein +* Sodexis +* Nexterp Romania + +Contributors +~~~~~~~~~~~~ + +* Lois Rilo +* Graeme Gellatly +* `Tecnativa `__: + + * Pedro M. Baeza + * João Marques + +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. + +.. |maintainer-pedrobaeza| image:: https://github.com/pedrobaeza.png?size=40px + :target: https://github.com/pedrobaeza + :alt: pedrobaeza +.. |maintainer-joao-p-marques| image:: https://github.com/joao-p-marques.png?size=40px + :target: https://github.com/joao-p-marques + :alt: joao-p-marques + +Current `maintainers `__: + +|maintainer-pedrobaeza| |maintainer-joao-p-marques| + +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_debrand/__init__.py b/mail_debrand/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/mail_debrand/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/mail_debrand/__manifest__.py b/mail_debrand/__manifest__.py new file mode 100644 index 0000000..661316e --- /dev/null +++ b/mail_debrand/__manifest__.py @@ -0,0 +1,26 @@ +# Copyright 2016 Tecnativa - Jairo Llopis +# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2019 Eficent Business and IT Consulting Services S.L. +# - Lois Rilo +# 2020 NextERP Romania +# Copyright 2021 Tecnativa - João Marques +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Mail Debrand", + "summary": """Remove Odoo branding in sent emails + Removes anchor 20characters + """, + "version": "15.0.1.0.0", + "category": "Social Network", + "website": "https://github.com/OCA/social", + "author": """Tecnativa, Eficent, Onestein, Sodexis, Nexterp Romania, + Odoo Community Association (OCA)""", + "license": "AGPL-3", + "installable": True, + "depends": ["mail"], + "development_status": "Production/Stable", + "maintainers": ["pedrobaeza", "joao-p-marques"], +} diff --git a/mail_debrand/i18n/es.po b/mail_debrand/i18n/es.po new file mode 100644 index 0000000..915efb7 --- /dev/null +++ b/mail_debrand/i18n/es.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-10-05 12:34+0000\n" +"Last-Translator: oihane \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "Conectar" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "Correos salientes" diff --git a/mail_debrand/i18n/fr.po b/mail_debrand/i18n/fr.po new file mode 100644 index 0000000..99a5a28 --- /dev/null +++ b/mail_debrand/i18n/fr.po @@ -0,0 +1,66 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-08-12 17:59+0000\n" +"Last-Translator: Weblate Admin \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "" + +#~ msgid "Email Templates" +#~ msgstr "Modèles d'emails" + +#~ msgid "Email Thread" +#~ msgstr "Discussion par email" + +#~ msgid "Odoo" +#~ msgstr "Odoo" + +#~ msgid "Powered by" +#~ msgstr "Propulsé par" + +#~ msgid "using" +#~ msgstr "utilisant" diff --git a/mail_debrand/i18n/fr_FR.po b/mail_debrand/i18n/fr_FR.po new file mode 100644 index 0000000..b85949b --- /dev/null +++ b/mail_debrand/i18n/fr_FR.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-04-11 18:46+0000\n" +"Last-Translator: Yves Le Doeuff \n" +"Language-Team: none\n" +"Language: fr_FR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "Dernière modification" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "Rendu du courrier" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "E-mails sortants" diff --git a/mail_debrand/i18n/it.po b/mail_debrand/i18n/it.po new file mode 100644 index 0000000..032493a --- /dev/null +++ b/mail_debrand/i18n/it.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-05-07 09:47+0000\n" +"Last-Translator: Sergio Zanchetta \n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "Nome visualizzato" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "ID" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "Ultima modifica il" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "Posta in uscita" diff --git a/mail_debrand/i18n/mail_debrand.pot b/mail_debrand/i18n/mail_debrand.pot new file mode 100644 index 0000000..eff668b --- /dev/null +++ b/mail_debrand/i18n/mail_debrand.pot @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +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_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "" diff --git a/mail_debrand/i18n/nl.po b/mail_debrand/i18n/nl.po new file mode 100644 index 0000000..6ea0329 --- /dev/null +++ b/mail_debrand/i18n/nl.po @@ -0,0 +1,66 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-05-17 21:47+0000\n" +"Last-Translator: Bosd \n" +"Language-Team: none\n" +"Language: nl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "" + +#, fuzzy +#~ msgid "Email Templates" +#~ msgstr "Email Templates" + +#, fuzzy +#~ msgid "Email Thread" +#~ msgstr "Email Thread" + +#, fuzzy +#~ msgid "Odoo" +#~ msgstr "Odoo" + +#~ msgid "Powered by" +#~ msgstr "Aangeboden door" diff --git a/mail_debrand/i18n/pt.po b/mail_debrand/i18n/pt.po new file mode 100644 index 0000000..8ce00d7 --- /dev/null +++ b/mail_debrand/i18n/pt.po @@ -0,0 +1,57 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-02 17:13+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "" + +#~ msgid "Email Templates" +#~ msgstr "Modelos de Email" + +#~ msgid "Email Thread" +#~ msgstr "Thread do email" diff --git a/mail_debrand/i18n/sl.po b/mail_debrand/i18n/sl.po new file mode 100644 index 0000000..c2e9d43 --- /dev/null +++ b/mail_debrand/i18n/sl.po @@ -0,0 +1,67 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2020-03-19 10:13+0000\n" +"Last-Translator: Matjaz Mozetic \n" +"Language-Team: none\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 3.10\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "" + +#~ msgid "Email Templates" +#~ msgstr "Predloge e-pošte" + +#~ msgid "Email Thread" +#~ msgstr "E-poštna nit" + +#~ msgid "Odoo" +#~ msgstr "Odoo" + +#~ msgid "Powered by" +#~ msgstr "Powered by" + +#~ msgid "using" +#~ msgstr "z uporabo" diff --git a/mail_debrand/i18n/sr_Latn.po b/mail_debrand/i18n/sr_Latn.po new file mode 100644 index 0000000..178cd94 --- /dev/null +++ b/mail_debrand/i18n/sr_Latn.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 13.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: sr_Latn\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "" diff --git a/mail_debrand/i18n/sv.po b/mail_debrand/i18n/sv.po new file mode 100644 index 0000000..caddba7 --- /dev/null +++ b/mail_debrand/i18n/sv.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-11-17 10:36+0000\n" +"Last-Translator: Simon S \n" +"Language-Team: none\n" +"Language: sv\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: mail_debrand +#: code:addons/mail_debrand/tests/test_mail_debrand_digest.py:0 +#, python-format +msgid "Connect" +msgstr "" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__display_name +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__display_name +msgid "Display Name" +msgstr "Visningsnamn" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail__id +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin__id +msgid "ID" +msgstr "ID" + +#. module: mail_debrand +#: model:ir.model.fields,field_description:mail_debrand.field_mail_mail____last_update +#: model:ir.model.fields,field_description:mail_debrand.field_mail_render_mixin____last_update +msgid "Last Modified on" +msgstr "Senast ändrad den" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_render_mixin +msgid "Mail Render Mixin" +msgstr "" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_mail +msgid "Outgoing Mails" +msgstr "Utgående e-postmeddelanden" diff --git a/mail_debrand/models/__init__.py b/mail_debrand/models/__init__.py new file mode 100644 index 0000000..1532c75 --- /dev/null +++ b/mail_debrand/models/__init__.py @@ -0,0 +1,2 @@ +from . import mail_render_mixin +from . import mail_mail diff --git a/mail_debrand/models/mail_mail.py b/mail_debrand/models/mail_mail.py new file mode 100644 index 0000000..4cd35bf --- /dev/null +++ b/mail_debrand/models/mail_mail.py @@ -0,0 +1,15 @@ +# Copyright 2019 O4SB - Graeme Gellatly +# Copyright 2019 Tecnativa - Ernesto Tejeda +# Copyright 2020 Onestein - Andrea Stirpe +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo import models + + +class MailMail(models.AbstractModel): + _inherit = "mail.mail" + + def _send_prepare_body(self): + body_html = super()._send_prepare_body() + return self.env["mail.render.mixin"].remove_href_odoo( + body_html or "", remove_parent=0, remove_before=1, to_keep=self.body + ) diff --git a/mail_debrand/models/mail_render_mixin.py b/mail_debrand/models/mail_render_mixin.py new file mode 100644 index 0000000..e81ac34 --- /dev/null +++ b/mail_debrand/models/mail_render_mixin.py @@ -0,0 +1,100 @@ +# Copyright 2019 O4SB - Graeme Gellatly +# Copyright 2019 Tecnativa - Ernesto Tejeda +# Copyright 2020 Onestein - Andrea Stirpe +# Copyright 2021 Tecnativa - João Marques +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +import re + +from lxml import etree, html + +from odoo import api, models + + +class MailRenderMixin(models.AbstractModel): + _inherit = "mail.render.mixin" + + def remove_href_odoo( + self, value, remove_parent=True, remove_before=False, to_keep=None + ): + if len(value) < 20: + return value + # value can be bytes type; ensure we get a proper string + if type(value) is bytes: + value = value.decode() + has_odoo_link = re.search(r" + previous.tail = "" + if remove_parent and len(parent.getparent()): + # anchor +* Graeme Gellatly +* `Tecnativa `__: + + * Pedro M. Baeza + * João Marques diff --git a/mail_debrand/readme/DESCRIPTION.rst b/mail_debrand/readme/DESCRIPTION.rst new file mode 100644 index 0000000..51b2b49 --- /dev/null +++ b/mail_debrand/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module modifies the functionality of emails to remove the Odoo branding, +specifically the 'using Odoo' of notifications or the 'Powered by Odoo' diff --git a/mail_debrand/readme/HISTORY.rst b/mail_debrand/readme/HISTORY.rst new file mode 100644 index 0000000..ad209cc --- /dev/null +++ b/mail_debrand/readme/HISTORY.rst @@ -0,0 +1,4 @@ +12.0.1.0.0 (2018-11-06) +~~~~~~~~~~~~~~~~~~~~~~~ + +* [NEW] Initial V12 version. Complete rewrite from v11. diff --git a/mail_debrand/readme/USAGE.rst b/mail_debrand/readme/USAGE.rst new file mode 100644 index 0000000..2a57dc0 --- /dev/null +++ b/mail_debrand/readme/USAGE.rst @@ -0,0 +1,5 @@ +To use this module, you need to: + +* Install it. +* Send an email. +* Nobody will know it comes from Odoo. diff --git a/mail_debrand/static/description/icon.png b/mail_debrand/static/description/icon.png new file mode 100644 index 0000000..06a30af Binary files /dev/null and b/mail_debrand/static/description/icon.png differ diff --git a/mail_debrand/static/description/icon.svg b/mail_debrand/static/description/icon.svg new file mode 100644 index 0000000..6609694 --- /dev/null +++ b/mail_debrand/static/description/icon.svg @@ -0,0 +1,248 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mail_debrand/static/description/index.html b/mail_debrand/static/description/index.html new file mode 100644 index 0000000..87a8976 --- /dev/null +++ b/mail_debrand/static/description/index.html @@ -0,0 +1,455 @@ + + + + + + +Mail Debrand + + + +
+

Mail Debrand

+ + +

Production/Stable License: AGPL-3 OCA/social Translate me on Weblate Try me on Runbot

+

This module modifies the functionality of emails to remove the Odoo branding, +specifically the ‘using Odoo’ of notifications or the ‘Powered by Odoo’

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Install it.
  • +
  • Send an email.
  • +
  • Nobody will know it comes from Odoo.
  • +
+
+
+

Changelog

+
+

12.0.1.0.0 (2018-11-06)

+
    +
  • [NEW] Initial V12 version. Complete rewrite from v11.
  • +
+
+
+
+

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

+
    +
  • Tecnativa
  • +
  • Eficent
  • +
  • Onestein
  • +
  • Sodexis
  • +
  • Nexterp Romania
  • +
+
+
+

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.

+

Current maintainers:

+

pedrobaeza joao-p-marques

+

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_debrand/tests/__init__.py b/mail_debrand/tests/__init__.py new file mode 100644 index 0000000..b52138d --- /dev/null +++ b/mail_debrand/tests/__init__.py @@ -0,0 +1,2 @@ +from . import test_mail_debrand +from . import test_mail_debrand_digest diff --git a/mail_debrand/tests/test_mail_debrand.py b/mail_debrand/tests/test_mail_debrand.py new file mode 100644 index 0000000..6f324f1 --- /dev/null +++ b/mail_debrand/tests/test_mail_debrand.py @@ -0,0 +1,103 @@ +# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2020 Onestein - Andrea Stirpe +# Copyright 2021 Sodexis +# Copyright 2021 Tecnativa - João Marques +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import common +from odoo.tools.misc import mute_logger + + +class TestMailDebrand(common.TransactionCase): + def setUp(self): + super().setUp() + self.default_template = self.env.ref("mail.message_notification_email") + self.paynow_template = self.env.ref("mail.mail_notification_paynow") + + def test_debrand_binary_value(self): + """ + Regression test: ensure binary input is gracefully handled + """ + try: + self.env["mail.template"].remove_href_odoo( + b"Binary value with more than 20 characters" + ) + except TypeError: + self.fail("Debranding binary string raised TypeError") + + def test_default_debrand(self): + self.assertIn("using", self.default_template.arch) + res = self.env["mail.template"]._render_template( + self.default_template.arch, "ir.ui.view", [self.default_template] + ) + self.assertNotIn("using", res) + + def test_paynow_debrand(self): + self.assertIn("Powered by", self.paynow_template.arch) + res = self.env["mail.template"]._render_template( + self.paynow_template.arch, "ir.ui.view", [self.paynow_template] + ) + self.assertNotIn("Powered by", res) + + def test_lang_paynow_debrand(self): + with mute_logger("odoo.addons.base.models.ir_translation"): + self.env["base.language.install"].create( + {"lang": "nl_NL", "overwrite": True} + ).lang_install() + with mute_logger("odoo.tools.translate"): + self.env["base.update.translations"].create({"lang": "nl_NL"}).act_update() + ctx = dict(lang="nl_NL") + paynow_arch = self.paynow_template.with_context(**ctx).arch + self.assertIn("Aangeboden door", paynow_arch) + res = self.env["mail.template"] + self.assertNotIn("Aangeboden door", res) + + def test_plaintext_email(self): + MailMessage = self.env["mail.mail"] + email_values = { + "email_from": "customer@example.com", + "subject": "Hello", + "email_to": "contact@example.com", + "reply_to": "contact@example.com", + } + # No exception expected + MailMessage.create(email_values) + + def test_body_intact(self): + """The message body should never be changed""" + MailMessage = self.env["mail.mail"] + original_body = ( + "

And if I send odoo.example.com

And odoo.com" + '

And https://odoo.com

And ' + 'https://odoo.example.com

' + ) + email_values = { + "email_from": "customer@example.com", + "subject": "Hello", + "email_to": "contact@example.com", + "reply_to": "contact@example.com", + "body": original_body, + "body_html": ( + "\n
\n\n\n

And if I send odoo.example.com

" + 'And odoo.com

And ' + 'https://odoo.com

And ' + "https://odoo.example.com

\n\n" + '
-- ' + '
\nAdministrator
\n' + '

\n Sent\n ' + '\n by\n \n ' + "YourCompany\n \n \n \n " + 'using\n Odoo' + ".\n

\n
\n " + ), + } + # No exception expected + message = MailMessage.create(email_values) + self.assertTrue(original_body in message._send_prepare_body()) diff --git a/mail_debrand/tests/test_mail_debrand_digest.py b/mail_debrand/tests/test_mail_debrand_digest.py new file mode 100644 index 0000000..10aca89 --- /dev/null +++ b/mail_debrand/tests/test_mail_debrand_digest.py @@ -0,0 +1,70 @@ +# Copyright 2017 Tecnativa - Pedro M. Baeza +# Copyright 2020 Onestein - Andrea Stirpe +# Copyright 2021 Sodexis +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from datetime import datetime + +from werkzeug.urls import url_join + +from odoo import _ +from odoo.tests import common, tagged + + +@tagged("-at_install", "post_install") +class TestMailDebrandDigest(common.TransactionCase): + def setUp(self): + super().setUp() + if "digest.digest" in self.env: + self.mail_digest_id = self.env["digest.digest"].create( + { + "name": "Test Digest", + "user_ids": False, + "company_id": self.env.company.id, + "kpi_res_users_connected": True, + "kpi_mail_message_total": True, + } + ) + else: + self.mail_digest_id = False + + def test_mail_digest(self): + if not self.mail_digest_id: + self.assertEqual(True, True) + return + + web_base_url = self.env["ir.config_parameter"].sudo().get_param("web.base.url") + rendered_body = self.env["mail.render.mixin"]._render_template( + "digest.digest_mail_main", + "digest.digest", + self.mail_digest_id.ids, + engine="qweb", + add_context={ + "title": self.mail_digest_id.name, + "top_button_label": _("Connect"), + "top_button_url": url_join(web_base_url, "/web/login"), + "company": self.env.user.company_id, + "user": self.env.user, + "tips_count": 1, + "formatted_date": datetime.today().strftime("%B %d, %Y"), + "display_mobile_banner": True, + "kpi_data": self.mail_digest_id.compute_kpis( + self.env.user.company_id, self.env.user + ), + "tips": self.mail_digest_id.compute_tips( + self.env.user.company_id, self.env.user, tips_count=1, consumed=True + ), + "preferences": self.mail_digest_id.compute_preferences( + self.env.user.company_id, self.env.user + ), + }, + post_process=True, + )[self.mail_digest_id.id] + + # ensure the template rendered correctly. if rendering failed, + # we sometimes end up with a string only containing the template + # name, or a null-ish value + self.assertNotEqual(rendered_body, "digest.digest_mail_main") + self.assertNotEqual(rendered_body, None) + self.assertNotEqual(rendered_body, False) + self.assertNotEqual(rendered_body, "") diff --git a/setup/mail_debrand/odoo/addons/mail_debrand b/setup/mail_debrand/odoo/addons/mail_debrand new file mode 120000 index 0000000..e7a9f49 --- /dev/null +++ b/setup/mail_debrand/odoo/addons/mail_debrand @@ -0,0 +1 @@ +../../../../mail_debrand \ No newline at end of file diff --git a/setup/mail_debrand/setup.py b/setup/mail_debrand/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/mail_debrand/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)