mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[FIX] fallback to libreoffice conversion when no server is configured
fixes #200
This commit is contained in:
committed by
Alexis de Lattre
parent
1ddb96026a
commit
3e6296d5ee
@@ -32,8 +32,16 @@ class Py3oReport(models.TransientModel):
|
|||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
report_xml = self.ir_actions_report_xml_id
|
report_xml = self.ir_actions_report_xml_id
|
||||||
filetype = report_xml.py3o_filetype
|
filetype = report_xml.py3o_filetype
|
||||||
if report_xml.py3o_is_local_fusion:
|
if not report_xml.py3o_server_id:
|
||||||
result_path = super(Py3oReport, self)._create_single_report(
|
return super(Py3oReport, self)._create_single_report(
|
||||||
|
model_instance, data, save_in_attachment,
|
||||||
|
)
|
||||||
|
elif report_xml.py3o_is_local_fusion:
|
||||||
|
result_path = super(
|
||||||
|
Py3oReport, self.with_context(
|
||||||
|
report_py3o_skip_conversion=True,
|
||||||
|
)
|
||||||
|
)._create_single_report(
|
||||||
model_instance, data, save_in_attachment,
|
model_instance, data, save_in_attachment,
|
||||||
)
|
)
|
||||||
with closing(open(result_path, 'r')) as out_stream:
|
with closing(open(result_path, 'r')) as out_stream:
|
||||||
|
|||||||
Reference in New Issue
Block a user