Skip to content

Commit

Permalink
fix: fix preview rendering (#1943)
Browse files Browse the repository at this point in the history
Co-authored-by: Clément <clement.charmillot@gmail.com>
  • Loading branch information
clementcharmillot and Clément authored Aug 15, 2024
1 parent 885506e commit ac37269
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crm_request/wizards/holiday_template_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ def get_default(self):
for lang in self.env["res.lang"].search([]):
res += f"<h2>{lang.name}:</h2>"
fake_claim.language = lang.code
res += template.with_context(
rendered = template.with_context(
lang=lang.code, salutation_language=lang.code
)._render_template(template.body_html, template.model, fake_claim.id)
)._render_template(template.body_html, template.model, [fake_claim.id])
res += rendered[fake_claim.id]
res += "<br/><br/>"
fake_claim.unlink()
return res

0 comments on commit ac37269

Please sign in to comment.