Skip to content

Commit 7196899

Browse files
committed
Merge PR #3483 into 19.0
Signed-off-by hbrunn
2 parents b659af3 + 07152a1 commit 7196899

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+47139
-0
lines changed

auditlog/README.rst

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
=========
6+
Audit Log
7+
=========
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:5d80401c7f72e7744b093dc1e4ee6fc2eec010879861d75c844494808dc0e867
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
24+
:target: https://github.com/OCA/server-tools/tree/19.0/auditlog
25+
:alt: OCA/server-tools
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-0-auditlog
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=19.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
This module allows the administrator to log user operations performed on
36+
data models such as ``create``, ``read``, ``write`` and ``delete``.
37+
38+
**Table of contents**
39+
40+
.. contents::
41+
:local:
42+
43+
Usage
44+
=====
45+
46+
Go to Settings / Technical / Audit / Rules to manage audit log rules. A
47+
rule defines which operations to log for a given data model. New rules
48+
need to be enabled by 'Subscribing'.
49+
50+
|image|
51+
52+
Then, check logs in the Settings / Technical / Audit / Logs menu. You
53+
can group them by user sessions, date, data model or HTTP requests:
54+
55+
|image1|
56+
57+
Get the details:
58+
59+
|image2|
60+
61+
A scheduled action exists to delete logs older than 6 months (180 days)
62+
periodically but is not enabled by default. To activate it and/or change
63+
the delay, go to the Configuration / Technical / Automation / Scheduled
64+
Actions menu and edit the Auto-vacuum audit logs entry:
65+
66+
|image3|
67+
68+
In case you're having trouble with the amount of records to delete per
69+
run, you can pass the amount of records to delete for one model per run
70+
as the second parameter. The default is to delete all records in one go.
71+
72+
There are two permission groups that apply to auditlogging. The first is
73+
the Auditlog User group. This group has read-only access to the
74+
auditlogs of individual records through the View Logs action that is
75+
available on records of models that are being tracked. The second group
76+
is the Auditlog Manager group. This group has additional rights to
77+
manage the auditlog configuration rules. By default, users that are ERP
78+
Administrators are also Auditlog Managers.
79+
80+
.. |image| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/rule.png
81+
.. |image1| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/logs.png
82+
.. |image2| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/log.png
83+
.. |image3| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/autovacuum.png
84+
85+
Known issues / Roadmap
86+
======================
87+
88+
- log only operations triggered by some users (currently it logs all
89+
users)
90+
- log read operations does not work on all data models, need
91+
investigation
92+
93+
Bug Tracker
94+
===========
95+
96+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
97+
In case of trouble, please check there if your issue has already been reported.
98+
If you spotted it first, help us to smash it by providing a detailed and welcomed
99+
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
100+
101+
Do not contact contributors directly about support or help with technical issues.
102+
103+
Credits
104+
=======
105+
106+
Authors
107+
-------
108+
109+
* ABF OSIELL
110+
111+
Contributors
112+
------------
113+
114+
- Sebastien Alix <[email protected]>
115+
- Holger Brunn <[email protected]>
116+
- Holden Rehg <[email protected]>
117+
- Eric Lembregts <[email protected]>
118+
- Pieter Paulussen <[email protected]>
119+
- Alan Ramos <[email protected]>
120+
- Stefan Rijnhart <[email protected]>
121+
- Bhavesh Odedra <[email protected]>
122+
- Hardik Suthar <[email protected]>
123+
- Kitti U. <[email protected]>
124+
- Bogdan Valentin Gabor <[email protected]>
125+
- Dennis Sluijk [email protected]
126+
- Adam Heinz <[email protected]>
127+
128+
Other credits
129+
-------------
130+
131+
- Icon: built with different icons from the `Oxygen
132+
theme <https://en.wikipedia.org/wiki/Oxygen_Project>`__ (LGPL)
133+
134+
Maintainers
135+
-----------
136+
137+
This module is maintained by the OCA.
138+
139+
.. image:: https://odoo-community.org/logo.png
140+
:alt: Odoo Community Association
141+
:target: https://odoo-community.org
142+
143+
OCA, or the Odoo Community Association, is a nonprofit organization whose
144+
mission is to support the collaborative development of Odoo features and
145+
promote its widespread use.
146+
147+
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/19.0/auditlog>`_ project on GitHub.
148+
149+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

auditlog/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models
4+
from . import wizards

auditlog/__manifest__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2015 ABF OSIELL <https://osiell.com>
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Audit Log",
6+
"version": "19.0.1.0.0",
7+
"author": "ABF OSIELL, Odoo Community Association (OCA)",
8+
"license": "AGPL-3",
9+
"website": "https://github.com/OCA/server-tools",
10+
"category": "Tools",
11+
"depends": ["base"],
12+
"data": [
13+
"security/res_groups.xml",
14+
"security/ir.model.access.csv",
15+
"data/ir_cron.xml",
16+
"views/menu.xml",
17+
"views/auditlog_http_request_views.xml",
18+
"views/auditlog_http_session_views.xml",
19+
"views/auditlog_log_line_views.xml",
20+
"views/auditlog_log_views.xml",
21+
"views/auditlog_rule_views.xml",
22+
],
23+
"application": True,
24+
"installable": True,
25+
}

auditlog/data/ir_cron.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<odoo noupdate="1">
3+
<record id="ir_cron_auditlog_autovacuum" model="ir.cron">
4+
<field name='name'>Auto-vacuum audit logs</field>
5+
<field name='interval_number'>1</field>
6+
<field name='interval_type'>days</field>
7+
<field name="active" eval="False" />
8+
<field name="code">model.autovacuum(180)</field>
9+
<field name="state">code</field>
10+
<field name="model_id" ref="model_auditlog_autovacuum" />
11+
</record>
12+
</odoo>

0 commit comments

Comments
 (0)