From 57b96bc3df467f048bd8271b011a4fea7ca60416 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 : 6.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 36db0661e8..ce282053cb 100644 --- a/trytond/trytond/report/report.py +++ b/trytond/trytond/report/report.py @@ -324,8 +324,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()