Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
a1db0d1
[ADD] Module 'auditlog' - A substitute to the deprecated 'audittrail'…
sebalix Jan 21, 2015
5845acb
[FIX] Module 'auditlog' - Fix some flake8 errors
sebalix Jan 22, 2015
7915d2c
[FIX] Module 'auditlog' - Put the module description in a README.rst …
sebalix Jan 22, 2015
d811264
[ADD] Module 'auditlog' - 'auditlog.pot' file added
sebalix Jan 22, 2015
ea7c4e1
[IMP] Module 'auditlog' - Split the 'create_logs()' method in several…
sebalix Jan 22, 2015
b6b6241
[IMP] Module 'auditlog' - Clean up vim lines
sebalix Jan 22, 2015
dfb8fe7
[IMP] Module 'auditlog' - Add 'name' attributes on some filters and o…
sebalix Jan 22, 2015
09e8044
[IMP] Module 'auditlog' - Removed the 'timestamp' field from the 'aud…
sebalix Jan 28, 2015
2ee415c
[IMP] Module 'auditlog' - README.rst updated (based on the OCA template)
sebalix Jan 28, 2015
251a201
[FIX] Module 'auditlog' - 'time' module imported but unused
sebalix Jan 28, 2015
8b4b23f
[IMP] ignore rules for nonexisting objects
hbrunn Jan 28, 2015
dbfdff7
[ADD] init hook to migrate from audittrail
hbrunn Jan 28, 2015
ffe3bd4
[FIX] also migrate id sequences
hbrunn Jan 28, 2015
df1b4f3
[IMP] Module 'auditlog' - Contributors updated in README.rst + AUTHOR…
sebalix Jan 28, 2015
c3a6bee
[ADD] change xmlids of legacy rules to point to auditlog.rule
hbrunn Jan 28, 2015
546e453
[IMP] use new import of _, SUPERUSER_ID
hbrunn Jan 29, 2015
a9ef162
[ADD] allow overriding modules to pass additional log values
hbrunn Jan 29, 2015
2469bf3
[IMP] cache model and field ids
hbrunn Jan 29, 2015
d53e2c6
[IMP] don't make a temporary copy of dict keys
hbrunn Jan 29, 2015
7c02792
[FIX] don't reset caches in register_hook
hbrunn Jan 29, 2015
ead9631
[ADD] pass old_values to create_log when deleting a record
hbrunn Jan 29, 2015
84dc219
[FIX] cope with no additional log values
hbrunn Jan 29, 2015
06a9c4a
[ADD] tests
hbrunn Jan 29, 2015
0a29d66
[FIX] Module 'auditlog' - local variable 'ir_model' is assigned to bu…
sebalix Jan 30, 2015
8d63230
[IMP] use a model for test that is not influenced by the mail module
hbrunn Feb 1, 2015
06bdbf9
[FIX] Module 'auditlog' - Remove 'active' field from __openerp__.py
sebalix Feb 2, 2015
56a4855
[IMP] Module 'auditlog' - README.rst updated (inform that the audittr…
sebalix Feb 2, 2015
163a966
[IMP] Module 'auditlog' - Useless lines of code removed
sebalix Feb 2, 2015
5c7cccc
[IMP] Module 'auditlog' - Autoremove 'auditlog.log.line' records when…
sebalix Feb 4, 2015
f9ef527
[IMP] Module 'auditlog' - Model 'auditlog.log.line', 'field_name' and…
sebalix Feb 4, 2015
ed352f2
[IMP] Module 'auditlog' - Added a second test using cached data gener…
sebalix Feb 4, 2015
9113fb0
[FIX] Module 'auditlog' - Data dictionaries of fields and models are …
sebalix Feb 4, 2015
7d4b2da
[IMP] Module 'auditlog' - Add a test regarding a resource deleted thr…
sebalix Feb 9, 2015
030e2d5
[FIX] Module 'auditlog' - When updating a resource, filter IDs on 2ma…
sebalix Feb 9, 2015
559d69e
[ADD] migration script
hbrunn Feb 16, 2015
8110973
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
946cd57
[IMP] Module 'auditlog' - Performing logs on 'read' operations + Some…
sebalix Apr 1, 2015
6754838
[FIX] Module 'auditlog' - Replace 'try/except statement by 'isinstanc…
sebalix Apr 2, 2015
e1c48b7
[FIX] Module 'auditlog' - Support 'read' calls with one ID or a list …
sebalix Apr 2, 2015
5a41f88
[FIX] Module 'auditlog' - Unit tests, do not create users with the 'n…
sebalix Apr 8, 2015
58c2a83
[ADD] German translation for auditlog
eqms Apr 19, 2015
a18288f
[FIX] Module 'auditlog' - No log for internal processing (e.g. 'read'…
sebalix Apr 19, 2015
bdd3998
[FIX] Module 'auditlog' - Fix lint check
sebalix Apr 19, 2015
4ea91e4
[IMP] Module 'auditlog' - Unsubscribe rules before removing them + Un…
sebalix Apr 19, 2015
0eeca97
[FIX] Module 'auditlog' - Log fields coming from polymorphic inherita…
sebalix Apr 19, 2015
6bdce61
[IMP] Module 'auditlog' - Remove the unit test causing trouble with T…
sebalix Apr 21, 2015
ee72786
[ADD] auditlog: Added Spanish translation.
May 17, 2015
a388594
Add bug tracker link on README.rst
yvaucher May 22, 2015
a90fec0
[FIX] ie related fields don't have an
hbrunn Jun 11, 2015
425c9bf
[ADD] comment
hbrunn Jul 8, 2015
de44ca1
[FIX] make patched create downgrade correctly to v6.1
hbrunn Jul 17, 2015
a224036
Add missing default oca icons
yvaucher Aug 18, 2015
85be900
[FIX] if someone else has overridden our patched,
hbrunn Sep 16, 2015
1aedbf3
OCA Transbot updated translations from Transifex
oca-transbot Oct 5, 2015
5f40452
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
dedc47b
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
55f768f
[FIX] remove en.po that was erroneously created by transbot
sbidoul Aug 15, 2016
3caddf2
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
c817a4d
Module 'auditlog' - Log HTTP user sessions and requests
sebalix Oct 30, 2015
75870b5
Module 'auditlog' - Bump the version to 1.1.0
sebalix Oct 30, 2015
cd6bd05
Module 'auditlog' - Cleanup XML views (types removed)
sebalix Oct 30, 2015
10d21af
Module 'auditlog' - A log can be created with no current HTTP request…
sebalix Oct 30, 2015
acf53a1
Module 'auditlog' - 'display_name' fields added for the user session …
sebalix Oct 31, 2015
59d6178
Module 'auditlog' - Fix pylint check
sebalix Oct 31, 2015
d6440ff
turn off prefetching when reding values
hbrunn Nov 26, 2015
f5685ef
auditlog - Ability to choose the log type on the rule: Full log (comp…
sebalix Feb 1, 2016
b1fff3f
auditlog - Field 'type' renamed to 'log_type'
sebalix Feb 13, 2016
9c4d701
auditlog - Bump version number
sebalix Feb 13, 2016
eb1e6db
auditlog - Auto-vacuum logs, HTTP requests and HTTP user sessions
sebalix Feb 13, 2016
06ab7e7
auditlog - Icon added + README updated (screenshots)
sebalix May 26, 2016
1a632f7
singleton error if we saved the current session two times (#473)
hbrunn Jul 4, 2016
5c3afe0
Migrate auditlog module from 8.0 to 9.0
holdenrehg Jun 6, 2016
57827ba
Updated the __openerp__.xml to include the license and images fields
holdenrehg Jun 13, 2016
ef6c518
auditlog module, Remove duplicate license key from openerp config
holdenrehg Jun 24, 2016
2c18b4e
auditlog: Remove migration from audittrail functionality, this is not…
holdenrehg Jun 27, 2016
04a58a2
auditlog: Remove pre_init_hook reference from openerp, no pre_init ho…
holdenrehg Jun 27, 2016
7dfa09e
auditlog - Lint
sebalix Nov 14, 2016
48b93d3
auditlog - Migrate 'AuditlogRule.create' and 'AuditlogRule.write' met…
sebalix Nov 14, 2016
8f34e1a
[MIG] auditlog: Migrated to 10.0
Jan 20, 2017
4c34ad0
[FIX] Request id no longer exists after concurrency rollback
StefanRijnhart Jan 16, 2017
4279e77
[FIX] auditlog: Duplicate logging
obulkin Feb 16, 2017
0698a3a
OCA Transbot updated translations from Transifex
oca-transbot Oct 26, 2015
7db4277
[MIG] auditlog: Migration to 11.0
etobella Nov 3, 2017
8da1f8a
[add] https
rgarnau Nov 14, 2017
f596dff
OCA Transbot updated translations from Transifex
oca-transbot Dec 9, 2017
ac22f11
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
b8267a9
[UPD] Update auditlog.pot
oca-travis Jun 17, 2018
5f0b2c5
Translated using Weblate
Jun 20, 2018
d0bf826
[MIG] auditlog: Migration to 12.0
sebalix Apr 9, 2019
1717ef6
Translated using Weblate (Chinese (Simplified))
liweijie0812 Aug 30, 2019
e0ea64b
[MIG] auditlog: Migration to 13.0
lembregtse Oct 1, 2019
94bc2a7
[IMP] auditlog: black, isort, prettier
rven Nov 8, 2019
338035d
[FIX] auditlog: log computed fields stored in db as expected
sebalix Oct 1, 2019
9ef576b
[FIX] auditlog: add support for create multi
sebalix Oct 1, 2019
dde05d2
[UPD] Update auditlog.pot
oca-travis Mar 25, 2020
bef7833
[UPD] README.rst
OCA-git-bot Mar 25, 2020
fcd030d
Update translation files
oca-transbot Mar 29, 2020
91ede64
[FIX] Readme Images relative path
emagdalenaC2i Jul 10, 2020
20eaa6e
[IMP] auditlog: black, isort, prettier
alan196 Oct 29, 2020
54efd1a
[MIG] auditlog: Migration to 14.0
alan196 Oct 29, 2020
e1cfe40
[IMP] Dont query non-stored related or computed fields on full auditl…
Dec 14, 2020
29e4138
[14.0][FIX] Add sudo() to retrieve record vals
Feb 1, 2021
32efac1
[IMP] auditlog: prevent cascading delete of logs when models or field…
Mar 24, 2021
77ed5ff
[FIX] auditlog: invalid XML
StefanRijnhart May 18, 2021
2e11552
[ADD] auditlog: enable to track Unlink record
Jun 22, 2021
63e1f21
[ADD] auditlog: test case for capture record
Jun 22, 2021
1eb6a3c
[14.0][IMP] auditlog, add auditlog.log.line view
kittiu Aug 19, 2021
bd7788c
[IMP] auditlog: black, isort, prettier
Jan 31, 2022
079b023
[MIG] auditlog: Migration to 15.0
Jan 31, 2022
79427a9
Translated using Weblate (Spanish (Argentina))
ibuioli Mar 20, 2022
2190d79
Add option to Eliminate user and fields in audit logs
atchuthan Mar 22, 2022
48cf8fb
Update translation files
oca-transbot Sep 27, 2022
e57ea23
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 29, 2022
596e0fe
[FIX] auditlog: autovacuum performance
gurneyalex Oct 31, 2022
7f698e1
[MIG] auditlog: Migration to 16.0
StefanRijnhart Nov 18, 2022
ec05ffe
[IMP] auditlog: dedicated security groups for model access
BertVGroenendael Nov 18, 2022
7c91636
[UPD] Update auditlog.pot
Dec 22, 2022
a48c67d
[UPD] README.rst
OCA-git-bot Dec 22, 2022
cd49ca9
Update translation files
weblate Dec 22, 2022
8a37b88
Translated using Weblate (Spanish (Argentina))
ibuioli Dec 24, 2022
83461a5
[IMP] auditlog: make the line views using a non auto model
etobella Dec 21, 2022
6f15d6c
Translated using Weblate (Spanish (Argentina))
ibuioli Jan 1, 2023
f1edd48
[FIX] auditlog: Allow passing a chunk size for autovacuum
hbrunn May 10, 2022
6bd7275
Translated using Weblate (Italian)
mymage Mar 23, 2023
063612d
Translated using Weblate (Slovenian)
sysadminmatmoz Mar 31, 2023
c45651f
Translated using Weblate (Spanish)
Ivorra78 Aug 25, 2023
548eef3
FIX: auditlog consistency with Many2one fields
SilvioC2C Dec 2, 2022
190f8a6
Translated using Weblate (Italian)
mymage Oct 23, 2023
30c0350
[FIX] auditlog: prevent removal of x2many values from inaccessible co…
StefanRijnhart Jan 19, 2024
345155c
[16.0][FIX] auditlog: Add/Remove User Group
BT-anieto Feb 8, 2024
d97392b
[IMP] auditlog: pre-commit stuff
rven Nov 14, 2023
7e085cf
[MIG] auditlog: Migration to 17.0
rven Feb 5, 2024
37d77a9
Update translation files
weblate Apr 12, 2024
f5a41ff
Translated using Weblate (Italian)
mymage Apr 17, 2024
d583c39
Translated using Weblate (Spanish)
Ivorra78 Apr 23, 2024
763f237
Translated using Weblate (Swedish)
jakobkrabbe Jun 12, 2024
6ea388e
Translated using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 16, 2024
c76451f
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 16, 2024
3713766
[FIX] auditlog: registry propagation
gurneyalex Oct 22, 2024
01a87b2
[MIG] auditlog: Migration to 18.0
lembregtse Dec 5, 2024
b49268b
[FIX] auditlog: Dismiss logging when not needed.
rven Dec 4, 2024
6a639f0
[FIX] auditlog: patch away all write overrides in res.groups for test
hbrunn Dec 12, 2024
e429050
[FIX] auditlog: adapt exclude fields test to #3137
lembregtse Dec 21, 2024
c2de939
[UPD] Update auditlog.pot
Dec 30, 2024
d835be8
[BOT] post-merge updates
OCA-git-bot Dec 30, 2024
fd06e63
Update translation files
weblate Dec 30, 2024
ce26d91
Translated using Weblate (Turkish)
bo-eska May 8, 2025
5229881
[FIX] auditlog rule: Control the write function in the models when ex…
angelvilaplana Apr 18, 2024
334f2f0
[18.0] auditlog: Log exports
tarteo Aug 6, 2025
01d15ee
[ADD] test_auditlog
StefanRijnhart Sep 15, 2025
ad06512
[FIX] auditlog: use a throwaway cache instead of trying to keep the m…
StefanRijnhart Sep 16, 2025
809aab7
Translated using Weblate (Italian)
mymage Sep 18, 2025
b4dca87
Translated using Weblate (Turkish)
bo-eska Sep 24, 2025
9d1d4d9
[FIX] auditlog: Ensure unit tests unpatch methods.
amh-mw Sep 24, 2025
dacc577
[FIX] auditlog: Ensure display_name computation works with new record.
amh-mw Sep 25, 2025
e3cdda6
[FIX] auditlog: swap out tocompute in ThrowAwayCache as well
StefanRijnhart Oct 6, 2025
5b8379b
[REF] Remove deprecated `name_get` methods (odoo/odoo#122085)
baptiste-n42 Nov 3, 2025
2ce40b0
Translated using Weblate (Japanese)
Ryoko04 Nov 12, 2025
deee194
Translated using Weblate (Italian)
mymage Nov 28, 2025
7618fa8
Translated using Weblate (Swedish)
jakobkrabbe Dec 3, 2025
7b3df05
[FIX] auditlog: drop tocompute register entirely from ThrowAwayCache
StefanRijnhart Dec 18, 2025
9f78543
[IMP] auditlog: pre-commit execution
StefanRijnhart Jan 2, 2026
e1aa0c7
[MIG] auditlog: Migration to 19.0
StefanRijnhart Jan 2, 2026
4a2e70e
[REF] auditlog: apply one model per file convention + file naming con…
StefanRijnhart Jan 2, 2026
f26a3fd
[IMP] auditlog: various usability improvements
StefanRijnhart Jan 3, 2026
7f5b78f
[IMP] auditlog: replace 'Subscribed' terminology by 'Confirmed'
StefanRijnhart Jan 3, 2026
903b380
[IMP] auditlog: improve coverage
StefanRijnhart Jan 2, 2026
07152a1
[FIX] auditlog: ensure methods from test template are actually run
StefanRijnhart Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions auditlog/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=========
Audit Log
=========

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5d80401c7f72e7744b093dc1e4ee6fc2eec010879861d75c844494808dc0e867
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/19.0/auditlog
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-19-0/server-tools-19-0-auditlog
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows the administrator to log user operations performed on
data models such as ``create``, ``read``, ``write`` and ``delete``.

**Table of contents**

.. contents::
:local:

Usage
=====

Go to Settings / Technical / Audit / Rules to manage audit log rules. A
rule defines which operations to log for a given data model. New rules
need to be enabled by 'Subscribing'.

|image|

Then, check logs in the Settings / Technical / Audit / Logs menu. You
can group them by user sessions, date, data model or HTTP requests:

|image1|

Get the details:

|image2|

A scheduled action exists to delete logs older than 6 months (180 days)
periodically but is not enabled by default. To activate it and/or change
the delay, go to the Configuration / Technical / Automation / Scheduled
Actions menu and edit the Auto-vacuum audit logs entry:

|image3|

In case you're having trouble with the amount of records to delete per
run, you can pass the amount of records to delete for one model per run
as the second parameter. The default is to delete all records in one go.

There are two permission groups that apply to auditlogging. The first is
the Auditlog User group. This group has read-only access to the
auditlogs of individual records through the View Logs action that is
available on records of models that are being tracked. The second group
is the Auditlog Manager group. This group has additional rights to
manage the auditlog configuration rules. By default, users that are ERP
Administrators are also Auditlog Managers.

.. |image| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/rule.png
.. |image1| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/logs.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/log.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/server-tools/19.0/auditlog/static/description/autovacuum.png

Known issues / Roadmap
======================

- log only operations triggered by some users (currently it logs all
users)
- log read operations does not work on all data models, need
investigation

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`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**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* ABF OSIELL

Contributors
------------

- Sebastien Alix <[email protected]>
- Holger Brunn <[email protected]>
- Holden Rehg <[email protected]>
- Eric Lembregts <[email protected]>
- Pieter Paulussen <[email protected]>
- Alan Ramos <[email protected]>
- Stefan Rijnhart <[email protected]>
- Bhavesh Odedra <[email protected]>
- Hardik Suthar <[email protected]>
- Kitti U. <[email protected]>
- Bogdan Valentin Gabor <[email protected]>
- Dennis Sluijk [email protected]
- Adam Heinz <[email protected]>

Other credits
-------------

- Icon: built with different icons from the `Oxygen
theme <https://en.wikipedia.org/wiki/Oxygen_Project>`__ (LGPL)

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/19.0/auditlog>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions auditlog/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
from . import wizards
25 changes: 25 additions & 0 deletions auditlog/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2015 ABF OSIELL <https://osiell.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Audit Log",
"version": "19.0.1.0.0",
"author": "ABF OSIELL, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-tools",
"category": "Tools",
"depends": ["base"],
"data": [
"security/res_groups.xml",
"security/ir.model.access.csv",
"data/ir_cron.xml",
"views/menu.xml",
"views/auditlog_http_request_views.xml",
"views/auditlog_http_session_views.xml",
"views/auditlog_log_line_views.xml",
"views/auditlog_log_views.xml",
"views/auditlog_rule_views.xml",
],
"application": True,
"installable": True,
}
12 changes: 12 additions & 0 deletions auditlog/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="ir_cron_auditlog_autovacuum" model="ir.cron">
<field name='name'>Auto-vacuum audit logs</field>
<field name='interval_number'>1</field>
<field name='interval_type'>days</field>
<field name="active" eval="False" />
<field name="code">model.autovacuum(180)</field>
<field name="state">code</field>
<field name="model_id" ref="model_auditlog_autovacuum" />
</record>
</odoo>
Loading