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.

214 lines
9.7 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="log_type"/>
  26. <field name="action_id" readonly="1" groups="base.group_no_one"/>
  27. </group>
  28. <group colspan="1">
  29. <field name="log_read"/>
  30. <field name="log_write"/>
  31. <field name="log_unlink"/>
  32. <field name="log_create"/>
  33. <!--<field name="log_action"/>-->
  34. <!--<field name="log_workflow"/>-->
  35. </group>
  36. </group>
  37. <!--
  38. <group string="Users">
  39. <field name="user_ids" nolabel="1"/>
  40. </group>
  41. -->
  42. </sheet>
  43. </form>
  44. </field>
  45. </record>
  46. <record model="ir.ui.view" id="view_auditlog_rule_tree">
  47. <field name="name">auditlog.rule.tree</field>
  48. <field name="model">auditlog.rule</field>
  49. <field name="arch" type="xml">
  50. <tree colors="blue:state == 'draft';black:state == 'subscribed'" string="Rules">
  51. <field name="name"/>
  52. <field name="model_id"/>
  53. <field name="log_type"/>
  54. <field name="log_read"/>
  55. <field name="log_write"/>
  56. <field name="log_unlink"/>
  57. <field name="log_create"/>
  58. <!--<field name="log_action"/>-->
  59. <!--<field name="log_workflow"/>-->
  60. <field name="state"/>
  61. </tree>
  62. </field>
  63. </record>
  64. <record id="view_auditlog_rule_search" model="ir.ui.view">
  65. <field name="name">auditlog.rule.search</field>
  66. <field name="model">auditlog.rule</field>
  67. <field name="arch" type="xml">
  68. <search string="Rules">
  69. <field name="name"/>
  70. <filter name="state_draft"
  71. domain="[('state','=','draft')]" string="Draft"/>
  72. <filter name="state_subscribed"
  73. domain="[('state','=','subscribed')]" string="Subscribed"/>
  74. <field name="model_id"/>
  75. <group expand="0" string="Group By...">
  76. <filter name="group_by_state" string="State"
  77. domain="[]" context="{'group_by':'state'}"/>
  78. </group>
  79. </search>
  80. </field>
  81. </record>
  82. <record model="ir.actions.act_window" id="action_auditlog_rule_tree">
  83. <field name="name">Rules</field>
  84. <field name="res_model">auditlog.rule</field>
  85. <field name="type">ir.actions.act_window</field>
  86. <field name="view_type">form</field>
  87. <field name="view_mode">tree,form</field>
  88. <field name="context">{}</field>
  89. <field name="search_view_id" ref="view_auditlog_rule_search"/>
  90. </record>
  91. <menuitem id="menu_action_auditlog_rule_tree" parent="menu_audit" action="action_auditlog_rule_tree"/>
  92. <!-- auditlog.log -->
  93. <record model="ir.ui.view" id="view_auditlog_log_form">
  94. <field name="name">auditlog.log.form</field>
  95. <field name="model">auditlog.log</field>
  96. <field name="arch" type="xml">
  97. <form string="Log">
  98. <sheet>
  99. <group string="Log">
  100. <group colspan="1">
  101. <field name="create_date" readonly="1"/>
  102. <field name="user_id" readonly="1"/>
  103. <field name="method" readonly="1"/>
  104. <field name="log_type" readonly="1"/>
  105. </group>
  106. <group colspan="1">
  107. <field name="model_id" readonly="1"/>
  108. <field name="res_id" readonly="1"/>
  109. <field name="name" readonly="1"/>
  110. </group>
  111. </group>
  112. <group string="HTTP Context">
  113. <field name="http_session_id"/>
  114. <field name="http_request_id"/>
  115. </group>
  116. <group string="Fields updated">
  117. <field name="line_ids" readonly="1" nolabel="1">
  118. <form string="Log - Field updated">
  119. <group>
  120. <field name="field_id" readonly="1"/>
  121. </group>
  122. <group string="Values" col="4">
  123. <field name="old_value" readonly="1"/>
  124. <field name="new_value" readonly="1"/>
  125. <field name="old_value_text" readonly="1"/>
  126. <field name="new_value_text" readonly="1"/>
  127. </group>
  128. </form>
  129. <tree>
  130. <field name="field_description"/>
  131. <field name="field_name"/>
  132. <!--<field name="old_value"/>-->
  133. <field name="old_value_text"/>
  134. <!--<field name="new_value"/>-->
  135. <field name="new_value_text"/>
  136. </tree>
  137. </field>
  138. </group>
  139. </sheet>
  140. </form>
  141. </field>
  142. </record>
  143. <record model="ir.ui.view" id="view_auditlog_log_tree">
  144. <field name="name">auditlog.log.tree</field>
  145. <field name="model">auditlog.log</field>
  146. <field name="arch" type="xml">
  147. <tree string="Logs" create="false">
  148. <field name="create_date"/>
  149. <field name="name"/>
  150. <field name="model_id"/>
  151. <field name="res_id"/>
  152. <field name="method"/>
  153. <field name="user_id"/>
  154. </tree>
  155. </field>
  156. </record>
  157. <record id="view_auditlog_log_search" model="ir.ui.view">
  158. <field name="name">auditlog.log.search</field>
  159. <field name="model">auditlog.log</field>
  160. <field name="arch" type="xml">
  161. <search string="Logs">
  162. <field name="name"/>
  163. <field name="model_id"/>
  164. <field name="res_id"/>
  165. <field name="user_id"/>
  166. <group expand="0" string="Group By...">
  167. <filter name="group_by_user_id"
  168. string="User"
  169. domain="[]" context="{'group_by':'user_id'}"/>
  170. <filter name="group_by_model_id"
  171. string="Model"
  172. domain="[]" context="{'group_by':'model_id'}"/>
  173. <filter name="group_by_res_id"
  174. string="Resource ID"
  175. domain="[]" context="{'group_by':'res_id'}"/>
  176. <filter name="group_by_create_date"
  177. string="Date"
  178. domain="[]" context="{'group_by':'create_date'}"/>
  179. <filter name="group_by_http_session"
  180. string="User session"
  181. domain="[]" context="{'group_by':'http_session_id'}"/>
  182. <filter name="group_by_http_request"
  183. string="HTTP Request"
  184. domain="[]" context="{'group_by':'http_request_id'}"/>
  185. </group>
  186. </search>
  187. </field>
  188. </record>
  189. <record model="ir.actions.act_window" id="action_auditlog_log_tree">
  190. <field name="name">Logs</field>
  191. <field name="res_model">auditlog.log</field>
  192. <field name="view_type">form</field>
  193. <field name="search_view_id" ref="view_auditlog_log_search"/>
  194. </record>
  195. <menuitem id="menu_audit_logs" name="Logs"
  196. parent="menu_audit" action="action_auditlog_log_tree"/>
  197. </data>
  198. </openerp>