[MIG] base_comment_template: Migration to 17.0

This commit is contained in:
Jesús Alan Ramos Rodríguez
2024-05-03 10:01:36 -06:00
committed by Maksym Yankin
parent efb2bbf843
commit cf39e00f9c
8 changed files with 22 additions and 25 deletions

View File

@@ -51,9 +51,7 @@ class CommentTemplate(models.AbstractModel):
if not domain or record.filtered_domain(domain):
record.comment_template_ids = [(4, template.id)]
def render_comment(
self, comment, engine=False, add_context=None, post_process=False
):
def render_comment(self, comment, engine=False, add_context=None, options=None):
self.ensure_one()
comment_texts = self.env["mail.render.mixin"]._render_template(
template_src=comment.text,
@@ -61,6 +59,6 @@ class CommentTemplate(models.AbstractModel):
res_ids=[self.id],
engine=engine or comment.engine,
add_context=add_context,
post_process=post_process,
options=options,
)
return markupsafe.Markup(comment_texts[self.id]) or ""