From 14088e1de3714a440a9812eedc8c02ee1c499bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 28 Jan 2026 10:39:07 +0100 Subject: [PATCH] Replace extension separator by underscore in report name used as temporary file --- trytond/trytond/report/report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/trytond/report/report.py b/trytond/trytond/report/report.py index e2af1c3a6a..cf6519b3d3 100644 --- a/trytond/trytond/report/report.py +++ b/trytond/trytond/report/report.py @@ -429,7 +429,8 @@ class Report(URLMixin, PoolBase): directory = tempfile.mkdtemp(prefix='trytond_') input_extension = FORMAT2EXT.get(input_format, input_format) output_extension = FORMAT2EXT.get(output_format, output_format) - path = pathlib.Path(directory, report.report_name) + path = pathlib.Path( + directory, report.report_name.replace(os.extsep, '_')) input_path = path.with_suffix(os.extsep + input_extension) output_path = path.with_suffix(os.extsep + output_extension) mode = 'w+' if isinstance(data, str) else 'wb+'