[MIG] auditlog: Migration to 14.0

pull/2268/head
Jesús Alan Ramos Rodríguez 2020-10-29 10:33:10 -06:00 committed by BT-vgabor
parent 20075056d9
commit 46de099fae
6 changed files with 23 additions and 18 deletions

View File

@ -14,13 +14,13 @@ Audit Log
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3 :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/13.0/auditlog :target: https://github.com/OCA/server-tools/tree/14.0/auditlog
:alt: OCA/server-tools :alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-13-0/server-tools-13-0-auditlog :target: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-auditlog
:alt: Translate me on Weblate :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/149/13.0 :target: https://runbot.odoo-community.org/runbot/149/14.0
:alt: Try me on Runbot :alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5| |badge1| |badge2| |badge3| |badge4| |badge5|
@ -39,16 +39,16 @@ Usage
Go to `Settings / Technical / Audit / Rules` to subscribe rules. A rule defines Go to `Settings / Technical / Audit / Rules` to subscribe rules. A rule defines
which operations to log for a given data model. which operations to log for a given data model.
.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/rule.png .. image:: https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/rule.png
Then, check logs in the `Settings / Technical / Audit / Logs` menu. You can Then, check logs in the `Settings / Technical / Audit / Logs` menu. You can
group them by user sessions, date, data model or HTTP requests: group them by user sessions, date, data model or HTTP requests:
.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/logs.png .. image:: https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/logs.png
Get the details: Get the details:
.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/log.png .. image:: https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/log.png
A scheduled action exists to delete logs older than 6 months (180 days) A scheduled action exists to delete logs older than 6 months (180 days)
automatically but is not enabled by default. automatically but is not enabled by default.
@ -56,7 +56,7 @@ To activate it and/or change the delay, go to the
`Configuration / Technical / Automation / Scheduled Actions` menu and edit the `Configuration / Technical / Automation / Scheduled Actions` menu and edit the
`Auto-vacuum audit logs` entry: `Auto-vacuum audit logs` entry:
.. image:: https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/autovacuum.png .. image:: https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/autovacuum.png
Known issues / Roadmap Known issues / Roadmap
====================== ======================
@ -70,7 +70,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/issues>`_. 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. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. `feedback <https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2014.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. Do not contact contributors directly about support or help with technical issues.
@ -89,6 +89,7 @@ Contributors
* Holger Brunn <hbrunn@therp.nl> * Holger Brunn <hbrunn@therp.nl>
* Holden Rehg <holdenrehg@gmail.com> * Holden Rehg <holdenrehg@gmail.com>
* Eric Lembregts <eric@lembregts.eu> * Eric Lembregts <eric@lembregts.eu>
* Alan Ramos <alan.ramos@jarsa.com.mx>
Other credits Other credits
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
@ -108,6 +109,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/13.0/auditlog>`_ project on GitHub. This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/14.0/auditlog>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@ -3,10 +3,10 @@
{ {
"name": "Audit Log", "name": "Audit Log",
"version": "13.0.1.0.1", "version": "14.0.1.0.0",
"author": "ABF OSIELL,Odoo Community Association (OCA)", "author": "ABF OSIELL,Odoo Community Association (OCA)",
"license": "AGPL-3", "license": "AGPL-3",
"website": "https://github.com/OCA/server-tools/", "website": "https://github.com/OCA/server-tools",
"category": "Tools", "category": "Tools",
"depends": ["base"], "depends": ["base"],
"data": [ "data": [

View File

@ -57,6 +57,7 @@ class AuditlogRule(models.Model):
required=True, required=True,
help="Select model for which you want to generate log.", help="Select model for which you want to generate log.",
states={"subscribed": [("readonly", True)]}, states={"subscribed": [("readonly", True)]},
ondelete="cascade",
) )
user_ids = fields.Many2many( user_ids = fields.Many2many(
"res.users", "res.users",

View File

@ -2,3 +2,4 @@
* Holger Brunn <hbrunn@therp.nl> * Holger Brunn <hbrunn@therp.nl>
* Holden Rehg <holdenrehg@gmail.com> * Holden Rehg <holdenrehg@gmail.com>
* Eric Lembregts <eric@lembregts.eu> * Eric Lembregts <eric@lembregts.eu>
* Alan Ramos <alan.ramos@jarsa.com.mx>

View File

@ -10,3 +10,4 @@ access_auditlog_log_manager,auditlog_log_manager,model_auditlog_log,base.group_e
access_auditlog_log_line_manager,auditlog_log_line_manager,model_auditlog_log_line,base.group_erp_manager,1,1,1,1 access_auditlog_log_line_manager,auditlog_log_line_manager,model_auditlog_log_line,base.group_erp_manager,1,1,1,1
access_auditlog_http_session_manager,auditlog_http_session_manager,model_auditlog_http_session,base.group_erp_manager,1,1,1,1 access_auditlog_http_session_manager,auditlog_http_session_manager,model_auditlog_http_session,base.group_erp_manager,1,1,1,1
access_auditlog_http_request_manager,auditlog_http_request_manager,model_auditlog_http_request,base.group_erp_manager,1,1,1,1 access_auditlog_http_request_manager,auditlog_http_request_manager,model_auditlog_http_request,base.group_erp_manager,1,1,1,1
access_auditlog_autovacuum,access_auditlog_autovacuum,model_auditlog_autovacuum,base.group_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
10 access_auditlog_http_session_manager auditlog_http_session_manager model_auditlog_http_session base.group_erp_manager 1 1 1 1
11 access_auditlog_http_request_manager auditlog_http_request_manager model_auditlog_http_request base.group_erp_manager 1 1 1 1
12 access_auditlog_autovacuum access_auditlog_autovacuum model_auditlog_autovacuum base.group_user 1 1 1 1
13

View File

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !! !! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !! !! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/server-tools/tree/13.0/auditlog"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-13-0/server-tools-13-0-auditlog"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/149/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/server-tools/tree/14.0/auditlog"><img alt="OCA/server-tools" src="https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-auditlog"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/149/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module allows the administrator to log user operations performed on data <p>This module allows the administrator to log user operations performed on data
models such as <tt class="docutils literal">create</tt>, <tt class="docutils literal">read</tt>, <tt class="docutils literal">write</tt> and <tt class="docutils literal">delete</tt>.</p> models such as <tt class="docutils literal">create</tt>, <tt class="docutils literal">read</tt>, <tt class="docutils literal">write</tt> and <tt class="docutils literal">delete</tt>.</p>
<p><strong>Table of contents</strong></p> <p><strong>Table of contents</strong></p>
@ -389,18 +389,18 @@ models such as <tt class="docutils literal">create</tt>, <tt class="docutils lit
<h1><a class="toc-backref" href="#id1">Usage</a></h1> <h1><a class="toc-backref" href="#id1">Usage</a></h1>
<p>Go to <cite>Settings / Technical / Audit / Rules</cite> to subscribe rules. A rule defines <p>Go to <cite>Settings / Technical / Audit / Rules</cite> to subscribe rules. A rule defines
which operations to log for a given data model.</p> which operations to log for a given data model.</p>
<img alt="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/rule.png" src="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/rule.png" /> <img alt="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/rule.png" src="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/rule.png" />
<p>Then, check logs in the <cite>Settings / Technical / Audit / Logs</cite> menu. You can <p>Then, check logs in the <cite>Settings / Technical / Audit / Logs</cite> menu. You can
group them by user sessions, date, data model or HTTP requests:</p> group them by user sessions, date, data model or HTTP requests:</p>
<img alt="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/logs.png" src="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/logs.png" /> <img alt="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/logs.png" src="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/logs.png" />
<p>Get the details:</p> <p>Get the details:</p>
<img alt="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/log.png" src="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/log.png" /> <img alt="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/log.png" src="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/log.png" />
<p>A scheduled action exists to delete logs older than 6 months (180 days) <p>A scheduled action exists to delete logs older than 6 months (180 days)
automatically but is not enabled by default. automatically but is not enabled by default.
To activate it and/or change the delay, go to the To activate it and/or change the delay, go to the
<cite>Configuration / Technical / Automation / Scheduled Actions</cite> menu and edit the <cite>Configuration / Technical / Automation / Scheduled Actions</cite> menu and edit the
<cite>Auto-vacuum audit logs</cite> entry:</p> <cite>Auto-vacuum audit logs</cite> entry:</p>
<img alt="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/autovacuum.png" src="https://raw.githubusercontent.com/OCA/server-tools/13.0/auditlog/static/description/autovacuum.png" /> <img alt="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/autovacuum.png" src="https://raw.githubusercontent.com/OCA/server-tools/14.0/auditlog/static/description/autovacuum.png" />
</div> </div>
<div class="section" id="known-issues-roadmap"> <div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1> <h1><a class="toc-backref" href="#id2">Known issues / Roadmap</a></h1>
@ -416,7 +416,7 @@ To activate it and/or change the delay, go to the
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>. <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported. In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <a class="reference external" href="https://github.com/OCA/server-tools/issues/new?body=module:%20auditlog%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p> <p>Do not contact contributors directly about support or help with technical issues.</p>
</div> </div>
<div class="section" id="credits"> <div class="section" id="credits">
@ -434,6 +434,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Holger Brunn &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li> <li>Holger Brunn &lt;<a class="reference external" href="mailto:hbrunn&#64;therp.nl">hbrunn&#64;therp.nl</a>&gt;</li>
<li>Holden Rehg &lt;<a class="reference external" href="mailto:holdenrehg&#64;gmail.com">holdenrehg&#64;gmail.com</a>&gt;</li> <li>Holden Rehg &lt;<a class="reference external" href="mailto:holdenrehg&#64;gmail.com">holdenrehg&#64;gmail.com</a>&gt;</li>
<li>Eric Lembregts &lt;<a class="reference external" href="mailto:eric&#64;lembregts.eu">eric&#64;lembregts.eu</a>&gt;</li> <li>Eric Lembregts &lt;<a class="reference external" href="mailto:eric&#64;lembregts.eu">eric&#64;lembregts.eu</a>&gt;</li>
<li>Alan Ramos &lt;<a class="reference external" href="mailto:alan.ramos&#64;jarsa.com.mx">alan.ramos&#64;jarsa.com.mx</a>&gt;</li>
</ul> </ul>
</div> </div>
<div class="section" id="other-credits"> <div class="section" id="other-credits">
@ -449,7 +450,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use.</p> promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/13.0/auditlog">OCA/server-tools</a> project on GitHub.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-tools/tree/14.0/auditlog">OCA/server-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div> </div>
</div> </div>