Skip to content

Commit

Permalink
[IMP] auditlog
Browse files Browse the repository at this point in the history
The test code for OCB has been updated, causing errors in the module,
so I will update the module to the latest version.
  • Loading branch information
nobuQuartile committed Dec 19, 2024
1 parent 3ad0058 commit 18bc888
Show file tree
Hide file tree
Showing 13 changed files with 164 additions and 173 deletions.
5 changes: 2 additions & 3 deletions auditlog/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Audit Log
=========

..
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a36a2948051d9d51bd2cbf4139b57cde8de52b573c9c641864d17f9c86d1c2c4
!! source digest: sha256:f28a63269e62794edbb3bcf4f78727dd623d0a973a1ac6055d88c7078668d842
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -109,7 +109,6 @@ Contributors
* Hardik Suthar <hsuthar@opensourceintegrators.com>
* Kitti U. <kittiu@ecosoft.co.th>
* Bogdan Valentin Gabor <valentin.gabor@bt-group.com>
* Dennis Sluijk <d.sluijk@onestein.nl>

Other credits
~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion auditlog/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Audit Log",
"version": "16.0.2.1.0",
"version": "16.0.2.2.2",
"author": "ABF OSIELL, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-tools",
Expand Down
46 changes: 23 additions & 23 deletions auditlog/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-26 01:45+0000\n"
"PO-Revision-Date: 2024-01-09 22:36+0000\n"
"PO-Revision-Date: 2024-04-17 14:36+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"Language: it\n"
Expand All @@ -33,54 +33,54 @@ msgstr "Audit"
#. module: auditlog
#: model:ir.model,name:auditlog.model_auditlog_autovacuum
msgid "Auditlog - Delete old logs"
msgstr "Log verifica - elimina vecchi log"
msgstr "Log autid - elimina vecchi log"

#. module: auditlog
#: model:ir.model,name:auditlog.model_auditlog_http_session
msgid "Auditlog - HTTP User session log"
msgstr "Log verifica - log sessione utente HTTP"
msgstr "Log audit - log sessione utente HTTP"

#. module: auditlog
#: model:ir.model,name:auditlog.model_auditlog_http_request
msgid "Auditlog - HTTP request log"
msgstr "Log verifica - log richiesta HTTP"
msgstr "Log audit - log richiesta HTTP"

#. module: auditlog
#: model:ir.model,name:auditlog.model_auditlog_log
msgid "Auditlog - Log"
msgstr "Log verifica - log"
msgstr "Log audit - log"

#. module: auditlog
#: model:ir.model,name:auditlog.model_auditlog_log_line
#: model:ir.model,name:auditlog.model_auditlog_log_line_view
msgid "Auditlog - Log details (fields updated)"
msgstr "Log verifica - dettagli log (campi aggiornati)"
msgstr "Log audit - dettagli log (campi aggiornati)"

#. module: auditlog
#: model:ir.model,name:auditlog.model_auditlog_rule
msgid "Auditlog - Rule"
msgstr "Log verifica - regola"
msgstr "Log audit - regola"

#. module: auditlog
#: model:res.groups,name:auditlog.group_auditlog_manager
msgid "Auditlog Manager"
msgstr "Responsabile log verifica"
msgstr "Responsabile log audit"

#. module: auditlog
#: model:ir.module.category,name:auditlog.security_auditlog_groups
msgid "Auditlog Rights"
msgstr "Autorizzazioni log verifica"
msgstr "Autorizzazioni log audit"

#. module: auditlog
#: model:res.groups,name:auditlog.group_auditlog_user
msgid "Auditlog User"
msgstr "Utente log verifica"
msgstr "Utente log audit"

#. module: auditlog
#: model:ir.actions.server,name:auditlog.ir_cron_auditlog_autovacuum_ir_actions_server
#: model:ir.cron,cron_name:auditlog.ir_cron_auditlog_autovacuum
msgid "Auto-vacuum audit logs"
msgstr "Svuota automaticamente log verifica"
msgstr "Svuota automaticamente log audit"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__capture_record
Expand Down Expand Up @@ -224,7 +224,7 @@ msgstr "Richiesta HTTP"
#: model_terms:ir.ui.view,arch_db:auditlog.view_auditlog_http_request_search
#: model_terms:ir.ui.view,arch_db:auditlog.view_auditlog_http_session_form
msgid "HTTP Requests"
msgstr "Richiesta HTTP"
msgstr "Richieste HTTP"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_autovacuum__id
Expand Down Expand Up @@ -336,7 +336,7 @@ msgstr "Modello"
#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log_line_view__model_model
msgid "Model Model"
msgstr "Model Model"
msgstr "Modello Model"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log__model_name
Expand Down Expand Up @@ -442,48 +442,48 @@ msgstr "Regole"
#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__model_id
msgid "Select model for which you want to generate log."
msgstr "Seleziona modello per il quale vuoi generare un log."
msgstr "Seleziona modello per il quale si vuole generare un log."

