Do not use cached report instance

We must always use a copy of the cached report instance to allow to add
directives to the template before being prepared.

Closes #14460
This commit is contained in:
Cédric Krier
2026-01-03 12:53:56 +01:00
parent b0763c081e
commit ce26ef12dc
+1 -1
View File
@@ -392,7 +392,7 @@ class Report(URLMixin, PoolBase):
loader = relatorio.reporting.MIMETemplateLoader()
klass = loader.factories[loader.get_type(mimetype)]
template = klass(BytesIO(report.report_content))
template = report.set_template_cached(template)
report.set_template_cached(template)
translate = cls._callback_loader(report, template)
if translate:
report_context = report_context.copy()