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.

106 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_clean_check_request" type="object" states="draft"
  12. string="Clean and Check Request" 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. </group>
  27. <group name="request" string="SQL Request" groups="sql_request_abstract.group_sql_request_user">
  28. <field name="query" nolabel="1" placeholder="select * from res_partner"/>
  29. </group>
  30. <group string="Parameters" groups="sql_request_abstract.group_sql_request_user">
  31. <field name="field_ids" nolabel="1"/>
  32. </group>
  33. <group groups="sql_request_abstract.group_sql_request_manager">
  34. <group string="Allowed Users">
  35. <field name="user_ids" nolabel="1"/>
  36. </group>
  37. <group string="Allowed Groups">
  38. <field name="group_ids" nolabel="1"/>
  39. </group>
  40. </group>
  41. </sheet>
  42. </form>
  43. </field>
  44. </record>
  45. <record id="sql_export_view_tree" model="ir.ui.view">
  46. <field name="name">Sql_export_tree_view</field>
  47. <field name="model">sql.export</field>
  48. <field name="arch" type="xml">
  49. <tree string="SQL Export" colors="blue:state == 'draft'">
  50. <field name="name"/>
  51. <field name="state"/>
  52. <button name="export_sql_query" string="Execute Query" states="sql_valid" type="object"
  53. icon="gtk-execute"/>
  54. </tree>
  55. </field>
  56. </record>
  57. <record id="sql_export_tree_action" model="ir.actions.act_window">
  58. <field name="name">SQL Export</field>
  59. <field name="res_model">sql.export</field>
  60. <field name="view_type">form</field>
  61. <field name="view_mode">tree,form</field>
  62. </record>
  63. <menuitem id="sql_export_menu" name="Sql Export" parent="base.menu_reporting" sequence="80"/>
  64. <menuitem id="sql_export_menu_view" name="Sql Export" parent="sql_export_menu" action="sql_export_tree_action" sequence="1"/>
  65. <record id="sql_parameter_view_form" model="ir.ui.view">
  66. <field name="name">Sql_parameter_form_view</field>
  67. <field name="model">ir.model.fields</field>
  68. <field name="arch" type="xml">
  69. <form string="SQL export">
  70. </form>
  71. </field>
  72. </record>
  73. <record id="sql_parameter_view_tree" model="ir.ui.view">
  74. <field name="name">Sql_parameter_tree_view</field>
  75. <field name="model">ir.model.fields</field>
  76. <field name="arch" type="xml">
  77. <tree string="SQL Parameter">
  78. <field name="name"/>
  79. </tree>
  80. </field>
  81. </record>
  82. <record id="sql_parameter_tree_action" model="ir.actions.act_window">
  83. <field name="name">SQL Parameter</field>
  84. <field name="res_model">ir.model.fields</field>
  85. <field name="view_type">form</field>
  86. <field name="view_mode">tree,form</field>
  87. <field name="context" eval="{'default_model_id': ref('sql_export.model_sql_file_wizard'), 'default_size': 64, 'search_default_state': 'manual'}"/>
  88. <field name="domain">[('model','=','sql.file.wizard')]</field>
  89. </record>
  90. <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"/>
  91. </data>
  92. </openerp>