From 1fbd15f88c52c8514b7a81bc8e5399764ddadc62 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 15 May 2017 16:52:27 +0200 Subject: [PATCH 1/5] [MIG] mail_debrand There's no commits preservation, as the module doesn't serve as is on v9. --- mail_debrand/README.rst | 73 +++++++ mail_debrand/__init__.py | 4 + mail_debrand/__openerp__.py | 21 ++ mail_debrand/i18n/es.po | 34 ++++ mail_debrand/models/__init__.py | 4 + mail_debrand/models/mail_template.py | 43 ++++ mail_debrand/static/description/icon.png | Bin 0 -> 5367 bytes mail_debrand/static/description/icon.svg | 248 +++++++++++++++++++++++ mail_debrand/tests/__init__.py | 4 + mail_debrand/tests/test_mail_debrand.py | 26 +++ 10 files changed, 457 insertions(+) create mode 100644 mail_debrand/README.rst create mode 100644 mail_debrand/__init__.py create mode 100644 mail_debrand/__openerp__.py create mode 100644 mail_debrand/i18n/es.po create mode 100644 mail_debrand/models/__init__.py create mode 100644 mail_debrand/models/mail_template.py create mode 100644 mail_debrand/static/description/icon.png create mode 100644 mail_debrand/static/description/icon.svg create mode 100644 mail_debrand/tests/__init__.py create mode 100644 mail_debrand/tests/test_mail_debrand.py diff --git a/mail_debrand/README.rst b/mail_debrand/README.rst new file mode 100644 index 000000000..d9f21516b --- /dev/null +++ b/mail_debrand/README.rst @@ -0,0 +1,73 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============ +Mail Debrand +============ + +This module modifies the functionality of emails to remove the Odoo branding. + +It also allows some context options to remove user and company signatures too. + +Usage +===== + +To use this module, you need to: + +* Install it. +* Send an email. +* Nobody will know it comes from Odoo. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/205/10.0 + + +Known issues / Roadmap +====================== + +* This module relies on the translation of the strings here in this module that + must match the mail notification template translation on Odoo core, + specifically the words "using" and "Odoo". + +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. + +Credits +======= + +Contributors +------------ + +* Rafael Blasco +* Jairo Llopis +* Jordi Ballester Alomar +* Darshan Patel +* Pedro M. Baeza + +Images +------ + +* https://openclipart.org/detail/29117/unread-mail-icon +* https://openclipart.org/detail/147961/panneau-interdit-forbidden-road-sign-basic + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/mail_debrand/__init__.py b/mail_debrand/__init__.py new file mode 100644 index 000000000..a77a6fcbc --- /dev/null +++ b/mail_debrand/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/mail_debrand/__openerp__.py b/mail_debrand/__openerp__.py new file mode 100644 index 000000000..9445ac5d7 --- /dev/null +++ b/mail_debrand/__openerp__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Tecnativa - Jairo Llopis +# Copyright 2017 SerpentCS - Darshan Patel +# Copyright 2017 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Mail Debrand", + "summary": "Remove Odoo branding in sent emails", + "version": "10.0.1.0.0", + "category": "Social Network", + "website": "https://www.tecnativa.com", + "author": "Tecnativa, " + "Eficent, " + "Odoo Community Association (OCA)", + "license": "AGPL-3", + "installable": True, + "depends": [ + "mail", + ], +} diff --git a/mail_debrand/i18n/es.po b/mail_debrand/i18n/es.po new file mode 100644 index 000000000..d0eb1d65c --- /dev/null +++ b/mail_debrand/i18n/es.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-15 14:50+0000\n" +"PO-Revision-Date: 2017-05-15 14:50+0000\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 +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Plantillas de correo electrónico" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "Odoo" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "usando" + diff --git a/mail_debrand/models/__init__.py b/mail_debrand/models/__init__.py new file mode 100644 index 000000000..c290298c9 --- /dev/null +++ b/mail_debrand/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import mail_template diff --git a/mail_debrand/models/mail_template.py b/mail_debrand/models/mail_template.py new file mode 100644 index 000000000..d4b984db0 --- /dev/null +++ b/mail_debrand/models/mail_template.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import re +from odoo import _, api, models + + +class MailTemplate(models.Model): + _inherit = 'mail.template' + + @api.multi + def generate_email(self, res_ids, fields=None): + mail_template = self.env.ref( + 'mail.mail_template_data_notification_email_default' + ) + if self == mail_template: + obj = self.with_context(mail_debrand=True) + else: + obj = self + return super(MailTemplate, obj).generate_email(res_ids, fields=fields) + + @api.model + def _debrand_body(self, body): + using_word = _('using') + odoo_word = _('Odoo') + return re.sub( + using_word + "(.*)[\r\n]*(.*)>" + odoo_word + r"", "", body, + ) + + @api.model + def render_template(self, template_txt, model, res_ids, + post_process=False): + res = super(MailTemplate, self).render_template( + template_txt, model, res_ids, post_process=post_process, + ) + if post_process and self.env.context.get('mail_debrand'): + if isinstance(res, basestring): + res = self._debrand_body(res) + else: + for res_id, body in res.iteritems(): + res[res_id] = self._debrand_body(body) + return res diff --git a/mail_debrand/static/description/icon.png b/mail_debrand/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..06a30af91980c5ae9d1dd04fb396e0bb723cdfc3 GIT binary patch literal 5367 zcmWky2Q=JG5dYulqMYFLE{IM-ba$K{T|_SlqW9?Jj))K?2_gEOC`pLUi4v#xD2d)n zIP&SjCECZnH#=|kw>$IO*|)RrZM>0z7BwX+B>(`_I@$=6D~-Gsa?-25L&b66N)ZRB z>6npUwFq*jmsd80ueN2t)%?k80jUXPhg=P^1Zr3Wn)t@?pbi3V7Lv1_8yd*);9HL>RsmJ{93X{jK*>mA{n~7eK|Js_c%o)b{&2cw$rx=t}w9+Dfz{yzJNQ~pjU&?_CV3Lrxf#(Zc zSbBAQdE@wau9?EQe2D>fB({Io8vFZVr=_*jR}=IE{1B7@^niK*OYy&B{BhC_OqC=S z6oX_F{H4`OOX{$(hvaX<2v+at$=wP%26;(q4nt0ib$yCJEazZ;VJY;-ZQ zI6k^BwUtJW@;%4uAy!{lVaW&{i~|>cy~{sO&ky|}*s9OpA_0HP1{ACYe$rPwpcb@ks(tpJr+UXJTQ5^)cBJRVb?6;Kw?KJN+>48Fx*V<>S zTw8F!K|GpGpLJAQ=lL}%%pn|n^9o&xL$Gjd83V7Oa3%h+YmbaHNs@HeNGyVl3(S2L z3-{cKnJa=4J%^F9BL>{)4>C$<=JaeRov|3^<-R%`U!cW&(Y(D#S)t z9zj2ou0!>+vuBpVki8sL^eK!{gk z3_)iMd;!%YSG1Tj)`B|KjS^|8Er1b84G8}=DmSlfOAfH6lSjKmXoEno4hS4_?at^X zUx4imAX+RM&B|q>ea$8NccngD_L|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V?d00001 diff --git a/mail_debrand/static/description/icon.svg b/mail_debrand/static/description/icon.svg new file mode 100644 index 000000000..6609694df --- /dev/null +++ b/mail_debrand/static/description/icon.svg @@ -0,0 +1,248 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mail_debrand/tests/__init__.py b/mail_debrand/tests/__init__.py new file mode 100644 index 000000000..62fe23ea8 --- /dev/null +++ b/mail_debrand/tests/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_mail_debrand diff --git a/mail_debrand/tests/test_mail_debrand.py b/mail_debrand/tests/test_mail_debrand.py new file mode 100644 index 000000000..4878adf93 --- /dev/null +++ b/mail_debrand/tests/test_mail_debrand.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Tecnativa - Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo.tests import common + + +class TestMailDebrand(common.SavepointCase): + @classmethod + def setUpClass(cls): + super(TestMailDebrand, cls).setUpClass() + cls.template = cls.env.ref( + 'mail.mail_template_data_notification_email_default' + ) + + def test_generate_email_simple(self): + res = self.template.generate_email( + self.env.user.id, fields=['body_html'], + ) + self.assertNotIn('using', res) + + def test_generate_email_multi(self): + res = self.template.generate_email( + self.env.user.ids, fields=['body_html'], + ) + self.assertNotIn('using', res[res.keys()[0]]) From 5233d1653689b700d6245b4006def61ab013784f Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 27 Jan 2018 14:34:59 +0100 Subject: [PATCH 2/5] OCA Transbot updated translations from Transifex --- mail_debrand/i18n/de.po | 36 ++++++++++++++++++++++++++++++++++++ mail_debrand/i18n/es_MX.po | 36 ++++++++++++++++++++++++++++++++++++ mail_debrand/i18n/fr.po | 36 ++++++++++++++++++++++++++++++++++++ mail_debrand/i18n/hr.po | 36 ++++++++++++++++++++++++++++++++++++ mail_debrand/i18n/it.po | 36 ++++++++++++++++++++++++++++++++++++ mail_debrand/i18n/nl_NL.po | 36 ++++++++++++++++++++++++++++++++++++ mail_debrand/i18n/zh_CN.po | 36 ++++++++++++++++++++++++++++++++++++ 7 files changed, 252 insertions(+) create mode 100644 mail_debrand/i18n/de.po create mode 100644 mail_debrand/i18n/es_MX.po create mode 100644 mail_debrand/i18n/fr.po create mode 100644 mail_debrand/i18n/hr.po create mode 100644 mail_debrand/i18n/it.po create mode 100644 mail_debrand/i18n/nl_NL.po create mode 100644 mail_debrand/i18n/zh_CN.po diff --git a/mail_debrand/i18n/de.po b/mail_debrand/i18n/de.po new file mode 100644 index 000000000..de8cfc660 --- /dev/null +++ b/mail_debrand/i18n/de.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +# Translators: +# Niki Waibel, 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-24 03:51+0000\n" +"PO-Revision-Date: 2018-01-24 03:51+0000\n" +"Last-Translator: Niki Waibel, 2018\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "E-Mail Vorlagen" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/es_MX.po b/mail_debrand/i18n/es_MX.po new file mode 100644 index 000000000..a3fe54652 --- /dev/null +++ b/mail_debrand/i18n/es_MX.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-24 03:51+0000\n" +"PO-Revision-Date: 2018-01-24 03:51+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/es_MX/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_MX\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Plantillas de Correo Electrónico" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/fr.po b/mail_debrand/i18n/fr.po new file mode 100644 index 000000000..0de790ba6 --- /dev/null +++ b/mail_debrand/i18n/fr.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +# Translators: +# Quentin THEURET , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-26 01:46+0000\n" +"PO-Revision-Date: 2018-02-26 01:46+0000\n" +"Last-Translator: Quentin THEURET , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Modèles de courriel" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "Odoo" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "utilisant" diff --git a/mail_debrand/i18n/hr.po b/mail_debrand/i18n/hr.po new file mode 100644 index 000000000..cd64b9c54 --- /dev/null +++ b/mail_debrand/i18n/hr.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-24 03:51+0000\n" +"PO-Revision-Date: 2018-01-24 03:51+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\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 +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Predlošci mailova" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/it.po b/mail_debrand/i18n/it.po new file mode 100644 index 000000000..2174c0bbf --- /dev/null +++ b/mail_debrand/i18n/it.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +# Translators: +# Marius Marolla , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-24 03:51+0000\n" +"PO-Revision-Date: 2018-01-24 03:51+0000\n" +"Last-Translator: Marius Marolla , 2018\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Modelli Email" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/nl_NL.po b/mail_debrand/i18n/nl_NL.po new file mode 100644 index 000000000..ed30ddaec --- /dev/null +++ b/mail_debrand/i18n/nl_NL.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +# Translators: +# Peter Hageman , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-24 03:51+0000\n" +"PO-Revision-Date: 2018-01-24 03:51+0000\n" +"Last-Translator: Peter Hageman , 2018\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "E-mailsjablonen" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "" diff --git a/mail_debrand/i18n/zh_CN.po b/mail_debrand/i18n/zh_CN.po new file mode 100644 index 000000000..60344b8ab --- /dev/null +++ b/mail_debrand/i18n/zh_CN.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-24 03:51+0000\n" +"PO-Revision-Date: 2018-01-24 03:51+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: mail_debrand +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "Email 模板" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:26 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "using" +msgstr "" From 0332039c33447b714b8bc94fd50d9a4e4403e1a1 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Wed, 25 Apr 2018 16:35:54 +0200 Subject: [PATCH 3/5] [11.0][MIG] mail_debrand --- mail_debrand/README.rst | 5 +++-- mail_debrand/__init__.py | 1 - mail_debrand/{__openerp__.py => __manifest__.py} | 3 +-- mail_debrand/models/__init__.py | 1 - mail_debrand/models/mail_template.py | 5 ++--- mail_debrand/tests/__init__.py | 1 - mail_debrand/tests/test_mail_debrand.py | 3 +-- 7 files changed, 7 insertions(+), 12 deletions(-) rename mail_debrand/{__openerp__.py => __manifest__.py} (91%) diff --git a/mail_debrand/README.rst b/mail_debrand/README.rst index d9f21516b..be9de7de3 100644 --- a/mail_debrand/README.rst +++ b/mail_debrand/README.rst @@ -1,4 +1,4 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg +.. 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 @@ -21,7 +21,7 @@ To use this module, you need to: .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/205/10.0 + :target: https://runbot.odoo-community.org/runbot/205/11.0 Known issues / Roadmap @@ -50,6 +50,7 @@ Contributors * Jordi Ballester Alomar * Darshan Patel * Pedro M. Baeza +* Lois Rilo Images ------ diff --git a/mail_debrand/__init__.py b/mail_debrand/__init__.py index a77a6fcbc..83e553ac4 100644 --- a/mail_debrand/__init__.py +++ b/mail_debrand/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/mail_debrand/__openerp__.py b/mail_debrand/__manifest__.py similarity index 91% rename from mail_debrand/__openerp__.py rename to mail_debrand/__manifest__.py index 9445ac5d7..e60d41f07 100644 --- a/mail_debrand/__openerp__.py +++ b/mail_debrand/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Tecnativa - Jairo Llopis # Copyright 2017 SerpentCS - Darshan Patel # Copyright 2017 Tecnativa - Pedro M. Baeza @@ -7,7 +6,7 @@ { "name": "Mail Debrand", "summary": "Remove Odoo branding in sent emails", - "version": "10.0.1.0.0", + "version": "11.0.1.0.0", "category": "Social Network", "website": "https://www.tecnativa.com", "author": "Tecnativa, " diff --git a/mail_debrand/models/__init__.py b/mail_debrand/models/__init__.py index c290298c9..74b313100 100644 --- a/mail_debrand/models/__init__.py +++ b/mail_debrand/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import mail_template diff --git a/mail_debrand/models/mail_template.py b/mail_debrand/models/mail_template.py index d4b984db0..974a4180b 100644 --- a/mail_debrand/models/mail_template.py +++ b/mail_debrand/models/mail_template.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -35,9 +34,9 @@ class MailTemplate(models.Model): template_txt, model, res_ids, post_process=post_process, ) if post_process and self.env.context.get('mail_debrand'): - if isinstance(res, basestring): + if isinstance(res, str): res = self._debrand_body(res) else: - for res_id, body in res.iteritems(): + for res_id, body in res.items(): res[res_id] = self._debrand_body(body) return res diff --git a/mail_debrand/tests/__init__.py b/mail_debrand/tests/__init__.py index 62fe23ea8..df7180274 100644 --- a/mail_debrand/tests/__init__.py +++ b/mail_debrand/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_mail_debrand diff --git a/mail_debrand/tests/test_mail_debrand.py b/mail_debrand/tests/test_mail_debrand.py index 4878adf93..116b8b79b 100644 --- a/mail_debrand/tests/test_mail_debrand.py +++ b/mail_debrand/tests/test_mail_debrand.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -23,4 +22,4 @@ class TestMailDebrand(common.SavepointCase): res = self.template.generate_email( self.env.user.ids, fields=['body_html'], ) - self.assertNotIn('using', res[res.keys()[0]]) + self.assertNotIn('using', res[[*res.keys()][0]]) From 776f65e732ec8278e1a401210fdeadc7aa114ef9 Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sun, 17 Jun 2018 19:58:28 +0000 Subject: [PATCH 4/5] [UPD] Update mail_debrand.pot --- mail_debrand/i18n/de.po | 8 ++++---- mail_debrand/i18n/es.po | 8 ++++---- mail_debrand/i18n/es_MX.po | 11 +++++----- mail_debrand/i18n/fr.po | 8 ++++---- mail_debrand/i18n/hr.po | 11 +++++----- mail_debrand/i18n/it.po | 8 ++++---- mail_debrand/i18n/mail_debrand.pot | 32 ++++++++++++++++++++++++++++++ mail_debrand/i18n/nl_NL.po | 11 +++++----- mail_debrand/i18n/zh_CN.po | 11 +++++----- 9 files changed, 72 insertions(+), 36 deletions(-) create mode 100644 mail_debrand/i18n/mail_debrand.pot diff --git a/mail_debrand/i18n/de.po b/mail_debrand/i18n/de.po index de8cfc660..d11dfe4d4 100644 --- a/mail_debrand/i18n/de.po +++ b/mail_debrand/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mail_debrand -# +# # Translators: # Niki Waibel, 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-01-24 03:51+0000\n" "Last-Translator: Niki Waibel, 2018\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: mail_debrand @@ -24,13 +24,13 @@ msgid "Email Templates" msgstr "E-Mail Vorlagen" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "" diff --git a/mail_debrand/i18n/es.po b/mail_debrand/i18n/es.po index d0eb1d65c..8b9959756 100644 --- a/mail_debrand/i18n/es.po +++ b/mail_debrand/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * mail_debrand +# * mail_debrand # msgid "" msgstr "" @@ -10,6 +10,7 @@ msgstr "" "PO-Revision-Date: 2017-05-15 14:50+0000\n" "Last-Translator: <>\n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -21,14 +22,13 @@ msgid "Email Templates" msgstr "Plantillas de correo electrónico" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "Odoo" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "usando" - diff --git a/mail_debrand/i18n/es_MX.po b/mail_debrand/i18n/es_MX.po index a3fe54652..0500f615c 100644 --- a/mail_debrand/i18n/es_MX.po +++ b/mail_debrand/i18n/es_MX.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mail_debrand -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2018-01-24 03:51+0000\n" "PO-Revision-Date: 2018-01-24 03:51+0000\n" "Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/es_MX/)\n" +"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/" +"es_MX/)\n" +"Language: es_MX\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es_MX\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: mail_debrand @@ -24,13 +25,13 @@ msgid "Email Templates" msgstr "Plantillas de Correo Electrónico" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "" diff --git a/mail_debrand/i18n/fr.po b/mail_debrand/i18n/fr.po index 0de790ba6..a66dada79 100644 --- a/mail_debrand/i18n/fr.po +++ b/mail_debrand/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mail_debrand -# +# # Translators: # Quentin THEURET , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-02-26 01:46+0000\n" "Last-Translator: Quentin THEURET , 2018\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: mail_debrand @@ -24,13 +24,13 @@ msgid "Email Templates" msgstr "Modèles de courriel" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "Odoo" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "utilisant" diff --git a/mail_debrand/i18n/hr.po b/mail_debrand/i18n/hr.po index cd64b9c54..104f3f168 100644 --- a/mail_debrand/i18n/hr.po +++ b/mail_debrand/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mail_debrand -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -12,11 +12,12 @@ msgstr "" "PO-Revision-Date: 2018-01-24 03:51+0000\n" "Last-Translator: OCA Transbot , 2018\n" "Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: hr\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" +"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 #: model:ir.model,name:mail_debrand.model_mail_template @@ -24,13 +25,13 @@ msgid "Email Templates" msgstr "Predlošci mailova" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "" diff --git a/mail_debrand/i18n/it.po b/mail_debrand/i18n/it.po index 2174c0bbf..9b4a86308 100644 --- a/mail_debrand/i18n/it.po +++ b/mail_debrand/i18n/it.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mail_debrand -# +# # Translators: # Marius Marolla , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-01-24 03:51+0000\n" "Last-Translator: Marius Marolla , 2018\n" "Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: mail_debrand @@ -24,13 +24,13 @@ msgid "Email Templates" msgstr "Modelli Email" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "" diff --git a/mail_debrand/i18n/mail_debrand.pot b/mail_debrand/i18n/mail_debrand.pot new file mode 100644 index 000000000..22a54835d --- /dev/null +++ b/mail_debrand/i18n/mail_debrand.pot @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_debrand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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 +#: model:ir.model,name:mail_debrand.model_mail_template +msgid "Email Templates" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:25 +#, python-format +msgid "Odoo" +msgstr "" + +#. module: mail_debrand +#: code:addons/mail_debrand/models/mail_template.py:24 +#, python-format +msgid "using" +msgstr "" + diff --git a/mail_debrand/i18n/nl_NL.po b/mail_debrand/i18n/nl_NL.po index ed30ddaec..b7ed499b6 100644 --- a/mail_debrand/i18n/nl_NL.po +++ b/mail_debrand/i18n/nl_NL.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mail_debrand -# +# # Translators: # Peter Hageman , 2018 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2018-01-24 03:51+0000\n" "PO-Revision-Date: 2018-01-24 03:51+0000\n" "Last-Translator: Peter Hageman , 2018\n" -"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nl_NL\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: mail_debrand @@ -24,13 +25,13 @@ msgid "Email Templates" msgstr "E-mailsjablonen" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "" diff --git a/mail_debrand/i18n/zh_CN.po b/mail_debrand/i18n/zh_CN.po index 60344b8ab..bb1f5a6fe 100644 --- a/mail_debrand/i18n/zh_CN.po +++ b/mail_debrand/i18n/zh_CN.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * mail_debrand -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2018-01-24 03:51+0000\n" "PO-Revision-Date: 2018-01-24 03:51+0000\n" "Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/zh_CN/)\n" +"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/" +"zh_CN/)\n" +"Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #. module: mail_debrand @@ -24,13 +25,13 @@ msgid "Email Templates" msgstr "Email 模板" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:26 +#: code:addons/mail_debrand/models/mail_template.py:25 #, python-format msgid "Odoo" msgstr "" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 +#: code:addons/mail_debrand/models/mail_template.py:24 #, python-format msgid "using" msgstr "" From 0b84d92c0a9b9562dd47b9536428a4620bebc615 Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Wed, 7 Nov 2018 18:12:38 +1300 Subject: [PATCH 5/5] Rewrite mail_debrand for v12 --- mail_debrand/README.rst | 84 ++-- mail_debrand/__init__.py | 3 - mail_debrand/__manifest__.py | 14 +- mail_debrand/i18n/de.po | 36 -- mail_debrand/i18n/es.po | 34 -- mail_debrand/i18n/es_MX.po | 37 -- mail_debrand/i18n/fr.po | 36 -- mail_debrand/i18n/hr.po | 37 -- mail_debrand/i18n/it.po | 36 -- mail_debrand/i18n/mail_debrand.pot | 19 +- mail_debrand/i18n/nl_NL.po | 37 -- mail_debrand/i18n/zh_CN.po | 37 -- mail_debrand/models/__init__.py | 3 - mail_debrand/models/mail_template.py | 42 -- mail_debrand/readme/CONTRIBUTORS.rst | 1 + mail_debrand/readme/DESCRIPTION.rst | 2 + mail_debrand/readme/HISTORY.rst | 4 + mail_debrand/readme/USAGE.rst | 5 + mail_debrand/static/description/index.html | 436 ++++++++++++++++++ mail_debrand/tests/__init__.py | 3 - mail_debrand/tests/test_mail_debrand.py | 25 - mail_debrand/views/mail_notification_view.xml | 29 ++ 22 files changed, 537 insertions(+), 423 deletions(-) delete mode 100644 mail_debrand/i18n/de.po delete mode 100644 mail_debrand/i18n/es.po delete mode 100644 mail_debrand/i18n/es_MX.po delete mode 100644 mail_debrand/i18n/fr.po delete mode 100644 mail_debrand/i18n/hr.po delete mode 100644 mail_debrand/i18n/it.po delete mode 100644 mail_debrand/i18n/nl_NL.po delete mode 100644 mail_debrand/i18n/zh_CN.po delete mode 100644 mail_debrand/models/__init__.py delete mode 100644 mail_debrand/models/mail_template.py create mode 100644 mail_debrand/readme/CONTRIBUTORS.rst create mode 100644 mail_debrand/readme/DESCRIPTION.rst create mode 100644 mail_debrand/readme/HISTORY.rst create mode 100644 mail_debrand/readme/USAGE.rst create mode 100644 mail_debrand/static/description/index.html delete mode 100644 mail_debrand/tests/__init__.py delete mode 100644 mail_debrand/tests/test_mail_debrand.py create mode 100644 mail_debrand/views/mail_notification_view.xml diff --git a/mail_debrand/README.rst b/mail_debrand/README.rst index be9de7de3..993ba42b7 100644 --- a/mail_debrand/README.rst +++ b/mail_debrand/README.rst @@ -1,14 +1,37 @@ -.. 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 - ============ Mail Debrand ============ -This module modifies the functionality of emails to remove the Odoo branding. +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -It also allows some context options to remove user and company signatures too. +.. |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-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/12.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-12-0/social-12-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/12.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 ===== @@ -19,56 +42,45 @@ To use this module, you need to: * Send an email. * Nobody will know it comes from Odoo. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/205/11.0 +Changelog +========= +12.0.1.0.0 (2018-11-06) +~~~~~~~~~~~~~~~~~~~~~~~ -Known issues / Roadmap -====================== - -* This module relies on the translation of the strings here in this module that - must match the mail notification template translation on Odoo core, - specifically the words "using" and "Odoo". +* [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. +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 ======= Contributors ------------- +~~~~~~~~~~~~ -* Rafael Blasco -* Jairo Llopis -* Jordi Ballester Alomar -* Darshan Patel -* Pedro M. Baeza -* Lois Rilo +* Graeme Gellatly -Images ------- +Maintainers +~~~~~~~~~~~ -* https://openclipart.org/detail/29117/unread-mail-icon -* https://openclipart.org/detail/147961/panneau-interdit-forbidden-road-sign-basic - -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit https://odoo-community.org. +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 index 83e553ac4..e69de29bb 100644 --- a/mail_debrand/__init__.py +++ b/mail_debrand/__init__.py @@ -1,3 +0,0 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from . import models diff --git a/mail_debrand/__manifest__.py b/mail_debrand/__manifest__.py index e60d41f07..9d5f58eec 100644 --- a/mail_debrand/__manifest__.py +++ b/mail_debrand/__manifest__.py @@ -1,20 +1,18 @@ -# Copyright 2016 Tecnativa - Jairo Llopis -# Copyright 2017 SerpentCS - Darshan Patel -# Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Mail Debrand", "summary": "Remove Odoo branding in sent emails", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "category": "Social Network", - "website": "https://www.tecnativa.com", - "author": "Tecnativa, " - "Eficent, " - "Odoo Community Association (OCA)", + "website": "https://odoo-community.org/", + "author": "Odoo Community Association (OCA)", "license": "AGPL-3", "installable": True, "depends": [ "mail", ], + "data": [ + 'views/mail_notification_view.xml' + ] } diff --git a/mail_debrand/i18n/de.po b/mail_debrand/i18n/de.po deleted file mode 100644 index d11dfe4d4..000000000 --- a/mail_debrand/i18n/de.po +++ /dev/null @@ -1,36 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -# Translators: -# Niki Waibel, 2018 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-24 03:51+0000\n" -"PO-Revision-Date: 2018-01-24 03:51+0000\n" -"Last-Translator: Niki Waibel, 2018\n" -"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" -"Language: de\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" - -#. module: mail_debrand -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "E-Mail Vorlagen" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "" diff --git a/mail_debrand/i18n/es.po b/mail_debrand/i18n/es.po deleted file mode 100644 index 8b9959756..000000000 --- a/mail_debrand/i18n/es.po +++ /dev/null @@ -1,34 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-15 14:50+0000\n" -"PO-Revision-Date: 2017-05-15 14:50+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: mail_debrand -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "Plantillas de correo electrónico" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "Odoo" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "usando" diff --git a/mail_debrand/i18n/es_MX.po b/mail_debrand/i18n/es_MX.po deleted file mode 100644 index 0500f615c..000000000 --- a/mail_debrand/i18n/es_MX.po +++ /dev/null @@ -1,37 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -# Translators: -# OCA Transbot , 2018 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-24 03:51+0000\n" -"PO-Revision-Date: 2018-01-24 03:51+0000\n" -"Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Spanish (Mexico) (https://www.transifex.com/oca/teams/23907/" -"es_MX/)\n" -"Language: es_MX\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" - -#. module: mail_debrand -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "Plantillas de Correo Electrónico" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "" diff --git a/mail_debrand/i18n/fr.po b/mail_debrand/i18n/fr.po deleted file mode 100644 index a66dada79..000000000 --- a/mail_debrand/i18n/fr.po +++ /dev/null @@ -1,36 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -# Translators: -# Quentin THEURET , 2018 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-26 01:46+0000\n" -"PO-Revision-Date: 2018-02-26 01:46+0000\n" -"Last-Translator: Quentin THEURET , 2018\n" -"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\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" - -#. module: mail_debrand -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "Modèles de courriel" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "Odoo" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "utilisant" diff --git a/mail_debrand/i18n/hr.po b/mail_debrand/i18n/hr.po deleted file mode 100644 index 104f3f168..000000000 --- a/mail_debrand/i18n/hr.po +++ /dev/null @@ -1,37 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -# Translators: -# OCA Transbot , 2018 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-24 03:51+0000\n" -"PO-Revision-Date: 2018-01-24 03:51+0000\n" -"Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" -"Language: hr\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 -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "Predlošci mailova" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "" diff --git a/mail_debrand/i18n/it.po b/mail_debrand/i18n/it.po deleted file mode 100644 index 9b4a86308..000000000 --- a/mail_debrand/i18n/it.po +++ /dev/null @@ -1,36 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -# Translators: -# Marius Marolla , 2018 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-24 03:51+0000\n" -"PO-Revision-Date: 2018-01-24 03:51+0000\n" -"Last-Translator: Marius Marolla , 2018\n" -"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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" - -#. module: mail_debrand -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "Modelli Email" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "" diff --git a/mail_debrand/i18n/mail_debrand.pot b/mail_debrand/i18n/mail_debrand.pot index 22a54835d..27b591403 100644 --- a/mail_debrand/i18n/mail_debrand.pot +++ b/mail_debrand/i18n/mail_debrand.pot @@ -1,11 +1,12 @@ -# Translation of Odoo Server. # This file contains the translation of the following modules: -# * mail_debrand +# * mail_debrand # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-11-07 07:23+0000\n" +"PO-Revision-Date: 2018-11-07 07:23+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -19,14 +20,6 @@ msgid "Email Templates" msgstr "" #. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" +#: model_terms:ir.ui.view,arch_db:mail_debrand.message_notification_email +msgid "Sent by" msgstr "" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "" - diff --git a/mail_debrand/i18n/nl_NL.po b/mail_debrand/i18n/nl_NL.po deleted file mode 100644 index b7ed499b6..000000000 --- a/mail_debrand/i18n/nl_NL.po +++ /dev/null @@ -1,37 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -# Translators: -# Peter Hageman , 2018 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-24 03:51+0000\n" -"PO-Revision-Date: 2018-01-24 03:51+0000\n" -"Last-Translator: Peter Hageman , 2018\n" -"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" -"teams/23907/nl_NL/)\n" -"Language: nl_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" - -#. module: mail_debrand -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "E-mailsjablonen" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "" diff --git a/mail_debrand/i18n/zh_CN.po b/mail_debrand/i18n/zh_CN.po deleted file mode 100644 index bb1f5a6fe..000000000 --- a/mail_debrand/i18n/zh_CN.po +++ /dev/null @@ -1,37 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * mail_debrand -# -# Translators: -# OCA Transbot , 2018 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-01-24 03:51+0000\n" -"PO-Revision-Date: 2018-01-24 03:51+0000\n" -"Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Chinese (China) (https://www.transifex.com/oca/teams/23907/" -"zh_CN/)\n" -"Language: zh_CN\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=1; plural=0;\n" - -#. module: mail_debrand -#: model:ir.model,name:mail_debrand.model_mail_template -msgid "Email Templates" -msgstr "Email 模板" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:25 -#, python-format -msgid "Odoo" -msgstr "" - -#. module: mail_debrand -#: code:addons/mail_debrand/models/mail_template.py:24 -#, python-format -msgid "using" -msgstr "" diff --git a/mail_debrand/models/__init__.py b/mail_debrand/models/__init__.py deleted file mode 100644 index 74b313100..000000000 --- a/mail_debrand/models/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from . import mail_template diff --git a/mail_debrand/models/mail_template.py b/mail_debrand/models/mail_template.py deleted file mode 100644 index 974a4180b..000000000 --- a/mail_debrand/models/mail_template.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2017 Tecnativa - Pedro M. Baeza -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -import re -from odoo import _, api, models - - -class MailTemplate(models.Model): - _inherit = 'mail.template' - - @api.multi - def generate_email(self, res_ids, fields=None): - mail_template = self.env.ref( - 'mail.mail_template_data_notification_email_default' - ) - if self == mail_template: - obj = self.with_context(mail_debrand=True) - else: - obj = self - return super(MailTemplate, obj).generate_email(res_ids, fields=fields) - - @api.model - def _debrand_body(self, body): - using_word = _('using') - odoo_word = _('Odoo') - return re.sub( - using_word + "(.*)[\r\n]*(.*)>" + odoo_word + r"", "", body, - ) - - @api.model - def render_template(self, template_txt, model, res_ids, - post_process=False): - res = super(MailTemplate, self).render_template( - template_txt, model, res_ids, post_process=post_process, - ) - if post_process and self.env.context.get('mail_debrand'): - if isinstance(res, str): - res = self._debrand_body(res) - else: - for res_id, body in res.items(): - res[res_id] = self._debrand_body(body) - return res diff --git a/mail_debrand/readme/CONTRIBUTORS.rst b/mail_debrand/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..0e4d96ea5 --- /dev/null +++ b/mail_debrand/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Graeme Gellatly diff --git a/mail_debrand/readme/DESCRIPTION.rst b/mail_debrand/readme/DESCRIPTION.rst new file mode 100644 index 000000000..51b2b495d --- /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 000000000..ad209cc2e --- /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 000000000..2a57dc018 --- /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/index.html b/mail_debrand/static/description/index.html new file mode 100644 index 000000000..41766dddf --- /dev/null +++ b/mail_debrand/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +Mail Debrand + + + +
+

