[12.0][FIX] mail_debrand: debrand regular notifications.
without this fix, any regular notification (added as follower, thread notifications...) were not parsed at all and as a consequence also not debranded.
This commit is contained in:
parent
f83cd4e716
commit
b3e8b24952
@ -60,9 +60,17 @@ Do not contact contributors directly about support or help with technical issues
|
||||
Credits
|
||||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
|
||||
* Tecnativa
|
||||
* Eficent
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||
* Lois Rilo <lois.rilo@eficent.com>
|
||||
* Graeme Gellatly <graeme@o4sb.com>
|
||||
|
||||
Maintainers
|
||||
|
@ -1,3 +1,7 @@
|
||||
# Copyright 2016 Tecnativa - Jairo Llopis
|
||||
# Copyright 2017 Tecnativa - Pedro M. Baeza
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# - Lois Rilo <lois.rilo@eficent.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
{
|
||||
@ -6,7 +10,7 @@
|
||||
"version": "12.0.2.0.0",
|
||||
"category": "Social Network",
|
||||
"website": "https://github.com/OCA/social/",
|
||||
"author": "Odoo Community Association (OCA)",
|
||||
"author": "Tecnativa, Eficent, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"installable": True,
|
||||
"depends": [
|
||||
|
@ -1 +1,2 @@
|
||||
from . import mail_template
|
||||
from . import mail_thread
|
||||
|
14
mail_debrand/models/mail_thread.py
Normal file
14
mail_debrand/models/mail_thread.py
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright 2019 Eficent Business and IT Consulting Services S.L.
|
||||
# Lois Rilo <lois.rilo@eficent.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class MailThread(models.AbstractModel):
|
||||
_inherit = "mail.thread"
|
||||
|
||||
def _replace_local_links(self, html, base_url=None):
|
||||
html = super()._replace_local_links(html, base_url=base_url)
|
||||
html_debranded = self.env["mail.template"]._debrand_body(html)
|
||||
return html_debranded
|
@ -1 +1,3 @@
|
||||
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
|
||||
* Lois Rilo <lois.rilo@eficent.com>
|
||||
* Graeme Gellatly <graeme@o4sb.com>
|
||||
|
@ -380,8 +380,9 @@ specifically the ‘using Odoo’ of notifications or the ‘Powered by Odoo’<
|
||||
</li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id5">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id6">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#contributors" id="id7">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id8">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#authors" id="id7">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id8">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id9">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -414,14 +415,23 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id6">Credits</a></h1>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id7">Contributors</a></h2>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id7">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Tecnativa</li>
|
||||
<li>Eficent</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id8">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Pedro M. Baeza <<a class="reference external" href="mailto:pedro.baeza@tecnativa.com">pedro.baeza@tecnativa.com</a>></li>
|
||||
<li>Lois Rilo <<a class="reference external" href="mailto:lois.rilo@eficent.com">lois.rilo@eficent.com</a>></li>
|
||||
<li>Graeme Gellatly <<a class="reference external" href="mailto:graeme@o4sb.com">graeme@o4sb.com</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#id9">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
|
Loading…
Reference in New Issue
Block a user