odoo/addons/report/views/ir_actions_report_views.xml

34 lines
1.7 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Adding a print_report_name field inside to the report action form view -->
<record id="act_report_xml_view_inherit_report" model="ir.ui.view">
<field name="name">ir.actions.report.xml.form.inherit</field>
<field name="inherit_id" ref="base.act_report_xml_view" />
<field name="model">ir.actions.report.xml</field>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='report_name']" position="after">
<field name="print_report_name" />
</xpath>
</data>
</field>
</record>
<!-- Add a paperformat and web button to the report form view -->
<record id="act_report_xml_view_inherit" model="ir.ui.view">
<field name="name">act_report_xml_view_inherit</field>
<field name="inherit_id" ref="base.act_report_xml_view" />
<field name="model">ir.actions.report.xml</field>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='report_type']" position="after">
<field name="paperformat_id" attrs="{'invisible':[('report_type','not in',['qweb-pdf'])]}"/>
</xpath>
<xpath expr="//div[@class='oe_button_box']" position="inside">
<button type="object" class="oe_stat_button" string="QWeb views" name="associated_view" attrs="{'invisible':[('report_type', 'not in', ['qweb-pdf', 'qweb-html'])]}" icon='fa-code' />
</xpath>
</data>
</field>
</record>
</odoo>