Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] auditlog: Migration to 18.0 #3054

Open
wants to merge 175 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
079e078
[ADD] Module 'auditlog' - A substitute to the deprecated 'audittrail'…
sebalix Jan 21, 2015
0a00d28
[FIX] Module 'auditlog' - Fix some flake8 errors
sebalix Jan 22, 2015
ffb5f50
[FIX] Module 'auditlog' - Put the module description in a README.rst …
sebalix Jan 22, 2015
6e6fc27
[ADD] Module 'auditlog' - 'auditlog.pot' file added
sebalix Jan 22, 2015
b86be5a
[IMP] Module 'auditlog' - Split the 'create_logs()' method in several…
sebalix Jan 22, 2015
2573408
[IMP] Module 'auditlog' - Clean up vim lines
sebalix Jan 22, 2015
4c2ee3d
[IMP] Module 'auditlog' - Add 'name' attributes on some filters and o…
sebalix Jan 22, 2015
d0ac6c1
[IMP] Module 'auditlog' - Removed the 'timestamp' field from the 'aud…
sebalix Jan 28, 2015
c57e9e0
[IMP] Module 'auditlog' - README.rst updated (based on the OCA template)
sebalix Jan 28, 2015
7fefe6b
[FIX] Module 'auditlog' - 'time' module imported but unused
sebalix Jan 28, 2015
3e932d0
[IMP] ignore rules for nonexisting objects
hbrunn Jan 28, 2015
8569bb3
[ADD] init hook to migrate from audittrail
hbrunn Jan 28, 2015
f9bf569
[FIX] also migrate id sequences
hbrunn Jan 28, 2015
524b134
[IMP] Module 'auditlog' - Contributors updated in README.rst + AUTHOR…
sebalix Jan 28, 2015
62a69ce
[ADD] change xmlids of legacy rules to point to auditlog.rule
hbrunn Jan 28, 2015
50a3ea5
[IMP] use new import of _, SUPERUSER_ID
hbrunn Jan 29, 2015
3a22ac7
[ADD] allow overriding modules to pass additional log values
hbrunn Jan 29, 2015
ea79483
[IMP] cache model and field ids
hbrunn Jan 29, 2015
17b2354
[IMP] don't make a temporary copy of dict keys
hbrunn Jan 29, 2015
fdf8546
[FIX] don't reset caches in register_hook
hbrunn Jan 29, 2015
8009cb5
[ADD] pass old_values to create_log when deleting a record
hbrunn Jan 29, 2015
eb6f196
[FIX] cope with no additional log values
hbrunn Jan 29, 2015
46840d5
[ADD] tests
hbrunn Jan 29, 2015
a7db74e
[FIX] Module 'auditlog' - local variable 'ir_model' is assigned to bu…
sebalix Jan 30, 2015
aae3faa
[IMP] use a model for test that is not influenced by the mail module
hbrunn Feb 1, 2015
9fde986
[FIX] Module 'auditlog' - Remove 'active' field from __openerp__.py
sebalix Feb 2, 2015
384f397
[IMP] Module 'auditlog' - README.rst updated (inform that the audittr…
sebalix Feb 2, 2015
1342513
[IMP] Module 'auditlog' - Useless lines of code removed
sebalix Feb 2, 2015
9314a55
[IMP] Module 'auditlog' - Autoremove 'auditlog.log.line' records when…
sebalix Feb 4, 2015
64bb022
[IMP] Module 'auditlog' - Model 'auditlog.log.line', 'field_name' and…
sebalix Feb 4, 2015
5674ff5
[IMP] Module 'auditlog' - Added a second test using cached data gener…
sebalix Feb 4, 2015
916892f
[FIX] Module 'auditlog' - Data dictionaries of fields and models are …
sebalix Feb 4, 2015
3d4a81a
[IMP] Module 'auditlog' - Add a test regarding a resource deleted thr…
sebalix Feb 9, 2015
d147999
[FIX] Module 'auditlog' - When updating a resource, filter IDs on 2ma…
sebalix Feb 9, 2015
db1cb70
[ADD] migration script
hbrunn Feb 16, 2015
7cd2976
Add OCA as author of OCA addons
gurneyalex Mar 2, 2015
6733512
[IMP] Module 'auditlog' - Performing logs on 'read' operations + Some…
sebalix Apr 1, 2015
96abc86
[FIX] Module 'auditlog' - Replace 'try/except statement by 'isinstanc…
sebalix Apr 2, 2015
d4d427b
[FIX] Module 'auditlog' - Support 'read' calls with one ID or a list …
sebalix Apr 2, 2015
cea7f83
[FIX] Module 'auditlog' - Unit tests, do not create users with the 'n…
sebalix Apr 8, 2015
d302cdd
[ADD] German translation for auditlog
eqms Apr 19, 2015
65538b3
[FIX] Module 'auditlog' - No log for internal processing (e.g. 'read'…
sebalix Apr 19, 2015
25bf855
[FIX] Module 'auditlog' - Fix lint check
sebalix Apr 19, 2015
7055b01
[IMP] Module 'auditlog' - Unsubscribe rules before removing them + Un…
sebalix Apr 19, 2015
b079a0b
[FIX] Module 'auditlog' - Log fields coming from polymorphic inherita…
sebalix Apr 19, 2015
a6960b4
[IMP] Module 'auditlog' - Remove the unit test causing trouble with T…
sebalix Apr 21, 2015
cc7377f
[ADD] auditlog: Added Spanish translation.
May 17, 2015
73851fe
Add bug tracker link on README.rst
yvaucher May 22, 2015
9947033
[FIX] ie related fields don't have an
hbrunn Jun 11, 2015
eadf9ae
[ADD] comment
hbrunn Jul 8, 2015
bef16a9
[FIX] make patched create downgrade correctly to v6.1
hbrunn Jul 17, 2015
958c155
Add missing default oca icons
yvaucher Aug 18, 2015
8bb4028
[FIX] if someone else has overridden our patched,
hbrunn Sep 16, 2015
5c810eb
OCA Transbot updated translations from Transifex
oca-transbot Oct 5, 2015
2fe3ed3
[UPD] prefix versions with 8.0
sbidoul Oct 9, 2015
b734a3e
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
12d350e
[FIX] remove en.po that was erroneously created by transbot
sbidoul Aug 15, 2016
d5743e5
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
f83a81c
Module 'auditlog' - Log HTTP user sessions and requests
sebalix Oct 30, 2015
5fb8e27
Module 'auditlog' - Bump the version to 1.1.0
sebalix Oct 30, 2015
c0568bb
Module 'auditlog' - Cleanup XML views (types removed)
sebalix Oct 30, 2015
d6e2ceb
Module 'auditlog' - A log can be created with no current HTTP request…
sebalix Oct 30, 2015
9b9ee66
Module 'auditlog' - 'display_name' fields added for the user session …
sebalix Oct 31, 2015
f015cc6
Module 'auditlog' - Fix pylint check
sebalix Oct 31, 2015
27e517b
turn off prefetching when reding values
hbrunn Nov 26, 2015
0886a34
auditlog - Ability to choose the log type on the rule: Full log (comp…
sebalix Feb 1, 2016
9681293
auditlog - Field 'type' renamed to 'log_type'
sebalix Feb 13, 2016
6594f99
auditlog - Bump version number
sebalix Feb 13, 2016
94edbcd
auditlog - Auto-vacuum logs, HTTP requests and HTTP user sessions
sebalix Feb 13, 2016
a4aa4df
auditlog - Icon added + README updated (screenshots)
sebalix May 26, 2016
660803f
singleton error if we saved the current session two times (#473)
hbrunn Jul 4, 2016
edd34b3
Migrate auditlog module from 8.0 to 9.0
holdenrehg Jun 6, 2016
88c41cd
Updated the __openerp__.xml to include the license and images fields
holdenrehg Jun 13, 2016
14ee5c9
auditlog module, Remove duplicate license key from openerp config
holdenrehg Jun 24, 2016
ac3b9e6
auditlog: Remove migration from audittrail functionality, this is not…
holdenrehg Jun 27, 2016
c0421e0
auditlog: Remove pre_init_hook reference from openerp, no pre_init ho…
holdenrehg Jun 27, 2016
ce75a5a
auditlog - Lint
sebalix Nov 14, 2016
7b08229
auditlog - Migrate 'AuditlogRule.create' and 'AuditlogRule.write' met…
sebalix Nov 14, 2016
7067997
[MIG] auditlog: Migrated to 10.0
Jan 20, 2017
e1c84af
[FIX] Request id no longer exists after concurrency rollback
StefanRijnhart Jan 16, 2017
580cc8e
[FIX] auditlog: Duplicate logging
obulkin Feb 16, 2017
7233848
OCA Transbot updated translations from Transifex
oca-transbot Oct 26, 2015
e1fe67a
[MIG] auditlog: Migration to 11.0
etobella Nov 3, 2017
14b4f43
[add] https
rgarnau Nov 14, 2017
4ee1deb
OCA Transbot updated translations from Transifex
oca-transbot Dec 9, 2017
6565b22
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
e23bde0
[UPD] Update auditlog.pot
oca-travis Jun 17, 2018
a6d7d5e
Translated using Weblate
Jun 20, 2018
8119323
[MIG] auditlog: Migration to 12.0
sebalix Apr 9, 2019
1bbb22b
[UPD] README.rst
OCA-git-bot Apr 10, 2019
591d22c
Translated using Weblate (Chinese (Simplified))
liweijie0812 Aug 30, 2019
9250823
[MIG] auditlog: Migration to 13.0
lembregtse Oct 1, 2019
c79d050
[IMP] auditlog: black, isort, prettier
rven Nov 8, 2019
2b63574
[FIX] auditlog: log computed fields stored in db as expected
sebalix Oct 1, 2019
497e356
[FIX] auditlog: add support for create multi
sebalix Oct 1, 2019
bc12052
[UPD] Update auditlog.pot
oca-travis Mar 25, 2020
df35fc5
[UPD] README.rst
OCA-git-bot Mar 25, 2020
8d4dc5b
Update translation files
oca-transbot Mar 29, 2020
de27dcd
[FIX] Readme Images relative path
emagdalenaC2i Jul 10, 2020
fa1c5c7
[UPD] README.rst
OCA-git-bot Jul 13, 2020
cef7735
auditlog 13.0.1.0.1
OCA-git-bot Jul 13, 2020
8876c25
[IMP] auditlog: black, isort, prettier
alan196 Oct 29, 2020
0950db3
[MIG] auditlog: Migration to 14.0
alan196 Oct 29, 2020
cc883c8
[UPD] Update auditlog.pot
oca-travis Dec 4, 2020
b4eaad6
[IMP] Dont query non-stored related or computed fields on full auditl…
thomaspaulb Dec 14, 2020
b6b70fe
[UPD] README.rst
OCA-git-bot Jan 25, 2021
a8e60ff
auditlog 14.0.1.0.1
OCA-git-bot Jan 25, 2021
ea940f2
[14.0][FIX] Add sudo() to retrieve record vals
Feb 1, 2021
977c176
auditlog 14.0.1.0.2
OCA-git-bot Feb 11, 2021
ca42bef
[IMP] auditlog: prevent cascading delete of logs when models or field…
Mar 24, 2021
5fce5bf
[UPD] Update auditlog.pot
oca-travis Apr 30, 2021
9748f84
[UPD] README.rst
OCA-git-bot Apr 30, 2021
f8eb66c
Update translation files
oca-transbot Apr 30, 2021
8f31a10
[FIX] auditlog: invalid XML
StefanRijnhart May 18, 2021
83dd1bb
auditlog 14.0.1.1.1
OCA-git-bot May 19, 2021
f719ae9
[ADD] auditlog: enable to track Unlink record
Jun 22, 2021
844f309
[ADD] auditlog: test case for capture record
Jun 22, 2021
32266f5
[UPD] Update auditlog.pot
oca-travis Jun 25, 2021
003befa
[UPD] README.rst
OCA-git-bot Jun 25, 2021
3ca3e0c
Update translation files
oca-transbot Jun 25, 2021
2a4b873
[14.0][IMP] auditlog, add auditlog.log.line view
kittiu Aug 19, 2021
7807a8d
[UPD] Update auditlog.pot
oca-travis Aug 31, 2021
007797d
[UPD] README.rst
OCA-git-bot Aug 31, 2021
7330778
auditlog 14.0.1.2.0
OCA-git-bot Aug 31, 2021
94edb97
Update translation files
oca-transbot Aug 31, 2021
7fe3089
[IMP] auditlog: black, isort, prettier
Jan 31, 2022
9d66387
[MIG] auditlog: Migration to 15.0
Jan 31, 2022
f01b758
[UPD] Update auditlog.pot
Mar 18, 2022
c28b54e
[UPD] README.rst
OCA-git-bot Mar 18, 2022
4a366b4
Translated using Weblate (Spanish (Argentina))
ibuioli Mar 20, 2022
20656ce
Add option to Eliminate user and fields in audit logs
atchuthan Mar 22, 2022
a06a78b
[UPD] Update auditlog.pot
Sep 27, 2022
25b70c2
auditlog 15.0.1.1.0
OCA-git-bot Sep 27, 2022
7e0b665
Update translation files
oca-transbot Sep 27, 2022
fb7459a
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 29, 2022
ee17b51
[FIX] auditlog: autovacuum performance
gurneyalex Oct 31, 2022
beb2083
auditlog 15.0.1.1.1
OCA-git-bot Nov 2, 2022
311a2ed
[MIG] auditlog: Migration to 16.0
StefanRijnhart Nov 18, 2022
c49b8f3
[IMP] auditlog: dedicated security groups for model access
BertVGroenendael Nov 18, 2022
4319da3
[UPD] Update auditlog.pot
Dec 22, 2022
0eaf9a3
[UPD] README.rst
OCA-git-bot Dec 22, 2022
7ddde27
Update translation files
weblate Dec 22, 2022
1406e7a
Translated using Weblate (Spanish (Argentina))
ibuioli Dec 24, 2022
02c1cfa
[IMP] auditlog: make the line views using a non auto model
etobella Dec 21, 2022
35dddba
[UPD] Update auditlog.pot
Dec 28, 2022
76c0077
auditlog 16.0.2.0.0
OCA-git-bot Dec 28, 2022
87a2032
Update translation files
weblate Dec 28, 2022
039a127
Translated using Weblate (Spanish (Argentina))
ibuioli Jan 1, 2023
4d66d45
[FIX] auditlog: Allow passing a chunk size for autovacuum
hbrunn May 10, 2022
00a98a8
[UPD] README.rst
OCA-git-bot Jan 21, 2023
2d1337a
auditlog 16.0.2.0.1
OCA-git-bot Jan 21, 2023
9910a46
Translated using Weblate (Italian)
mymage Mar 23, 2023
4522da1
Translated using Weblate (Slovenian)
sysadminmatmoz Mar 31, 2023
63d555c
Translated using Weblate (Italian)
mymage Jun 7, 2023
a67c9a3
Translated using Weblate (Spanish)
Ivorra78 Aug 25, 2023
fa3cce3
[UPD] README.rst
OCA-git-bot Sep 3, 2023
c29c513
FIX: auditlog consistency with Many2one fields
SilvioC2C Dec 2, 2022
b79a340
auditlog 16.0.2.0.2
OCA-git-bot Sep 11, 2023
045e1fd
[UPD] README.rst
OCA-git-bot Sep 11, 2023
3ac27ac
Update translation files
weblate Oct 10, 2023
823e214
Translated using Weblate (Italian)
mymage Oct 23, 2023
63b6ba7
[FIX] auditlog: prevent removal of x2many values from inaccessible co…
StefanRijnhart Jan 19, 2024
77c779f
[16.0][FIX] auditlog: Add/Remove User Group
BT-anieto Feb 8, 2024
4128e2b
[IMP] auditlog: pre-commit stuff
rven Nov 14, 2023
e85c981
[MIG] auditlog: Migration to 17.0
rven Feb 5, 2024
9a4c924
[UPD] Update auditlog.pot
Apr 12, 2024
e7092ab
[BOT] post-merge updates
OCA-git-bot Apr 12, 2024
2fed1b6
Update translation files
weblate Apr 12, 2024
d6f8522
Translated using Weblate (Italian)
mymage Apr 17, 2024
e4d01e5
Translated using Weblate (Spanish)
Ivorra78 Apr 23, 2024
1eb2a2b
Translated using Weblate (Swedish)
jakobkrabbe Jun 12, 2024
74be94e
Translated using Weblate (Chinese (Simplified) (zh_CN))
xtanuiha Jun 16, 2024
9a77e2c
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 16, 2024
7be132b
[IMP] auditlog: pre-commit stuff
lembregtse Oct 8, 2024
0ace2ec
[MIG] auditlog: Migration to 18.0
lembregtse Oct 8, 2024
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
140 changes: 140 additions & 0 deletions auditlog/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
=========
Audit Log
=========

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

.. |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/licence-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/18.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-18-0/server-tools-18-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=18.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 subscribe rules. A rule
defines which operations to log for a given data model.

|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)
automatically 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 possible groups configured to which one may belong. The
first is the Auditlog User group. This group has read-only access to the
auditlogs of individual records through the View Logs action. The second
group is the Auditlog Manager group. This group additionally has the
right to configure the auditlog configuration rules.

.. |image| image:: https://raw.githubusercontent.com/OCA/server-tools/18.0/auditlog/static/description/rule.png
.. |image1| image:: https://raw.githubusercontent.com/OCA/server-tools/18.0/auditlog/static/description/logs.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/server-tools/18.0/auditlog/static/description/log.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/server-tools/18.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:%2018.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]>

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/18.0/auditlog>`_ project on GitHub.

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

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

{
"name": "Audit Log",
"version": "18.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/auditlog_view.xml",
"views/http_session_view.xml",
"views/http_request_view.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
Loading