[FIX] report_py3o: must return the path to the report

refs #119
This commit is contained in:
Laurent Mignon (ACSONE)
2017-05-30 10:51:18 +02:00
committed by Elmeri Niemelä
parent ac1c3572e8
commit 7f6c8129e5
2 changed files with 52 additions and 1 deletions

View File

@@ -295,7 +295,11 @@ class Py3oReport(models.TransientModel):
'loaded_documents'].get(model_instance.id):
d = save_in_attachment[
'loaded_documents'].get(model_instance.id)
return d, self.ir_actions_report_xml_id.py3o_filetype
report_file = tempfile.mktemp(
"." + self.ir_actions_report_xml_id.py3o_filetype)
with open(report_file, "wb") as f:
f.write(d)
return report_file
return self._create_single_report(
model_instance, data, save_in_attachment)