ir_ui_view_views.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- View -->
  4. <record id="view_view_form" model="ir.ui.view">
  5. <field name="model">ir.ui.view</field>
  6. <field name="arch" type="xml">
  7. <form string="Views">
  8. <sheet>
  9. <group>
  10. <group>
  11. <field name="name"/>
  12. <field name="type"/>
  13. <field name="model"/>
  14. <field name="priority"/>
  15. <field name="active" widget="boolean_toggle"/>
  16. </group>
  17. <group groups="base.group_no_one">
  18. <field name="field_parent"/>
  19. <field name="inherit_id"/>
  20. <field name="mode"/>
  21. <field name="model_data_id"/>
  22. <field name="xml_id" class="text-break"/>
  23. </group>
  24. </group>
  25. <div class="oe_edit_only alert alert-info" role="alert">
  26. Be aware that editing the architecture of a standard view is not advised, since the changes will be overwritten during future module updates.<br/>
  27. We recommend applying modifications to standard views through inherited views or customization with Odoo Studio.
  28. </div>
  29. <notebook>
  30. <page string="Architecture" name="architecture">
  31. <field name="arch_db" class="oe_no_translation_content"/>
  32. <field name="arch_base" string="View Architecture" widget="ace" options="{'mode': 'xml'}" required="1"/>
  33. </page>
  34. <page string="Access Rights" name="access_rights">
  35. <field name="groups_id"/>
  36. </page>
  37. <page name="inherit_children" string="Inherited Views">
  38. <field name="inherit_children_ids" context="{'default_model':model,'default_type':type,'default_inherit_id':active_id,'default_mode':'extension', 'active_test': False}">
  39. <tree default_order="priority,id" decoration-muted="not active">
  40. <field name="active" invisible="1"/>
  41. <field name="id"/>
  42. <field name="priority"/>
  43. <field name="name"/>
  44. <field name="xml_id"/>
  45. </tree>
  46. </field>
  47. </page>
  48. </notebook>
  49. </sheet>
  50. </form>
  51. </field>
  52. </record>
  53. <record id="view_view_tree" model="ir.ui.view">
  54. <field name="model">ir.ui.view</field>
  55. <field name="arch" type="xml">
  56. <tree string="Views">
  57. <field name="priority" string="Sequence" widget="handle"/>
  58. <field name="name"/>
  59. <field name="type"/>
  60. <field name="model"/>
  61. <field name="xml_id" groups="base.group_no_one"/>
  62. <field name="inherit_id"/>
  63. </tree>
  64. </field>
  65. </record>
  66. <record id="view_view_search" model="ir.ui.view">
  67. <field name="model">ir.ui.view</field>
  68. <field name="arch" type="xml">
  69. <search string="Views">
  70. <field name="name" filter_domain="['|', '|', ('name','ilike',self), ('model','ilike',self), ('model_data_id','ilike',self)]" string="View"/>
  71. <field name="key"/>
  72. <field name="model"/>
  73. <field name="inherit_id"/>
  74. <field name="type"/>
  75. <field name="arch_db" string="View Architecture"/>
  76. <filter string="Form" name="form" domain="[('type', '=','form')]"/>
  77. <filter string="Tree" name="tree" domain="[('type', '=', 'tree')]"/>
  78. <filter string="Kanban" name="kanban" domain="[('type', '=', 'kanban')]"/>
  79. <filter string="Search" name="search" domain="[('type', '=', 'search')]"/>
  80. <filter string="QWeb" name="qweb" domain="[('type', '=', 'qweb')]"/>
  81. <separator/>
  82. <filter string="Modified Architecture" name="arch_updated" domain="[('arch_updated', '=',True)]"/>
  83. <separator/>
  84. <filter string="Active" name="active" domain="[('active', '=',True)]"/>
  85. <filter string="Inactive" name="inactive" domain="[('active', '=',False)]"/>
  86. <group expand="0" string="Group By">
  87. <filter string="Model" name="object" domain="[]" context="{'group_by':'model'}"/>
  88. <filter string="Type" name="type" domain="[]" context="{'group_by':'type'}"/>
  89. <filter string="Inherit" name="inherit" domain="[]" context="{'group_by':'inherit_id'}"/>
  90. </group>
  91. </search>
  92. </field>
  93. </record>
  94. <record id="action_ui_view" model="ir.actions.act_window">
  95. <field name="name">Views</field>
  96. <field name="type">ir.actions.act_window</field>
  97. <field name="res_model">ir.ui.view</field>
  98. <field name="view_id" ref="view_view_tree"/>
  99. <field name="context">{'search_default_active': 1}</field>
  100. <field name="help">Views allows you to personalize each view of Odoo. You can add new fields, move fields, rename them or delete the ones that you do not need.</field>
  101. </record>
  102. <menuitem action="action_ui_view" id="menu_action_ui_view" parent="base.next_id_2" sequence="2"/>
  103. <!-- Reset view wizard -->
  104. <record id="reset_view_arch_wizard_view" model="ir.ui.view">
  105. <field name="name">Reset View Architecture</field>
  106. <field name="model">reset.view.arch.wizard</field>
  107. <field name="arch" type="xml">
  108. <form string="Reset View Architecture">
  109. <group>
  110. <group>
  111. <field name="has_diff" invisible="1"/>
  112. <field name="view_id" invisible="1"/>
  113. <field name="view_name"/>
  114. <field name="compare_view_id" attrs="{'invisible': [('reset_mode', '!=', 'other_view')]}" options="{'no_create': True, 'no_open': True}"/>
  115. </group>
  116. <group>
  117. <field name="reset_mode" widget="radio"/>
  118. </group>
  119. </group>
  120. <field name="arch_diff" attrs="{'invisible': [('arch_diff', '=', False)]}"/>
  121. <div class="alert alert-warning my-2" role="alert" attrs="{'invisible': [('arch_diff', '!=', False)]}">
  122. <span attrs="{'invisible': [('reset_mode', '!=', 'soft')]}">This view has no previous version.</span>
  123. <span attrs="{'invisible': [('reset_mode', '!=', 'hard')]}">This view is not coming from a file.</span>
  124. <span attrs="{'invisible': [('reset_mode', '!=', 'other_view')]}">You need two views to compare.</span>
  125. </div>
  126. <footer>
  127. <button string="Reset View" name="reset_view_button" type="object" class="btn-primary" attrs="{'invisible': [('has_diff', '=', False)]}" data-hotkey="q"/>
  128. <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" />
  129. </footer>
  130. </form>
  131. </field>
  132. </record>
  133. <record id="reset_view_arch_wizard_action" model="ir.actions.act_window">
  134. <field name="name">Compare/Reset</field>
  135. <field name="res_model">reset.view.arch.wizard</field>
  136. <field name="view_mode">form</field>
  137. <field name="target">new</field>
  138. <field name="binding_model_id" ref="model_ir_ui_view"/>
  139. <field name="binding_view_types">form,list</field>
  140. </record>
  141. <!-- View customizations -->
  142. <record id="view_view_custom_form" model="ir.ui.view">
  143. <field name="model">ir.ui.view.custom</field>
  144. <field name="arch" type="xml">
  145. <form string="Customized Views">
  146. <sheet>
  147. <group col="4">
  148. <field name="user_id"/>
  149. <field name="ref_id"/>
  150. <separator string="View Architecture" colspan="4" />
  151. <field name="arch" colspan="4" nolabel="1"/>
  152. </group>
  153. </sheet>
  154. </form>
  155. </field>
  156. </record>
  157. <record id="view_view_custom_tree" model="ir.ui.view">
  158. <field name="model">ir.ui.view.custom</field>
  159. <field name="arch" type="xml">
  160. <tree string="Customized Views">
  161. <field name="user_id"/>
  162. <field name="ref_id"/>
  163. </tree>
  164. </field>
  165. </record>
  166. <record id="view_view_custom_search" model="ir.ui.view">
  167. <field name="model">ir.ui.view.custom</field>
  168. <field name="arch" type="xml">
  169. <search string="Customized Views">
  170. <field name="user_id"/>
  171. <field name="ref_id"/>
  172. </search>
  173. </field>
  174. </record>
  175. <record id="action_ui_view_custom" model="ir.actions.act_window">
  176. <field name="name">Customized Views</field>
  177. <field name="type">ir.actions.act_window</field>
  178. <field name="res_model">ir.ui.view.custom</field>
  179. <field name="help" type="html"><p class="o_view_nocontent_smiling_face">Create a customized view</p><p>Customized views are used when users reorganize the content of their dashboard views (via web client)</p></field>
  180. </record>
  181. <menuitem id="menu_action_ui_view_custom" action="action_ui_view_custom" parent="base.next_id_2" sequence="3"/>
  182. </odoo>