details:   https://code.tryton.org/tryton/commit/6dcd91194420
branch:    default
user:      Cédric Krier <[email protected]>
date:      Sat Jan 03 12:53:56 2026 +0100
description:
        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
diffstat:

 trytond/trytond/report/report.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 116b9edb56a7 -r 6dcd91194420 trytond/trytond/report/report.py
--- a/trytond/trytond/report/report.py  Wed Dec 31 11:32:52 2025 +0100
+++ b/trytond/trytond/report/report.py  Sat Jan 03 12:53:56 2026 +0100
@@ -392,7 +392,7 @@
             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()

Reply via email to