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.

133 lines
5.0 KiB

7 years ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (C) 2017 MuK IT GmbH
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU Affero General Public License as
  6. published by the Free Software Foundation, either version 3 of the
  7. License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Affero General Public License for more details.
  12. You should have received a copy of the GNU Affero General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. -->
  15. <odoo>
  16. <record id="view_refresh_rule_search" model="ir.ui.view">
  17. <field name="name">muk_autovacuum_rules.search</field>
  18. <field name="model">muk_autovacuum.rules</field>
  19. <field name="arch" type="xml">
  20. <search string="Auto Vacuum Rules">
  21. <field name="name"/>
  22. <field name="model"/>
  23. <field name="state"/>
  24. <field name="active"/>
  25. <separator/>
  26. <filter string="All" name="all" domain="['|', ('active', '=', False), ('active', '=', True)]" />
  27. <group expand="0" string="Group By">
  28. <filter string="Model" domain="[]" context="{'group_by':'model'}"/>
  29. </group>
  30. </search>
  31. </field>
  32. </record>
  33. <record id="view_refresh_rule_tree" model="ir.ui.view">
  34. <field name="name">muk_autovacuum_rules.tree</field>
  35. <field name="model">muk_autovacuum.rules</field>
  36. <field name="arch" type="xml">
  37. <tree string="Auto Vacuum Rules" decoration-muted="(not active)">
  38. <field name="sequence" widget="handle"/>
  39. <field name="name"/>
  40. <field name="model"/>
  41. <field name="state"/>
  42. <field name="active"/>
  43. </tree>
  44. </field>
  45. </record>
  46. <record id="view_refresh_rule_form" model="ir.ui.view">
  47. <field name="name">muk_autovacuum_rules.form</field>
  48. <field name="model">muk_autovacuum.rules</field>
  49. <field name="arch" type="xml">
  50. <form string="Auto Vacuum Rules">
  51. <sheet>
  52. <div class="oe_button_box" name="button_box">
  53. <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-bell">
  54. <field name="active" widget="boolean_button"/>
  55. </button>
  56. </div>
  57. <div class="oe_title">
  58. <label for="name" class="oe_edit_only"/>
  59. <h1>
  60. <field name="name" placeholder="e.g. Delete Logs after 30 Days"/>
  61. </h1>
  62. </div>
  63. <group>
  64. <group>
  65. <field name="sequence"/>
  66. <field name="model"/>
  67. <field name="model_name" invisible="1"/>
  68. <field name="state"/>
  69. </group>
  70. <group>
  71. <field name="protect_starred"/>
  72. <field name="only_inactive"/>
  73. <field name="only_attachments"/>
  74. </group>
  75. </group>
  76. <notebook>
  77. <page string="Time Settings" name='time' autofocus="autofocus"
  78. attrs="{'invisible': [('state', '!=', 'time')]}">
  79. <group>
  80. <group>
  81. <field name="time_field"/>
  82. </group>
  83. <group>
  84. <field name="time_type"/>
  85. <field name="time"/>
  86. </group>
  87. </group>
  88. </page>
  89. <page string="Size Settings" name='time' autofocus="autofocus"
  90. attrs="{'invisible': [('state', '!=', 'size')]}">
  91. <group>
  92. <group>
  93. <field name="size_type"/>
  94. </group>
  95. <group>
  96. <field name="size_parameter"
  97. attrs="{'invisible': [('size_type', '!=', 'parameter')]}"/>
  98. <field name="size_parameter_value"
  99. attrs="{'invisible': [('size_type', '!=', 'parameter')]}"/>
  100. <field name="size"
  101. attrs="{'invisible': [('size_type', '!=', 'fixed')]}"/>
  102. <field name="size_order"/>
  103. </group>
  104. </group>
  105. </page>
  106. <page string="Domain Settings" name='time' autofocus="autofocus"
  107. attrs="{'invisible': [('state', '!=', 'domain')]}">
  108. <field name="domain" widget="domain" options="{'model': 'model_name'}" />
  109. </page>
  110. </notebook>
  111. </sheet>
  112. </form>
  113. </field>
  114. </record>
  115. <record id="action_rule" model="ir.actions.act_window">
  116. <field name="name">Auto Vacuum Rules</field>
  117. <field name="res_model">muk_autovacuum.rules</field>
  118. <field name="view_mode">tree,form</field>
  119. <field name="context">{'search_default_all': 1}</field>
  120. </record>
  121. <menuitem id="menu_rules" name="Auto Vacuum Rules"
  122. parent="base.menu_automation" action="action_rule"/>
  123. </odoo>