You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

71 lines
3.1 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- PSQL Query form view -->
<record id="psql_query_view_form" model="ir.ui.view">
<field name="name">psql.query.view.form</field>
<field name="model">psql.query</field>
<field name="arch" type="xml">
<form string="PostgreSQL Query">
<sheet>
<div class="oe_title">
<h1>
<field name="name" placeholder="Query Name"/>
</h1>
</div>
<group/>
<h2>
<field name="query_name" placeholder="Type the query to execute"/>
</h2>
<div style="margin-bottom: 46px;">
<button name="action_execute_query"
string="Execute/Refresh"
type="object"
class="fa fa-play btn btn-primary" style="font-size: 10px;"/>
</div>
<div style="font-size: 15px; font-weight: bold; margin-bottom: 10px;">Result:</div>
<div style="overflow: scroll">
<group>
<field name="query_result" type="html" class="oe_memo" default_focus="1" string=""
options="{'resizable': false, 'collaborative': true}"/>
</group>
</div>
<group/>
<div style="margin-top: 46px;display: flex; justify-content: center;">
<button name="action_print_query_result_xlsx" string="XLSX" type="object"
class="fa fa-file-excel-o btn btn-primary"/>
</div>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<!-- PSQL Query tree view -->
<record id="psql_query_view_tree" model="ir.ui.view">
<field name="name">psql.query.view.tree</field>
<field name="model">psql.query</field>
<field name="arch" type="xml">
<tree string="PostgreSQL Query">
<field name="name"/>
<field name="query_name"/>
</tree>
</field>
</record>
<!-- PSQL Query action -->
<record id="action_psql_query" model="ir.actions.act_window">
<field name="name">PostgreSQL Query</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">psql.query</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Execute PSQL Query
</p>
</field>
</record>
<!-- Menus for PSQL Query -->
<menuitem id="psql_query_root" name="PSQL Query" parent="base.next_id_9" action="action_psql_query" sequence="15"/>
</odoo>