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.

205 lines
9.3 KiB

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