mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] sql_export: Migration to 17.0
This commit is contained in:
committed by
David Beal
parent
cade6cd688
commit
f45fa52858
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<record id="sql_export_view_form" model="ir.ui.view">
|
||||
<field name="model">sql.export</field>
|
||||
<field
|
||||
@@ -13,23 +12,20 @@
|
||||
<field name="use_properties" invisible="1" />
|
||||
</field>
|
||||
<button name="button_preview_sql_expression" position="attributes">
|
||||
<attribute name="states" />
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'invisible': [('use_properties', '=', True)]}</attribute>
|
||||
<attribute name="invisible">use_properties</attribute>
|
||||
</button>
|
||||
<xpath expr="//header" position="inside">
|
||||
<button
|
||||
name="export_sql_query"
|
||||
string="Execute Query"
|
||||
states="sql_valid"
|
||||
invisible="state != 'sql_valid'"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
icon="fa-arrow-right text-success"
|
||||
/>
|
||||
<button
|
||||
name="configure_properties"
|
||||
states="draft"
|
||||
invisible="state != 'draft'"
|
||||
string="Configure Properties"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
@@ -38,31 +34,26 @@
|
||||
</xpath>
|
||||
<group name="group_main_info" position="inside">
|
||||
<group name="option">
|
||||
<field
|
||||
name="file_format"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field name="file_format" readonly="state != 'draft'" />
|
||||
<field
|
||||
name="copy_options"
|
||||
attrs="{'invisible': [('file_format', '!=', 'csv')], 'required': [('file_format', '=', 'csv')], 'readonly': [('state', '!=', 'draft')]}"
|
||||
/>
|
||||
<field
|
||||
name="encoding"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
invisible="file_format != 'csv'"
|
||||
required="file_format == 'csv'"
|
||||
readonly="state != 'draft'"
|
||||
/>
|
||||
<field name="encoding" readonly="state != 'draft'" />
|
||||
</group>
|
||||
</group>
|
||||
<field name="query" position="before">
|
||||
<p
|
||||
colspan="2"
|
||||
attrs="{'invisible': [('use_properties', '=', False)]}"
|
||||
invisible="not use_properties"
|
||||
> In case of use of properties in the query, use this syntax : %%(Property String)s. <br
|
||||
/>
|
||||
Example : SELECT id FROM sale_order WHERE create_date > %%(Start Date)s</p>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sql_export_view_tree" model="ir.ui.view">
|
||||
<field name="model">sql.export</field>
|
||||
<field
|
||||
@@ -75,20 +66,18 @@
|
||||
<button
|
||||
name="export_sql_query"
|
||||
string="Execute Query"
|
||||
states="sql_valid"
|
||||
invisible="state != 'sql_valid'"
|
||||
type="object"
|
||||
icon="fa-arrow-right text-success"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="sql_export_tree_action" model="ir.actions.act_window">
|
||||
<field name="name">SQL Exports</field>
|
||||
<field name="res_model">sql.export</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="sql_export_menu_view"
|
||||
name="Sql Export"
|
||||
@@ -96,5 +85,4 @@
|
||||
action="sql_export_tree_action"
|
||||
sequence="15"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user