[ADD] report_label

This commit is contained in:
Ivàn Todorovich
2020-11-19 10:34:23 -03:00
committed by Stefan Rijnhart
parent 1b1e9a4d9f
commit c6f34b6609
25 changed files with 549 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_server_action_form" model="ir.ui.view">
<field name="model">ir.actions.server</field>
<field name="inherit_id" ref="base.view_server_action_form"/>
<field name="arch" type="xml">
<header position="inside">
<button
name="report_label_associated_view"
type="object"
string="View QWeb templates"
attrs="{'invisible':['|', ('state', '!=', 'report_label'), ('label_template', '=', False)]}"
help="Display a button in the sidebar of related model to open a wizard"
/>
</header>
<field name="type" position="after">
<field name="label_paperformat_id" attrs="{'invisible': [('state', '!=', 'report_label')]}"/>
<field name="label_template" attrs="{'invisible': [('state', '!=', 'report_label')]}"/>
</field>
</field>
</record>
<record id="report_label_action" model="ir.actions.act_window">
<field name="name">Label Reports</field>
<field name="res_model">ir.actions.server</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[("state", "=", "report_label")]</field>
<field name="context">{"default_state": "report_label"}</field>
</record>
<menuitem
id="report_label_menu"
name="Label Reports"
action="report_label_action"
parent="base.reporting_menuitem"
sequence="3"/>
</odoo>