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.

108 lines
4.6 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="sql_export_view_form" model="ir.ui.view">
  5. <field name="name">Sql_export_form_view</field>
  6. <field name="model">sql.export</field>
  7. <field name="arch" type="xml">
  8. <form string="SQL export">
  9. <sheet>
  10. <header>
  11. <button name="button_validate_sql_expression" type="object" states="draft"
  12. string="Validate SQL Expression" class="oe_highlight"/>
  13. <button name="button_set_draft" type="object" states="sql_valid"
  14. string="Set to Draft" groups="sql_request_abstract.group_sql_request_manager"/>
  15. <button name="export_sql_query" string="Execute Query" states="sql_valid" type="object" class="oe_highlight"
  16. icon="gtk-execute"/>
  17. <field name="state" widget="statusbar" />
  18. </header>
  19. <group>
  20. <h1>
  21. <field name="name" nolabel="1" placeholder="Request Name"/>
  22. </h1>
  23. </group>
  24. <group name="option" groups="sql_request_abstract.group_sql_request_user">
  25. <field name="copy_options"/>
  26. <field name="encoding"/>
  27. </group>
  28. <group name="request" string="SQL Request" groups="sql_request_abstract.group_sql_request_user">
  29. <field name="query" nolabel="1" placeholder="select * from res_partner"/>
  30. </group>
  31. <group string="Parameters" groups="sql_request_abstract.group_sql_request_user">
  32. <field name="field_ids" nolabel="1"/>
  33. </group>
  34. <group groups="sql_request_abstract.group_sql_request_manager">
  35. <group string="Allowed Users">
  36. <field name="user_ids" nolabel="1"/>
  37. </group>
  38. <group string="Allowed Groups">
  39. <field name="group_ids" nolabel="1"/>
  40. </group>
  41. </group>
  42. </sheet>
  43. </form>
  44. </field>
  45. </record>
  46. <record id="sql_export_view_tree" model="ir.ui.view">
  47. <field name="name">Sql_export_tree_view</field>
  48. <field name="model">sql.export</field>
  49. <field name="arch" type="xml">
  50. <tree string="SQL Export" colors="blue:state == 'draft'">
  51. <field name="name"/>
  52. <field name="state"/>
  53. <button name="export_sql_query" string="Execute Query" states="sql_valid" type="object"
  54. icon="gtk-execute"/>
  55. </tree>
  56. </field>
  57. </record>
  58. <record id="sql_export_tree_action" model="ir.actions.act_window">
  59. <field name="name">SQL Export</field>
  60. <field name="res_model">sql.export</field>
  61. <field name="view_type">form</field>
  62. <field name="view_mode">tree,form</field>
  63. </record>
  64. <menuitem id="sql_export_menu" name="Sql Export"
  65. parent="base.menu_reporting_dashboard" sequence="80"/>
  66. <menuitem id="sql_export_menu_view" name="Sql Export" parent="sql_export_menu" action="sql_export_tree_action" sequence="1"/>
  67. <record id="sql_parameter_view_form" model="ir.ui.view">
  68. <field name="name">Sql_parameter_form_view</field>
  69. <field name="model">ir.model.fields</field>
  70. <field name="arch" type="xml">
  71. <form string="SQL export">
  72. </form>
  73. </field>
  74. </record>
  75. <record id="sql_parameter_view_tree" model="ir.ui.view">
  76. <field name="name">Sql_parameter_tree_view</field>
  77. <field name="model">ir.model.fields</field>
  78. <field name="arch" type="xml">
  79. <tree string="SQL Parameter">
  80. <field name="name"/>
  81. </tree>
  82. </field>
  83. </record>
  84. <record id="sql_parameter_tree_action" model="ir.actions.act_window">
  85. <field name="name">SQL Parameter</field>
  86. <field name="res_model">ir.model.fields</field>
  87. <field name="view_type">form</field>
  88. <field name="view_mode">tree,form</field>
  89. <field name="context" eval="{'default_model_id': ref('sql_export.model_sql_file_wizard'), 'default_size': 64, 'search_default_state': 'manual'}"/>
  90. <field name="domain">[('model','=','sql.file.wizard')]</field>
  91. </record>
  92. <menuitem id="sql_parameter_menu_view" name="Sql Export Variables" parent="sql_export_menu" action="sql_parameter_tree_action" sequence="5" groups="sql_request_abstract.group_sql_request_manager"/>
  93. </data>
  94. </openerp>