Mail Debrand

+ + +

Beta 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

+
+

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_debrand/tests/__init__.py b/mail_debrand/tests/__init__.py deleted file mode 100644 index df7180274..000000000 --- a/mail_debrand/tests/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from . import test_mail_debrand diff --git a/mail_debrand/tests/test_mail_debrand.py b/mail_debrand/tests/test_mail_debrand.py deleted file mode 100644 index 116b8b79b..000000000 --- a/mail_debrand/tests/test_mail_debrand.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2017 Tecnativa - Pedro M. Baeza -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from odoo.tests import common - - -class TestMailDebrand(common.SavepointCase): - @classmethod - def setUpClass(cls): - super(TestMailDebrand, cls).setUpClass() - cls.template = cls.env.ref( - 'mail.mail_template_data_notification_email_default' - ) - - def test_generate_email_simple(self): - res = self.template.generate_email( - self.env.user.id, fields=['body_html'], - ) - self.assertNotIn('using', res) - - def test_generate_email_multi(self): - res = self.template.generate_email( - self.env.user.ids, fields=['body_html'], - ) - self.assertNotIn('using', res[[*res.keys()][0]]) diff --git a/mail_debrand/views/mail_notification_view.xml b/mail_debrand/views/mail_notification_view.xml new file mode 100644 index 000000000..5a3a9476d --- /dev/null +++ b/mail_debrand/views/mail_notification_view.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + +