2021-07-22 13:19:23 +02:00
|
|
|
# Copyright 2019 O4SB - Graeme Gellatly
|
|
|
|
# Copyright 2019 Tecnativa - Ernesto Tejeda
|
|
|
|
# Copyright 2020 Onestein - Andrea Stirpe
|
|
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
2021-07-27 15:56:31 +02:00
|
|
|
from odoo import models
|
2021-07-22 13:19:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
class MailMail(models.AbstractModel):
|
|
|
|
_inherit = "mail.mail"
|
|
|
|
|
2021-07-27 15:56:31 +02:00
|
|
|
def _send_prepare_body(self):
|
2021-09-14 10:38:47 +02:00
|
|
|
body_html = super()._send_prepare_body()
|
2021-07-27 15:56:31 +02:00
|
|
|
return self.env["mail.render.mixin"].remove_href_odoo(
|
2021-09-14 10:38:47 +02:00
|
|
|
body_html or "", remove_parent=0, remove_before=1, to_keep=self.body
|
2021-07-27 15:56:31 +02:00
|
|
|
)
|