Update py3o_report.py

[FIX] generate a single report with the right extension (if the extension is an OpenDocument type)
pull/490/head
François Degrave 2021-03-12 08:58:43 +01:00 committed by GitHub
parent ad58dab5e2
commit a3585ce3c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -205,6 +205,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."
)