Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mail_debrand/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ Contributors
- João Marques

- Stefan Rijnhart stefan@opener.amsterdam
- Jord Duineveld jord.duineveld@codeforward.nl

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion mail_debrand/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
( for powerd by) form all the templates
removes any 'odoo' that are in tempalte texts > 20characters
""",
"version": "18.0.1.0.1",
"version": "18.0.1.0.2",
"category": "Social Network",
"website": "https://github.com/OCA/mail",
"author": """Tecnativa, ForgeFlow, Onestein, Sodexis, Nexterp Romania,
Expand Down
3 changes: 2 additions & 1 deletion mail_debrand/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
from . import mail_render_mixin
from . import mail_mail
from . import mail_render_mixin
from . import mail_thread
8 changes: 6 additions & 2 deletions mail_debrand/models/mail_render_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@ def remove_href_odoo(self, value, to_keep=None):
# Remove "Powered by", "using" etc.
previous = elem.getprevious()
if previous is not None:
previous.tail = etree.CDATA(" ")
previous.tail = None
elif parent.text:
parent.text = etree.CDATA(" ")
parent.text = None
parent.remove(elem)
# Clean up dangling pipe separator in unfollow span
for span in tree.xpath('//span[@id="mail_unfollow"]'):
if span.text and "|" in span.text:
span.text = None
value = etree.tostring(
tree, pretty_print=True, method="html", encoding="unicode"
)
Expand Down
15 changes: 15 additions & 0 deletions mail_debrand/models/mail_thread.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2026 Codeforward B.V. - Jord Duineveld
# 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 _notify_by_email_render_layout(
self, message, recipients_group, msg_vals=False, render_values=None
):
mail_body = super()._notify_by_email_render_layout(
message, recipients_group, msg_vals=msg_vals, render_values=render_values
)
return self.env["mail.render.mixin"].remove_href_odoo(mail_body or "")
1 change: 1 addition & 0 deletions mail_debrand/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- Pedro M. Baeza
- João Marques
- Stefan Rijnhart <stefan@opener.amsterdam>
- Jord Duineveld <jord.duineveld@codeforward.nl>
1 change: 1 addition & 0 deletions mail_debrand/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ <h2><a class="toc-backref" href="#toc-entry-9">Contributors</a></h2>
</ul>
</li>
<li>Stefan Rijnhart <a class="reference external" href="mailto:stefan&#64;opener.amsterdam">stefan&#64;opener.amsterdam</a></li>
<li>Jord Duineveld <a class="reference external" href="mailto:jord.duineveld&#64;codeforward.nl">jord.duineveld&#64;codeforward.nl</a></li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down