#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__capture_record
msgid "Select this if you want to keep track of Unlink Record"
msgstr "Seleziona se vuoi seguire \"scollega record\""
msgstr "Selezionare se si vuole tenere traccia di Unlink Record"

#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__log_create
msgid ""
"Select this if you want to keep track of creation on any record of the model "
"of this rule"
msgstr ""
"Seleziona se vuoi tenere traccia della creazione di qualsiasi record del "
"modello di questa regola"
"Selezionare se si vuole tenere traccia della creazione di qualsiasi record "
"del modello di questa regola"

#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__log_unlink
msgid ""
"Select this if you want to keep track of deletion on any record of the model "
"of this rule"
msgstr ""
"Seleziona se vuoi tenere traccia dell'eliminazione di qualsiasi record del "
"modello di questa regola"
"Selezionare se si vuole tenere traccia dell'eliminazione di qualsiasi record "
"del modello di questa regola"

#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__log_write
msgid ""
"Select this if you want to keep track of modification on any record of the "
"model of this rule"
msgstr ""
"Seleziona se vuoi tenere traccia della modifica di qualsiasi record del "
"modello di questa regola"
"Selezionare se si vuole tenere traccia della modifica di qualsiasi record "
"del modello di questa regola"

#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__log_read
msgid ""
"Select this if you want to keep track of read/open on any record of the "
"model of this rule"
msgstr ""
"Seleziona se vuoi tenere traccia della lettura/apertura di qualsiasi record "
"del modello di questa regola"
"Selezionare se si vuole tenere traccia della lettura/apertura di qualsiasi "
"record del modello di questa regola"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_http_request__http_session_id
Expand Down
47 changes: 24 additions & 23 deletions auditlog/i18n/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-06 03:40+0000\n"
"PO-Revision-Date: 2018-06-21 03:31+0000\n"
"Last-Translator: Rodrigo Macedo <rmsolucoeseminformatic4@gmail.com>\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
"teams/23907/pt_BR/)\n"
"PO-Revision-Date: 2024-06-11 18:35+0000\n"
"Last-Translator: Rodrigo Macedo <sottomaiormacedotec@users.noreply."
"translation.odoo-community.org>\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
"23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.0.1\n"
"X-Generator: Weblate 4.17\n"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__action_id
Expand Down Expand Up @@ -64,17 +65,17 @@ msgstr "Histórico de Auditoria - Regras"
#. module: auditlog
#: model:res.groups,name:auditlog.group_auditlog_manager
msgid "Auditlog Manager"
msgstr ""
msgstr "Gerenciador Auditlog"

#. module: auditlog
#: model:ir.module.category,name:auditlog.security_auditlog_groups
msgid "Auditlog Rights"
msgstr ""
msgstr "Direitos Auditlog"

#. module: auditlog
#: model:res.groups,name:auditlog.group_auditlog_user
msgid "Auditlog User"
msgstr ""
msgstr "Usuário Auditlog"

#. module: auditlog
#: model:ir.actions.server,name:auditlog.ir_cron_auditlog_autovacuum_ir_actions_server
Expand All @@ -85,7 +86,7 @@ msgstr "Registros de auditoria de vácuo automático"
#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__capture_record
msgid "Capture Record"
msgstr ""
msgstr "Registro de captura"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_http_request__user_context
Expand Down Expand Up @@ -161,12 +162,12 @@ msgstr "Campo"
#: code:addons/auditlog/models/rule.py:0
#, python-format
msgid "Field 'model_id' cannot be empty."
msgstr ""
msgstr "Campo 'model_id' não pode ser vazio."

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__fields_to_exclude_ids
msgid "Fields to Exclude"
msgstr ""
msgstr "Campos a serem excluídos"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log__line_ids
Expand Down Expand Up @@ -297,7 +298,7 @@ msgstr "Histórico Excluído"
#: model:ir.ui.menu,name:auditlog.menu_auditlog_line
#: model_terms:ir.ui.view,arch_db:auditlog.view_auditlog_line_search
msgid "Log Lines"
msgstr ""
msgstr "Linhas de Log"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__log_read
Expand Down Expand Up @@ -336,14 +337,14 @@ msgstr "Modelo"
#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log_line_view__model_model
msgid "Model Model"
msgstr ""
msgstr "Modelo Modelo"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log__model_name
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log_line_view__model_name
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__model_name
msgid "Model Name"
msgstr ""
msgstr "Nome Modelo"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_http_request__display_name
Expand All @@ -370,21 +371,21 @@ msgstr "Novo Valor de Texto"
#: code:addons/auditlog/models/log.py:0
#, python-format
msgid "No field defined to create line."
msgstr ""
msgstr "Nenhum campo definido para criar linha."

