Update py3o_report.py
[FIX] generate a single report with the right extension (if the extension is an OpenDocument type)pull/490/head
parent
ad58dab5e2
commit
a3585ce3c0
|
@ -205,6 +205,8 @@ class Py3oReport(models.TransientModel):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
action_report = self.ir_actions_report_id
|
action_report = self.ir_actions_report_id
|
||||||
filetype = action_report.py3o_filetype
|
filetype = action_report.py3o_filetype
|
||||||
|
if filetype not in ("odt", "ods", "odp", "fodt", "fods", "fodp"):
|
||||||
|
filetype = "ods"
|
||||||
result_fd, result_path = tempfile.mkstemp(
|
result_fd, result_path = tempfile.mkstemp(
|
||||||
suffix="." + filetype, prefix="p3o.report.tmp."
|
suffix="." + filetype, prefix="p3o.report.tmp."
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue