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.

130 lines
7.8 KiB

7 years ago
  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. <odoo>
  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 decoration-info="state=='draft'" decoration-warning="state in ('sql_valid', 'model_valid')">
  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 the materialized view, and all the previous mapping realized with the columns"/>
  29. <button name="button_preview_sql_expression" type="object" states="draft" string="Preview SQL Expression" />
  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="view_order"/>
  55. <field name="is_materialized"/>
  56. <field name="size"
  57. attrs="{'invisible': ['|', ('state', '=', 'draft'), ('is_materialized', '=', False)]}"/>
  58. <field name="cron_id"
  59. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"/>
  60. </group>
  61. </group>
  62. </group>
  63. <notebook>
  64. <page string="SQL Query">
  65. <field name="query" nolabel="1" colspan="4"/>
  66. </page>
  67. <page string="SQL Fields" attrs="{'invisible': [('state', '=', 'draft')]}">
  68. <field name="bi_sql_view_field_ids" nolabel="1" colspan="4" attrs="{'readonly': [('state', '!=', 'sql_valid')]}">
  69. <tree editable="bottom" decoration-info="field_description==False">
  70. <field name="sequence"/>
  71. <field name="name"/>
  72. <field name="sql_type"/>
  73. <field name="field_description"/>
  74. <field name="ttype" attrs="{
  75. 'required': [('field_description', '!=', False)]}"/>
  76. <field name="many2one_model_id" attrs="{
  77. 'invisible': [('ttype', '!=', 'many2one')],
  78. 'required': [
  79. ('field_description', '!=', False),
  80. ('ttype', '=', 'many2one')]}"/>
  81. <field name="selection" attrs="{
  82. 'invisible': [('ttype', '!=', 'selection')],
  83. 'required': [
  84. ('field_description', '!=', False),
  85. ('ttype', '=', 'selection')]}"/>
  86. <field name="is_index" attrs="{'invisible': [('field_description', '=', False)]}"/>
  87. <field name="is_group_by" attrs="{'invisible': [('field_description', '=', False)]}"/>
  88. <field name="graph_type" attrs="{'invisible': [('field_description', '=', False)]}"/>
  89. <field name="tree_visibility" attrs="{'invisible': [('field_description', '=', False)]}"/>
  90. </tree>
  91. </field>
  92. </page>
  93. <page string="Security">
  94. <group string="Rule Definition">
  95. <field name="domain_force" nolabel="1" colspan="4"/>
  96. </group>
  97. <group>
  98. <group string="Allowed Groups">
  99. <field name="group_ids" nolabel="1"/>
  100. <field name="has_group_changed" invisible="1"/>
  101. </group>
  102. </group>
  103. </page>
  104. <page string="Extras Information">
  105. <group>
  106. <group string="Model">
  107. <field name="model_name" />
  108. <field name="model_id" attrs="{'invisible': [('state', '=', 'draft')]}"/>
  109. </group>
  110. <group string="User Interface">
  111. <field name="tree_view_id"/>
  112. <field name="graph_view_id"/>
  113. <field name="pivot_view_id"/>
  114. <field name="search_view_id"/>
  115. <field name="action_id"/>
  116. <field name="menu_id"/>
  117. </group>
  118. </group>
  119. </page>
  120. </notebook>
  121. </sheet>
  122. </form>
  123. </field>
  124. </record>
  125. </odoo>