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.

211 lines
9.6 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"/>
  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="HTTP Context">
  110. <field name="http_session_id"/>
  111. <field name="http_request_id"/>
  112. </group>
  113. <group string="Fields updated">
  114. <field name="line_ids" readonly="1" nolabel="1">
  115. <form string="Log - Field updated">
  116. <group>
  117. <field name="field_id" readonly="1"/>
  118. </group>
  119. <group string="Values" col="4">
  120. <field name="old_value" readonly="1"/>
  121. <field name="new_value" readonly="1"/>
  122. <field name="old_value_text" readonly="1"/>
  123. <field name="new_value_text" readonly="1"/>
  124. </group>
  125. </form>
  126. <tree>
  127. <field name="field_description"/>
  128. <field name="field_name"/>
  129. <!--<field name="old_value"/>-->
  130. <field name="old_value_text"/>
  131. <!--<field name="new_value"/>-->
  132. <field name="new_value_text"/>
  133. </tree>
  134. </field>
  135. </group>
  136. </sheet>
  137. </form>
  138. </field>
  139. </record>
  140. <record model="ir.ui.view" id="view_auditlog_log_tree">
  141. <field name="name">auditlog.log.tree</field>
  142. <field name="model">auditlog.log</field>
  143. <field name="arch" type="xml">
  144. <tree string="Logs" create="false">
  145. <field name="create_date"/>
  146. <field name="name"/>
  147. <field name="model_id"/>
  148. <field name="res_id"/>
  149. <field name="method"/>
  150. <field name="user_id"/>
  151. </tree>
  152. </field>
  153. </record>
  154. <record id="view_auditlog_log_search" model="ir.ui.view">
  155. <field name="name">auditlog.log.search</field>
  156. <field name="model">auditlog.log</field>
  157. <field name="arch" type="xml">
  158. <search string="Logs">
  159. <field name="name"/>
  160. <field name="model_id"/>
  161. <field name="res_id"/>
  162. <field name="user_id"/>
  163. <group expand="0" string="Group By...">
  164. <filter name="group_by_user_id"
  165. string="User"
  166. domain="[]" context="{'group_by':'user_id'}"/>
  167. <filter name="group_by_model_id"
  168. string="Model"
  169. domain="[]" context="{'group_by':'model_id'}"/>
  170. <filter name="group_by_res_id"
  171. string="Resource ID"
  172. domain="[]" context="{'group_by':'res_id'}"/>
  173. <filter name="group_by_create_date"
  174. string="Date"
  175. domain="[]" context="{'group_by':'create_date'}"/>
  176. <filter name="group_by_http_session"
  177. string="User session"
  178. domain="[]" context="{'group_by':'http_session_id'}"/>
  179. <filter name="group_by_http_request"
  180. string="HTTP Request"
  181. domain="[]" context="{'group_by':'http_request_id'}"/>
  182. </group>
  183. </search>
  184. </field>
  185. </record>
  186. <record model="ir.actions.act_window" id="action_auditlog_log_tree">
  187. <field name="name">Logs</field>
  188. <field name="res_model">auditlog.log</field>
  189. <field name="view_type">form</field>
  190. <field name="search_view_id" ref="view_auditlog_log_search"/>
  191. </record>
  192. <menuitem id="menu_audit_logs" name="Logs"
  193. parent="menu_audit" action="action_auditlog_log_tree"/>
  194. </data>
  195. </openerp>