Skip to content
Snippets Groups Projects
ir_actions_report.xml 2.05 KiB
Newer Older
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <!-- Inherit from base.act_report_xml_view to add redner-related settings. -->
    <record id="redner_report_view" model="ir.ui.view">
        <field name="name">redner_report_view</field>
        <field name="model">ir.actions.report</field>
        <field name="inherit_id" ref="base.act_report_xml_view" />
        <field name="arch" type="xml">

            <!-- overwrite paperformat attribute -->
            <field name="paperformat_id" position="attributes">
                <attribute name="attrs">{'invisible':[ ('report_type','not in',['qweb-pdf', 'redner']),]}</attribute>
            </field>

            <!-- new tab: render template -->
            <xpath expr="//page[@name='security']" position="before">
                <page
                    string="Redner Template"
                    name="redner_tab"
                    attrs="{'invisible': [('report_type', '!=', 'redner')]}"
                >
                    <group name="redner_params">
                        <field name="redner_filetype" attrs="{'required': [('report_type', '=', 'redner')]}"/>
                        <field name="redner_tmpl_id" attrs="{'required': [('report_type', '=', 'redner')]}" />
                        <field name="redner_multi_in_one" attrs="{'invisible': [('report_type', '!=', 'redner')]}" />
                    </group>
                    <button name="action_get_substitutions"
                            string="Get Substitutions from Rednerd Report"
                            type="object" colspan="2"/>
                    <group string="Substitutions">
                        <field name="substitution_ids" nolabel="1">
                            <tree editable="top">
                                <field name="keyword"/>
                                <field name="value"/>
                            </tree>
                        </field>
                    </group>
                </page>
            </xpath>

        </field>
    </record>