social/mail_debrand/models/mail_thread.py
Lois Rilo b3e8b24952 [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.
2021-12-15 11:31:01 +01:00

15 lines
497 B
Python

# 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