OCA reporting engine fork for dev and update.
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.

126 lines
7.3 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (C) 2017 - Today: GRAP (http://www.grap.coop)
  4. @author Sylvain LE GAL (https://twitter.com/legalsylvain)
  5. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. -->
  7. <openerp><data>
  8. <record id="view_bi_sql_view_tree" model="ir.ui.view">
  9. <field name="model">bi.sql.view</field>
  10. <field name="arch" type="xml">
  11. <tree>
  12. <field name="name"/>
  13. <field name="technical_name"/>
  14. <field name="size"/>
  15. <field name="state"/>
  16. </tree>
  17. </field>
  18. </record>
  19. <record id="view_bi_sql_view_form" model="ir.ui.view">
  20. <field name="model">bi.sql.view</field>
  21. <field name="arch" type="xml">
  22. <form>
  23. <header>
  24. <button name="button_validate_sql_expression" type="object" states="draft"
  25. string="Validate SQL Expression" class="oe_highlight"/>
  26. <button name="button_set_draft" type="object" states="sql_valid,model_valid,ui_valid"
  27. string="Set to Draft" groups="sql_request_abstract.group_sql_request_manager"
  28. confirm="Are you sure you want to set to draft this SQL View. It will delete
  29. the materialized view, and all the previous mapping realized with the columns"/>
  30. <button name="button_create_sql_view_and_model" type="object" states="sql_valid"
  31. string="Create SQL View, Indexes and Models" class="oe_highlight"
  32. help="This will try to create an SQL View, based on the SQL request and the according Transient Model and fields, based on settings"/>
  33. <button name="button_update_model_access" type="object"
  34. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('has_group_changed', '=', False)]}"
  35. string="Update Model Acess" class="oe_highlight"
  36. help="Update Model Access. Required if you changed groups list after having created the model"/>
  37. <button name="button_create_ui" type="object" states="model_valid" string="Create UI"
  38. class="oe_highlight" help="This will create Odoo View, Action and Menu"/>
  39. <button name="button_refresh_materialized_view" type="object" string="Refresh Materialized View"
  40. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"
  41. help="this will refresh the materialized view"/>
  42. <button name="button_open_view" type="object" string="Open View" states="ui_valid" class="oe_highlight" />
  43. <field name="state" widget="statusbar" />
  44. </header>
  45. <sheet>
  46. <h1>
  47. <field name="name" attrs="{'readonly': [('state','!=','draft')]}" colspan="4"/>
  48. </h1>
  49. <group>
  50. <group>
  51. <group>
  52. <field name="technical_name"/>
  53. <field name="view_name" />
  54. <field name="is_materialized"/>
  55. <field name="size"
  56. attrs="{'invisible': ['|', ('state', '=', 'draft'), ('is_materialized', '=', False)]}"/>
  57. <field name="cron_id"
  58. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"/>
  59. </group>
  60. </group>
  61. </group>
  62. <notebook>
  63. <page string="SQL Query">
  64. <field name="query" nolabel="1" colspan="4"/>
  65. </page>
  66. <page string="SQL Fields" attrs="{'invisible': [('state', '=', 'draft')]}">
  67. <field name="bi_sql_view_field_ids" nolabel="1" colspan="4" attrs="{'readonly': [('state', '!=', 'sql_valid')]}">
  68. <tree editable="bottom" colors="blue:field_description==False">
  69. <field name="sequence"/>
  70. <field name="name"/>
  71. <field name="sql_type"/>
  72. <field name="field_description"/>
  73. <field name="ttype" attrs="{
  74. 'required': [('field_description', '!=', False)]}"/>
  75. <field name="many2one_model_id" attrs="{
  76. 'invisible': [('ttype', '!=', 'many2one')],
  77. 'required': [
  78. ('field_description', '!=', False),
  79. ('ttype', '=', 'many2one')]}"/>
  80. <field name="selection" attrs="{
  81. 'invisible': [('ttype', '!=', 'selection')],
  82. 'required': [
  83. ('field_description', '!=', False),
  84. ('ttype', '=', 'selection')]}"/>
  85. <field name="is_index" attrs="{'invisible': [('field_description', '=', False)]}"/>
  86. <field name="is_group_by" attrs="{'invisible': [('field_description', '=', False)]}"/>
  87. <field name="graph_type" attrs="{'invisible': [('field_description', '=', False)]}"/>
  88. </tree>
  89. </field>
  90. </page>
  91. <page string="Security">
  92. <group string="Rule Definition">
  93. <field name="domain_force" nolabel="1" colspan="4"/>
  94. </group>
  95. <group>
  96. <group string="Allowed Groups">
  97. <field name="group_ids" nolabel="1"/>
  98. <field name="has_group_changed" invisible="1"/>
  99. </group>
  100. </group>
  101. </page>
  102. <page string="Extras Information">
  103. <group>
  104. <group string="Model">
  105. <field name="model_name" />
  106. <field name="model_id" attrs="{'invisible': [('state', '=', 'draft')]}"/>
  107. </group>
  108. <group string="User Interface">
  109. <field name="graph_view_id"/>
  110. <field name="search_view_id"/>
  111. <field name="action_id"/>
  112. <field name="menu_id"/>
  113. </group>
  114. </group>
  115. </page>
  116. </notebook>
  117. </sheet>
  118. </form>
  119. </field>
  120. </record>
  121. </data></openerp>