[IMP][FIX] py3o_report, py3o_report_fusion_server: Compute the availability of py3o report

Before this change it was not possible to install modules declaring py3o report into a non native format without specifying a Fusion server once the module py3o_report_fusion_server was installed. With theses changes, we now take care of the availability of the libreoffice runtime to display/log a warning message when the report is in a non native runtime.
This commit is contained in:
Laurent Mignon (ACSONE)
2019-02-01 14:52:24 +01:00
committed by Elmeri Niemelä
parent ac6e75c7b4
commit 6f6cf5688b
4 changed files with 139 additions and 7 deletions

View File

@@ -8,12 +8,21 @@
<field name="model">ir.actions.report</field>
<field name="inherit_id" ref="base.act_report_xml_view" />
<field name="arch" type="xml">
<xpath expr="/form/field[1]" position="before">
<field name="is_py3o_report_not_available" invisible="1"/>
<div class="alert alert-danger"
role="alert"
style="margin-bottom:0px;"
attrs="{'invisible': [('is_py3o_report_not_available','=',False)]}">
<field name="msg_py3o_report_not_available"/>
</div>
</xpath>
<xpath expr="//page[@name='security']" position="before">
<page string="LibreOffice Template" name="py3o_tab"
attrs="{'invisible': [('report_type', '!=', 'py3o')]}">
<group name="py3o_params">
<field name="lo_bin_path"/>
<field name="py3o_filetype" />
<field name="py3o_multi_in_one"/>
<field name="py3o_template_id" />