[11.0][MIG] mail_debrand
This commit is contained in:
parent
4a1316fcf5
commit
10c192297c
@ -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
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
: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
|
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||||
:alt: Try me on Runbot
|
: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
|
Known issues / Roadmap
|
||||||
@ -50,6 +50,7 @@ Contributors
|
|||||||
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
|
* Jordi Ballester Alomar <jordi.ballester@eficent.com>
|
||||||
* Darshan Patel <darshan.patel.serpentcs@gmail.com>
|
* Darshan Patel <darshan.patel.serpentcs@gmail.com>
|
||||||
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||||
|
* Lois Rilo <lois.rilo@eficent.com>
|
||||||
|
|
||||||
Images
|
Images
|
||||||
------
|
------
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
from . import models
|
from . import models
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2016 Tecnativa - Jairo Llopis
|
# Copyright 2016 Tecnativa - Jairo Llopis
|
||||||
# Copyright 2017 SerpentCS - Darshan Patel
|
# Copyright 2017 SerpentCS - Darshan Patel
|
||||||
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
||||||
@ -7,7 +6,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Mail Debrand",
|
"name": "Mail Debrand",
|
||||||
"summary": "Remove Odoo branding in sent emails",
|
"summary": "Remove Odoo branding in sent emails",
|
||||||
"version": "10.0.1.0.0",
|
"version": "11.0.1.0.0",
|
||||||
"category": "Social Network",
|
"category": "Social Network",
|
||||||
"website": "https://www.tecnativa.com",
|
"website": "https://www.tecnativa.com",
|
||||||
"author": "Tecnativa, "
|
"author": "Tecnativa, "
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
from . import mail_template
|
from . import mail_template
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# 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,
|
template_txt, model, res_ids, post_process=post_process,
|
||||||
)
|
)
|
||||||
if post_process and self.env.context.get('mail_debrand'):
|
if post_process and self.env.context.get('mail_debrand'):
|
||||||
if isinstance(res, basestring):
|
if isinstance(res, str):
|
||||||
res = self._debrand_body(res)
|
res = self._debrand_body(res)
|
||||||
else:
|
else:
|
||||||
for res_id, body in res.iteritems():
|
for res_id, body in res.items():
|
||||||
res[res_id] = self._debrand_body(body)
|
res[res_id] = self._debrand_body(body)
|
||||||
return res
|
return res
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
from . import test_mail_debrand
|
from . import test_mail_debrand
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# 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(
|
res = self.template.generate_email(
|
||||||
self.env.user.ids, fields=['body_html'],
|
self.env.user.ids, fields=['body_html'],
|
||||||
)
|
)
|
||||||
self.assertNotIn('using', res[res.keys()[0]])
|
self.assertNotIn('using', res[[*res.keys()][0]])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user