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.

201 lines
9.0 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <menuitem id="menu_audit" name="Audit"
  5. parent="base.menu_reporting" sequence="50"
  6. groups="base.group_system"/>
  7. <!-- auditlog.rule -->
  8. <record model="ir.ui.view" id="view_auditlog_rule_form">
  9. <field name="name">auditlog.rule.form</field>
  10. <field name="model">auditlog.rule</field>
  11. <field name="arch" type="xml">
  12. <form string="Rule">
  13. <header>
  14. <button string="Subscribe" name="subscribe"
  15. type="object" states="draft" class="oe_highlight"/>
  16. <button string="Unsubscribe" name="unsubscribe"
  17. type="object" states="subscribed"/>
  18. <field name="state" widget="statusbar"/>
  19. </header>
  20. <sheet>
  21. <group string="Rule">
  22. <group colspan="1">
  23. <field name="name" required="1"/>
  24. <field name="model_id"/>
  25. <field name="action_id" readonly="1" groups="base.group_no_one"/>
  26. </group>
  27. <group colspan="1">
  28. <field name="log_read" invisible="1"/>
  29. <field name="log_write"/>
  30. <field name="log_unlink"/>
  31. <field name="log_create"/>
  32. <!--<field name="log_action"/>-->
  33. <!--<field name="log_workflow"/>-->
  34. </group>
  35. </group>
  36. <!--
  37. <group string="Users">
  38. <field name="user_ids" nolabel="1"/>
  39. </group>
  40. -->
  41. </sheet>
  42. </form>
  43. </field>
  44. </record>
  45. <record model="ir.ui.view" id="view_auditlog_rule_tree">
  46. <field name="name">auditlog.rule.tree</field>
  47. <field name="model">auditlog.rule</field>
  48. <field name="arch" type="xml">
  49. <tree colors="blue:state == 'draft';black:state == 'subscribed'" string="Rules">
  50. <field name="name"/>
  51. <field name="model_id"/>
  52. <field name="log_read"/>
  53. <field name="log_write"/>
  54. <field name="log_unlink"/>
  55. <field name="log_create"/>
  56. <!--<field name="log_action"/>-->
  57. <!--<field name="log_workflow"/>-->
  58. <field name="state"/>
  59. </tree>
  60. </field>
  61. </record>
  62. <record id="view_auditlog_rule_search" model="ir.ui.view">
  63. <field name="name">auditlog.rule.search</field>
  64. <field name="model">auditlog.rule</field>
  65. <field name="arch" type="xml">
  66. <search string="Rules">
  67. <field name="name"/>
  68. <filter name="state_draft"
  69. domain="[('state','=','draft')]" string="Draft"/>
  70. <filter name="state_subscribed"
  71. domain="[('state','=','subscribed')]" string="Subscribed"/>
  72. <field name="model_id"/>
  73. <group expand="0" string="Group By...">
  74. <filter name="group_by_state" string="State"
  75. domain="[]" context="{'group_by':'state'}"/>
  76. </group>
  77. </search>
  78. </field>
  79. </record>
  80. <record model="ir.actions.act_window" id="action_auditlog_rule_tree">
  81. <field name="name">Rules</field>
  82. <field name="res_model">auditlog.rule</field>
  83. <field name="type">ir.actions.act_window</field>
  84. <field name="view_type">form</field>
  85. <field name="view_mode">tree,form</field>
  86. <field name="context">{}</field>
  87. <field name="search_view_id" ref="view_auditlog_rule_search"/>
  88. </record>
  89. <menuitem id="menu_action_auditlog_rule_tree" parent="menu_audit" action="action_auditlog_rule_tree"/>
  90. <!-- auditlog.log -->
  91. <record model="ir.ui.view" id="view_auditlog_log_form">
  92. <field name="name">auditlog.log.form</field>
  93. <field name="model">auditlog.log</field>
  94. <field name="arch" type="xml">
  95. <form string="Log">
  96. <sheet>
  97. <group string="Log">
  98. <group colspan="1">
  99. <field name="create_date" readonly="1"/>
  100. <field name="user_id" readonly="1"/>
  101. <field name="method" readonly="1"/>
  102. </group>
  103. <group colspan="1">
  104. <field name="model_id" readonly="1"/>
  105. <field name="res_id" readonly="1"/>
  106. <field name="name" readonly="1"/>
  107. </group>
  108. </group>
  109. <group string="Fields updated">
  110. <field name="line_ids" readonly="1" nolabel="1">
  111. <form string="Log - Field updated">
  112. <group>
  113. <field name="field_id" readonly="1"/>
  114. </group>
  115. <group string="Values" col="4">
  116. <field name="old_value" readonly="1"/>
  117. <field name="new_value" readonly="1"/>
  118. <field name="old_value_text" readonly="1"/>
  119. <field name="new_value_text" readonly="1"/>
  120. </group>
  121. </form>
  122. <tree>
  123. <field name="field_description"/>
  124. <field name="field_name"/>
  125. <!--<field name="old_value"/>-->
  126. <field name="old_value_text"/>
  127. <!--<field name="new_value"/>-->
  128. <field name="new_value_text"/>
  129. </tree>
  130. </field>
  131. </group>
  132. </sheet>
  133. </form>
  134. </field>
  135. </record>
  136. <record model="ir.ui.view" id="view_auditlog_log_tree">
  137. <field name="name">auditlog.log.tree</field>
  138. <field name="model">auditlog.log</field>
  139. <field name="arch" type="xml">
  140. <tree string="Logs" create="false">
  141. <field name="create_date"/>
  142. <field name="name"/>
  143. <field name="model_id"/>
  144. <field name="res_id"/>
  145. <field name="method"/>
  146. <field name="user_id"/>
  147. </tree>
  148. </field>
  149. </record>
  150. <record id="view_auditlog_log_search" model="ir.ui.view">
  151. <field name="name">auditlog.log.search</field>
  152. <field name="model">auditlog.log</field>
  153. <field name="arch" type="xml">
  154. <search string="Logs">
  155. <field name="name"/>
  156. <field name="model_id"/>
  157. <field name="res_id"/>
  158. <field name="user_id"/>
  159. <group expand="0" string="Group By...">
  160. <filter name="group_by_user_id"
  161. string="User"
  162. domain="[]" context="{'group_by':'user_id'}"/>
  163. <filter name="group_by_model_id"
  164. string="Model"
  165. domain="[]" context="{'group_by':'model_id'}"/>
  166. <filter name="group_by_res_id"
  167. string="Resource ID"
  168. domain="[]" context="{'group_by':'res_id'}"/>
  169. <filter name="group_by_create_date"
  170. string="Date"
  171. domain="[]" context="{'group_by':'create_date'}"/>
  172. </group>
  173. </search>
  174. </field>
  175. </record>
  176. <record model="ir.actions.act_window" id="action_auditlog_log_tree">
  177. <field name="name">Logs</field>
  178. <field name="res_model">auditlog.log</field>
  179. <field name="view_type">form</field>
  180. <field name="search_view_id" ref="view_auditlog_log_search"/>
  181. </record>
  182. <menuitem id="menu_audit_logs" name="Logs"
  183. parent="menu_audit" action="action_auditlog_log_tree"/>
  184. </data>
  185. </openerp>