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.

129 lines
7.7 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 colors="blue:state=='draft'; brown: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_create_sql_view_and_model" type="object" states="sql_valid"
  30. string="Create SQL View, Indexes and Models" class="oe_highlight"
  31. help="This will try to create an SQL View, based on the SQL request and the according Transient Model and fields, based on settings"/>
  32. <button name="button_update_model_access" type="object"
  33. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('has_group_changed', '=', False)]}"
  34. string="Update Model Acess" class="oe_highlight"
  35. help="Update Model Access. Required if you changed groups list after having created the model"/>
  36. <button name="button_create_ui" type="object" states="model_valid" string="Create UI"
  37. class="oe_highlight" help="This will create Odoo View, Action and Menu"/>
  38. <button name="button_refresh_materialized_view" type="object" string="Refresh Materialized View"
  39. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"
  40. help="this will refresh the materialized view"/>
  41. <button name="button_open_view" type="object" string="Open View" states="ui_valid" class="oe_highlight" />
  42. <field name="state" widget="statusbar" />
  43. </header>
  44. <sheet>
  45. <h1>
  46. <field name="name" attrs="{'readonly': [('state','!=','draft')]}" colspan="4"/>
  47. </h1>
  48. <group>
  49. <group>
  50. <group>
  51. <field name="technical_name"/>
  52. <field name="view_name"/>
  53. <field name="view_order"/>
  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. <field name="tree_visibility" attrs="{'invisible': [('field_description', '=', False)]}"/>
  89. </tree>
  90. </field>
  91. </page>
  92. <page string="Security">
  93. <group string="Rule Definition">
  94. <field name="domain_force" nolabel="1" colspan="4"/>
  95. </group>
  96. <group>
  97. <group string="Allowed Groups">
  98. <field name="group_ids" nolabel="1"/>
  99. <field name="has_group_changed" invisible="1"/>
  100. </group>
  101. </group>
  102. </page>
  103. <page string="Extras Information">
  104. <group>
  105. <group string="Model">
  106. <field name="model_name" />
  107. <field name="model_id" attrs="{'invisible': [('state', '=', 'draft')]}"/>
  108. </group>
  109. <group string="User Interface">
  110. <field name="tree_view_id"/>
  111. <field name="graph_view_id"/>
  112. <field name="pivot_view_id"/>
  113. <field name="search_view_id"/>
  114. <field name="action_id"/>
  115. <field name="menu_id"/>
  116. </group>
  117. </group>
  118. </page>
  119. </notebook>
  120. </sheet>
  121. </form>
  122. </field>
  123. </record>
  124. </odoo>