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.

191 lines
8.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" 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 domain="[('state','=','draft')]" string="Draft"/>
  69. <filter domain="[('state','=','subscribed')]" string="Subscribed"/>
  70. <field name="model_id"/>
  71. <group expand="0" string="Group By...">
  72. <filter string="State"
  73. domain="[]" context="{'group_by':'state'}"/>
  74. </group>
  75. </search>
  76. </field>
  77. </record>
  78. <record model="ir.actions.act_window" id="action_auditlog_rule_tree">
  79. <field name="name">Rules</field>
  80. <field name="res_model">auditlog.rule</field>
  81. <field name="type">ir.actions.act_window</field>
  82. <field name="view_type">form</field>
  83. <field name="view_mode">tree,form</field>
  84. <field name="context">{'search_default_draft': 1}</field>
  85. <field name="search_view_id" ref="view_auditlog_rule_search"/>
  86. </record>
  87. <menuitem id="menu_action_auditlog_rule_tree" parent="menu_audit" action="action_auditlog_rule_tree"/>
  88. <!-- auditlog.log -->
  89. <record model="ir.ui.view" id="view_auditlog_log_form">
  90. <field name="name">auditlog.log.form</field>
  91. <field name="model">auditlog.log</field>
  92. <field name="arch" type="xml">
  93. <form string="Log">
  94. <sheet>
  95. <group string="Log">
  96. <group colspan="1">
  97. <field name="timestamp" required="1" readonly="1"/>
  98. <field name="user_id" readonly="1"/>
  99. <field name="method" readonly="1"/>
  100. </group>
  101. <group colspan="1">
  102. <field name="model_id" readonly="1"/>
  103. <field name="res_id" readonly="1"/>
  104. <field name="name" readonly="1"/>
  105. </group>
  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="timestamp"/>
  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 string="User" domain="[]" context="{'group_by':'user_id'}"/>
  159. <filter string="Model" domain="[]" context="{'group_by':'model_id'}"/>
  160. <filter string="Resource ID" domain="[]" context="{'group_by':'res_id'}"/>
  161. <filter string="Date" domain="[]" context="{'group_by':'timestamp'}"/>
  162. </group>
  163. </search>
  164. </field>
  165. </record>
  166. <record model="ir.actions.act_window" id="action_auditlog_log_tree">
  167. <field name="name">Logs</field>
  168. <field name="res_model">auditlog.log</field>
  169. <field name="view_type">form</field>
  170. <field name="search_view_id" ref="view_auditlog_log_search"/>
  171. </record>
  172. <menuitem id="menu_audit_logs" name="Logs"
  173. parent="menu_audit" action="action_auditlog_log_tree"/>
  174. </data>
  175. </openerp>