From 02a869d7892c4b22fb8ce878125e0f16e318baa1 Mon Sep 17 00:00:00 2001 From: "matteo.tognini" Date: Wed, 20 Dec 2023 16:46:12 +0100 Subject: [PATCH] [IMP]base_comment_template: using markup.safe to render html in report --- base_comment_template/models/comment_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base_comment_template/models/comment_template.py b/base_comment_template/models/comment_template.py index 63a34decd..0d000f197 100644 --- a/base_comment_template/models/comment_template.py +++ b/base_comment_template/models/comment_template.py @@ -3,6 +3,8 @@ # Copyright 2020 NextERP Romania SRL # Copyright 2021-2022 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +import markupsafe + from odoo import api, fields, models from odoo.osv import expression from odoo.tools.safe_eval import safe_eval @@ -61,4 +63,4 @@ class CommentTemplate(models.AbstractModel): add_context=add_context, post_process=post_process, ) - return comment_texts[self.id] or "" + return markupsafe.Markup(comment_texts[self.id]) or ""