Skip to content
Snippets Groups Projects
ir_actions_report.xml 2.51 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"
                ><![CDATA[{'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')]}"
                        />
                        confirm="Keywords will be updated. Continue?"
                        name="action_get_substitutions"
                        string="Get Substitutions from Redner template"
                        type="object"
                        colspan="2"
                    />
                    <group string="Substitutions">
Houzefa Abbasbhay's avatar
Houzefa Abbasbhay committed
                        <field name="substitution_ids" nolabel="1" colspan="2">
                            <tree editable="top" default_order="keyword asc">
                                <field name="keyword" />
                                <field name="converter" />
                                <field name="value" />
                            </tree>
                        </field>
                    </group>
                </page>
            </xpath>
        </field>
    </record>
oury.balde's avatar
oury.balde committed
</odoo>