mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] Add back the variable feature in sql_export
Refactore to use the new properties field
This commit is contained in:
committed by
David Beal
parent
8df404eff2
commit
3cb3fae1f6
@@ -9,12 +9,15 @@
|
||||
/>
|
||||
<field name="mode">primary</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="query" position="after">
|
||||
<field name="use_properties" invisible="1" />
|
||||
</field>
|
||||
<button name="button_preview_sql_expression" position="attributes">
|
||||
<attribute name="states" />
|
||||
<attribute
|
||||
name="attrs"
|
||||
>{'invisible': [('field_ids', '!=', False)]}</attribute>
|
||||
>{'invisible': [('use_properties', '=', True)]}</attribute>
|
||||
</button>
|
||||
|
||||
<xpath expr="//header" position="inside">
|
||||
<button
|
||||
name="export_sql_query"
|
||||
@@ -24,6 +27,14 @@
|
||||
class="oe_highlight"
|
||||
icon="fa-arrow-right text-success"
|
||||
/>
|
||||
<button
|
||||
name="configure_properties"
|
||||
states="draft"
|
||||
string="Configure Properties"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
icon="fa-arrow-right text-success"
|
||||
/>
|
||||
</xpath>
|
||||
<group name="group_main_info" position="inside">
|
||||
<group name="option">
|
||||
@@ -41,19 +52,14 @@
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
<group name="group_query" position="after">
|
||||
<group string="Parameters">
|
||||
<field
|
||||
name="field_ids"
|
||||
nolabel="1"
|
||||
colspan="2"
|
||||
options="{'no_create': True}"
|
||||
context="{'tree_view_ref': 'sql_export.sql_parameter_view_tree', 'form_view_ref': 'sql_export.sql_parameter_view_form'}"
|
||||
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||
groups="sql_request_abstract.group_sql_request_user"
|
||||
<field name="query" position="before">
|
||||
<p
|
||||
colspan="2"
|
||||
attrs="{'invisible': [('use_properties', '=', False)]}"
|
||||
> In case of use of properties in the query, use this syntax : %%(Property String)s. <br
|
||||
/>
|
||||
</group>
|
||||
</group>
|
||||
Example : SELECT id FROM sale_order WHERE create_date > %%(Start Date)s</p>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user