Update py3o_report.py

[FIX] generate a single report with the right extension (if the extension is an OpenDocument type)
This commit is contained in:
François Degrave
2021-03-12 08:58:43 +01:00
committed by Omar (Comunitea)
parent 43653ab88b
commit 2f0d8dd903

View File

@@ -209,6 +209,8 @@ class Py3oReport(models.TransientModel):
self.ensure_one()
action_report = self.ir_actions_report_id
filetype = action_report.py3o_filetype
if filetype not in ("odt", "ods", "odp", "fodt", "fods", "fodp"):
filetype = "ods"
result_fd, result_path = tempfile.mkstemp(
suffix="." + filetype, prefix="p3o.report.tmp."
)