From e758ce2b9b7d4d0b88e33ddeea1500df1908166a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 28 Jan 2024 00:34:12 +0100 Subject: [PATCH] Add template filters after being cached The MemoryCache copy the stored template since 7bbbb91621ab but Genshi Template clear the filters when copied. Closes #12963 (grafted from 3111fe5130705da70e46b07e4b7cb47012430964) --HG-- branch : 7.0 --- trytond/trytond/report/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trytond/trytond/report/report.py b/trytond/trytond/report/report.py index aafe26f59a..5306b343ac 100644 --- a/trytond/trytond/report/report.py +++ b/trytond/trytond/report/report.py @@ -362,8 +362,8 @@ class Report(URLMixin, PoolBase): loader = relatorio.reporting.MIMETemplateLoader() klass = loader.factories[loader.get_type(mimetype)] template = klass(BytesIO(report.report_content)) - cls._callback_loader(report, template) report.set_template_cached(template) + cls._callback_loader(report, template) data = template.generate(**report_context).render() if hasattr(data, 'getvalue'): data = data.getvalue()