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.

136 lines
8.3 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="sequence" widget="handle"/>
  13. <field name="name"/>
  14. <field name="technical_name"/>
  15. <field name="size"/>
  16. <field name="state"/>
  17. </tree>
  18. </field>
  19. </record>
  20. <record id="view_bi_sql_view_form" model="ir.ui.view">
  21. <field name="model">bi.sql.view</field>
  22. <field name="arch" type="xml">
  23. <form>
  24. <header>
  25. <button name="button_validate_sql_expression" type="object" states="draft"
  26. string="Validate SQL Expression" class="oe_highlight"/>
  27. <button name="button_set_draft" type="object" states="sql_valid"
  28. string="Set to Draft" groups="sql_request_abstract.group_sql_request_manager"/>
  29. <button name="button_set_draft" type="object" states="model_valid,ui_valid"
  30. string="Set to Draft" groups="sql_request_abstract.group_sql_request_manager"
  31. 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"/>
  32. <button name="button_preview_sql_expression" type="object" states="draft" string="Preview SQL Expression" />
  33. <button name="button_create_sql_view_and_model" type="object" states="sql_valid"
  34. string="Create SQL View, Indexes and Models" class="oe_highlight"
  35. help="This will try to create an SQL View, based on the SQL request and the according Transient Model and fields, based on settings"/>
  36. <button name="button_update_model_access" type="object"
  37. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('has_group_changed', '=', False)]}"
  38. string="Update Model Access" class="oe_highlight"
  39. help="Update Model Access. Required if you changed groups list after having created the model"/>
  40. <button name="button_create_ui" type="object" states="model_valid" string="Create UI"
  41. class="oe_highlight" help="This will create Odoo View, Action and Menu"/>
  42. <button name="button_refresh_materialized_view" type="object" string="Refresh Materialized View"
  43. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"
  44. help="this will refresh the materialized view"/>
  45. <button name="button_open_view" type="object" string="Open View" states="ui_valid" class="oe_highlight" />
  46. <field name="state" widget="statusbar" />
  47. </header>
  48. <sheet>
  49. <h1>
  50. <field name="name" attrs="{'readonly': [('state','!=','draft')]}" colspan="4"/>
  51. </h1>
  52. <group>
  53. <group>
  54. <group>
  55. <field name="technical_name" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
  56. <field name="view_name"/>
  57. <field name="view_order"/>
  58. <field name="is_materialized"/>
  59. <field name="size"
  60. attrs="{'invisible': ['|', ('state', '=', 'draft'), ('is_materialized', '=', False)]}"/>
  61. <field name="cron_id"
  62. attrs="{'invisible': ['|', ('state', 'in', ('draft', 'sql_valid')), ('is_materialized', '=', False)]}"/>
  63. </group>
  64. </group>
  65. </group>
  66. <notebook>
  67. <page string="SQL Query">
  68. <field name="query" nolabel="1" colspan="4" attrs="{'readonly': [('state', '!=', 'draft')]}"/>
  69. </page>
  70. <page string="SQL Fields" attrs="{'invisible': [('state', '=', 'draft')]}">
  71. <field name="bi_sql_view_field_ids" nolabel="1" colspan="4" attrs="{'readonly': [('state', '!=', 'sql_valid')]}">
  72. <tree editable="bottom" decoration-info="field_description==False">
  73. <field name="sequence"/>
  74. <field name="name"/>
  75. <field name="sql_type"/>
  76. <field name="field_description"/>
  77. <field name="ttype" attrs="{
  78. 'required': [('field_description', '!=', False)]}"/>
  79. <field name="many2one_model_id" attrs="{
  80. 'invisible': [('ttype', '!=', 'many2one')],
  81. 'required': [
  82. ('field_description', '!=', False),
  83. ('ttype', '=', 'many2one')]}"/>
  84. <field name="selection" attrs="{
  85. 'invisible': [('ttype', '!=', 'selection')],
  86. 'required': [
  87. ('field_description', '!=', False),
  88. ('ttype', '=', 'selection')]}"/>
  89. <field name="is_index" attrs="{'invisible': [('field_description', '=', False)]}"/>
  90. <field name="is_group_by" attrs="{'invisible': [('field_description', '=', False)]}"/>
  91. <field name="graph_type" attrs="{'invisible': [('field_description', '=', False)]}"/>
  92. <field name="tree_visibility" attrs="{'invisible': [('field_description', '=', False)]}"/>
  93. </tree>
  94. </field>
  95. </page>
  96. <page string="Security">
  97. <group string="Rule Definition">
  98. <field name="domain_force" nolabel="1" colspan="4"/>
  99. </group>
  100. <group string="Allowed Groups">
  101. <field name="group_ids" nolabel="1" colspan="4"/>
  102. <field name="has_group_changed" invisible="1"/>
  103. </group>
  104. </page>
  105. <page string="Action Settings">
  106. <group string="Context">
  107. <field name="action_context" nolabel="1" colspan="4"/>
  108. </group>
  109. </page>
  110. <page string="Extras Information">
  111. <group>
  112. <group string="Model">
  113. <field name="model_name" />
  114. <field name="model_id" attrs="{'invisible': [('state', '=', 'draft')]}"/>
  115. </group>
  116. <group string="User Interface">
  117. <field name="tree_view_id"/>
  118. <field name="graph_view_id"/>
  119. <field name="pivot_view_id"/>
  120. <field name="search_view_id"/>
  121. <field name="action_id"/>
  122. <field name="menu_id"/>
  123. </group>
  124. </group>
  125. </page>
  126. </notebook>
  127. </sheet>
  128. </form>
  129. </field>
  130. </record>
  131. </odoo>