#. module: auditlog
#. odoo-python
#: code:addons/auditlog/models/rule.py:0
#, python-format
msgid "No model defined to create line."
msgstr ""
msgstr "Nenhum modelo definido para criar linha."

#. module: auditlog
#. odoo-python
#: code:addons/auditlog/models/log.py:0
#, python-format
msgid "No model defined to create log."
msgstr ""
msgstr "Nenhum modelo definido para criar log."

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log_line__old_value
Expand All @@ -407,7 +408,7 @@ msgstr "Caminho"
#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log_line_view__res_id
msgid "Res"
msgstr ""
msgstr "Recurso"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log__res_id
Expand Down Expand Up @@ -447,7 +448,7 @@ msgstr "Selecione o modelo para o qual você deseja gerar registro."
#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__capture_record
msgid "Select this if you want to keep track of Unlink Record"
msgstr ""
msgstr "Selecione esta opção se quiser acompanhar o registro de desvinculação"

#. module: auditlog
#: model:ir.model.fields,help:auditlog.field_auditlog_rule__log_create
Expand Down Expand Up @@ -518,7 +519,7 @@ msgstr "Inscrito"
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log__model_model
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__model_model
msgid "Technical Model Name"
msgstr ""
msgstr "Nome do modelo técnico"

#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_log_line__field_name
Expand All @@ -531,14 +532,14 @@ msgstr "Nome técnico"
#: code:addons/auditlog/models/log.py:0
#, python-format
msgid "The field 'field_id' cannot be empty."
msgstr ""
msgstr "O campo 'field_id' não pode ficar vazio."

#. module: auditlog
#. odoo-python
#: code:addons/auditlog/models/log.py:0
#, python-format
msgid "The field 'model_id' cannot be empty."
msgstr ""
msgstr "O campo 'field_id' não pode ficar vazio."

#. module: auditlog
#: model:ir.model.constraint,message:auditlog.constraint_auditlog_rule_model_uniq
Expand Down Expand Up @@ -596,7 +597,7 @@ msgstr "Usuários"
#. module: auditlog
#: model:ir.model.fields,field_description:auditlog.field_auditlog_rule__users_to_exclude_ids
msgid "Users to Exclude"
msgstr ""
msgstr "Usuários a serem excluídos"

#. module: auditlog
#: model_terms:ir.ui.view,arch_db:auditlog.view_auditlog_log_form
Expand Down
11 changes: 0 additions & 11 deletions auditlog/models/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools.safe_eval import safe_eval


class AuditlogLog(models.Model):
Expand All @@ -17,7 +16,6 @@ class AuditlogLog(models.Model):
model_name = fields.Char(readonly=True)
model_model = fields.Char(string="Technical Model Name", readonly=True)
res_id = fields.Integer("Resource ID")
res_ids = fields.Char("Resource IDs")
user_id = fields.Many2one("res.users", string="User")
method = fields.Char(size=64)
line_ids = fields.One2many("auditlog.log.line", "log_id", string="Fields updated")
Expand Down Expand Up @@ -51,15 +49,6 @@ def write(self, vals):
vals.update({"model_name": model.name, "model_model": model.model})
return super().write(vals)

def show_res_ids(self):
self.ensure_one()
return {
"type": "ir.actions.act_window",
"view_mode": "tree,form",
"res_model": self.model_id.model,
"domain": [("id", "in", safe_eval(self.res_ids))],
}


class AuditlogLogLine(models.Model):
_name = "auditlog.log.line"
Expand Down
Loading

0 comments on commit 18bc888

Please sign in to comment.