[FIX] report_py3o: wrong extension for .odt files in zip

pull/490/head
François Degrave 2021-03-11 18:52:28 +01:00 committed by GitHub
parent 60636fe4c2
commit ad58dab5e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -203,8 +203,10 @@ class Py3oReport(models.TransientModel):
""" This function to generate our py3o report
"""
self.ensure_one()
action_report = self.ir_actions_report_id
filetype = action_report.py3o_filetype
result_fd, result_path = tempfile.mkstemp(
suffix=".ods", prefix="p3o.report.tmp."
suffix="." + filetype, prefix="p3o.report.tmp."
)
tmpl_data = self.get_template(model_instance)