mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
103
base_user_role_history/README.rst
Normal file
103
base_user_role_history/README.rst
Normal file
@@ -0,0 +1,103 @@
|
||||
======================
|
||||
Base User Role History
|
||||
======================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:db5f768a177dfcc1ad17e65d53bedeeac1d7d840e0d009dba5338d27478a0382
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |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--backend-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/server-backend/tree/17.0/base_user_role_history
|
||||
:alt: OCA/server-backend
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/server-backend-17-0/server-backend-17-0-base_user_role_history
|
||||
: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-backend&target_branch=17.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This addon provides history for roles modifications on users. Each time
|
||||
a role is added/updated/unlinked on a user, a new role history line is
|
||||
created mentioning what changes were made and who made them. Theses
|
||||
informations are directly accessible from users via a smart button.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
:local:
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Changes on user roles are easily accessible via a button on user form
|
||||
view.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
Since roles on role history line have 'cascade' ondelete, role deletion
|
||||
leads to role history line deletion. In order to keep history even in
|
||||
the case of a role deletion, module could be upgraded.
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-backend/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-backend/issues/new?body=module:%20base_user_role_history%0Aversion:%2017.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
|
||||
-------
|
||||
|
||||
* ACSONE SA/NV
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
- Benoit Aimont <benoit.aimont@acsone.eu> (https://acsone.eu)
|
||||
- Thomas Binsfeld <thomas.binsfeld@acsone.eu> (https://acsone.eu)
|
||||
- Christopher Rogos <crogos@gmail.com> (https://glueckkanja.com)
|
||||
- Mohamed Osman <mohamed.osman3@yahoo.com> (https://glueckkanja.com)
|
||||
|
||||
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.
|
||||
|
||||
.. |maintainer-ThomasBinsfeld| image:: https://github.com/ThomasBinsfeld.png?size=40px
|
||||
:target: https://github.com/ThomasBinsfeld
|
||||
:alt: ThomasBinsfeld
|
||||
|
||||
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|
||||
|
||||
|maintainer-ThomasBinsfeld|
|
||||
|
||||
This module is part of the `OCA/server-backend <https://github.com/OCA/server-backend/tree/17.0/base_user_role_history>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
1
base_user_role_history/__init__.py
Normal file
1
base_user_role_history/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
25
base_user_role_history/__manifest__.py
Normal file
25
base_user_role_history/__manifest__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# Copyright 2019 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "Base User Role History",
|
||||
"summary": """
|
||||
This module allows to track the changes on users roles.""",
|
||||
"version": "17.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "ACSONE SA/NV, " "Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/server-backend",
|
||||
"depends": [
|
||||
# Odoo
|
||||
"mail",
|
||||
# OCA
|
||||
"base_user_role",
|
||||
],
|
||||
"data": [
|
||||
"security/base_user_role_line_history.xml",
|
||||
"views/base_user_role_line_history.xml",
|
||||
"views/res_users.xml",
|
||||
],
|
||||
"development_status": "Beta",
|
||||
"maintainers": ["ThomasBinsfeld"],
|
||||
}
|
||||
163
base_user_role_history/i18n/base_user_role_history.pot
Normal file
163
base_user_role_history/i18n/base_user_role_history.pot
Normal file
@@ -0,0 +1,163 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_user_role_history
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
msgid "<span class=\"o_stat_text\">Last update of roles</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__performed_action
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Action"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_is_enabled
|
||||
msgid "Active after edit"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_is_enabled
|
||||
msgid "Active before edit"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__add
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_uid
|
||||
msgid "Created by"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_date
|
||||
msgid "Created on"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Date and time of edition"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__unlink
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__display_name
|
||||
msgid "Display Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__edit
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
msgid "Edited user"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Editor"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Group By"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_base_user_role_line_history
|
||||
msgid "History of user roles"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__id
|
||||
msgid "ID"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_res_users__last_role_line_modification
|
||||
msgid "Last roles modification"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_to
|
||||
msgid "New end date"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "New role"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_from
|
||||
msgid "New start date"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_to
|
||||
msgid "Old end date"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Old role"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_from
|
||||
msgid "Old start date"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#. odoo-python
|
||||
#: code:addons/base_user_role_history/models/res_users.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
#, python-format
|
||||
msgid "Roles history"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_res_users
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__user_id
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
169
base_user_role_history/i18n/es.po
Normal file
169
base_user_role_history/i18n/es.po
Normal file
@@ -0,0 +1,169 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_user_role_history
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2021-03-16 18:45+0000\n"
|
||||
"Last-Translator: Ana Suárez <ana.suarez@qubiq.es>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: es\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 4.3.2\n"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
msgid "<span class=\"o_stat_text\">Last update of roles</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Última actualización de roles</span>"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__performed_action
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Action"
|
||||
msgstr "Acción"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_is_enabled
|
||||
msgid "Active after edit"
|
||||
msgstr "Activo después de editar"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_is_enabled
|
||||
msgid "Active before edit"
|
||||
msgstr "Activo antes de editar"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__add
|
||||
msgid "Add"
|
||||
msgstr "Añadir"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Creado por"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Creado el"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Date and time of edition"
|
||||
msgstr "Fecha y hora de edición"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__unlink
|
||||
msgid "Delete"
|
||||
msgstr "Eliminar"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nombre mostrado"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__edit
|
||||
msgid "Edit"
|
||||
msgstr "Editar"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
msgid "Edited user"
|
||||
msgstr "Usuario editado"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Editor"
|
||||
msgstr "Editor"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Group By"
|
||||
msgstr "Agrupar por"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_base_user_role_line_history
|
||||
msgid "History of user roles"
|
||||
msgstr "Historial de roles"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Última modificación el"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Última actualización por"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Última actualización el"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_res_users__last_role_line_modification
|
||||
msgid "Last roles modification"
|
||||
msgstr "Última modificación roles"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_to
|
||||
msgid "New end date"
|
||||
msgstr "Nueva fecha fin"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "New role"
|
||||
msgstr "Nuevo rol"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_from
|
||||
msgid "New start date"
|
||||
msgstr "Nueva fecha inicio"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_to
|
||||
msgid "Old end date"
|
||||
msgstr "Antigua fecha fin"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Old role"
|
||||
msgstr "Antiguo rol"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_from
|
||||
msgid "Old start date"
|
||||
msgstr "Antigua fecha inicio"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#. odoo-python
|
||||
#: code:addons/base_user_role_history/models/res_users.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
#, python-format
|
||||
msgid "Roles history"
|
||||
msgstr "Historial Roles"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_res_users
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__user_id
|
||||
msgid "User"
|
||||
msgstr "Usuario"
|
||||
|
||||
#~ msgid "Users"
|
||||
#~ msgstr "Usuarios"
|
||||
169
base_user_role_history/i18n/fr.po
Normal file
169
base_user_role_history/i18n/fr.po
Normal file
@@ -0,0 +1,169 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_user_role_history
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-18 11:07+0000\n"
|
||||
"PO-Revision-Date: 2019-09-30 11:51+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
msgid "<span class=\"o_stat_text\">Last update of roles</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Dernière modification des rôles</span>"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__performed_action
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Action"
|
||||
msgstr "Action"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_is_enabled
|
||||
msgid "Active after edit"
|
||||
msgstr "Actif après édition"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_is_enabled
|
||||
msgid "Active before edit"
|
||||
msgstr "Actif avant édition"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__add
|
||||
msgid "Add"
|
||||
msgstr "Ajouter"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Créé par"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Date and time of edition"
|
||||
msgstr "Date et heure de modification"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__unlink
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__edit
|
||||
msgid "Edit"
|
||||
msgstr "Modifier"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
msgid "Edited user"
|
||||
msgstr "Utilisateur modifié"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Editor"
|
||||
msgstr "Utilisateur modificateur"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Group By"
|
||||
msgstr "Regrouper par"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_base_user_role_line_history
|
||||
msgid "History of user roles"
|
||||
msgstr "Historique des rôles de l'utilisateur"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Mis à jour par"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Mis à jour le"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_res_users__last_role_line_modification
|
||||
msgid "Last roles modification"
|
||||
msgstr "Dernière modification des rôles"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_to
|
||||
msgid "New end date"
|
||||
msgstr "Nouvelle date de fin"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "New role"
|
||||
msgstr "Nouveau rôle"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_from
|
||||
msgid "New start date"
|
||||
msgstr "Nouvelle date de début"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_to
|
||||
msgid "Old end date"
|
||||
msgstr "Ancienne date de fin"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Old role"
|
||||
msgstr "Ancien rôle"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_from
|
||||
msgid "Old start date"
|
||||
msgstr "Ancienne date de début"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#. odoo-python
|
||||
#: code:addons/base_user_role_history/models/res_users.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
#, python-format
|
||||
msgid "Roles history"
|
||||
msgstr "Historique des rôles"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_res_users
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__user_id
|
||||
msgid "User"
|
||||
msgstr "Utilisateur"
|
||||
|
||||
#~ msgid "Users"
|
||||
#~ msgstr "Utilisateurs"
|
||||
169
base_user_role_history/i18n/fr_BE.po
Normal file
169
base_user_role_history/i18n/fr_BE.po
Normal file
@@ -0,0 +1,169 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_user_role_history
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 9.0c\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-12-18 11:07+0000\n"
|
||||
"PO-Revision-Date: 2019-09-30 11:50+0000\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr_BE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: \n"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
msgid "<span class=\"o_stat_text\">Last update of roles</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Dernière modification des rôles</span>"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__performed_action
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Action"
|
||||
msgstr "Action"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_is_enabled
|
||||
msgid "Active after edit"
|
||||
msgstr "Actif après édition"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_is_enabled
|
||||
msgid "Active before edit"
|
||||
msgstr "Actif avant édition"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__add
|
||||
msgid "Add"
|
||||
msgstr "Ajouter"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Créé par"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Créé le"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Date and time of edition"
|
||||
msgstr "Date et heure de modification"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__unlink
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__edit
|
||||
msgid "Edit"
|
||||
msgstr "Modifier"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
msgid "Edited user"
|
||||
msgstr "Utilisateur modifié"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Editor"
|
||||
msgstr "Utilisateur modificateur"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Group By"
|
||||
msgstr "Regrouper par"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_base_user_role_line_history
|
||||
msgid "History of user roles"
|
||||
msgstr "Historique des rôles de l'utilisateur"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Dernière modification le"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Derniere fois mis à jour par"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Dernière mis à jour le"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_res_users__last_role_line_modification
|
||||
msgid "Last roles modification"
|
||||
msgstr "Dernière modification des rôles"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_to
|
||||
msgid "New end date"
|
||||
msgstr "Nouvelle date de fin"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "New role"
|
||||
msgstr "Nouveau rôle"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_from
|
||||
msgid "New start date"
|
||||
msgstr "Nouvelle date de début"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_to
|
||||
msgid "Old end date"
|
||||
msgstr "Ancienne date de fin"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Old role"
|
||||
msgstr "Ancien rôle"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_from
|
||||
msgid "Old start date"
|
||||
msgstr "Ancienne date de début"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#. odoo-python
|
||||
#: code:addons/base_user_role_history/models/res_users.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
#, python-format
|
||||
msgid "Roles history"
|
||||
msgstr "Historique des rôles"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_res_users
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__user_id
|
||||
msgid "User"
|
||||
msgstr "Utilisateur"
|
||||
|
||||
#~ msgid "Users"
|
||||
#~ msgstr "Utilisateurs"
|
||||
166
base_user_role_history/i18n/it.po
Normal file
166
base_user_role_history/i18n/it.po
Normal file
@@ -0,0 +1,166 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_user_role_history
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-01-05 15:36+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\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 4.17\n"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
msgid "<span class=\"o_stat_text\">Last update of roles</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Ultimo aggiornamento ruoli</span>"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__performed_action
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Action"
|
||||
msgstr "Azione"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_is_enabled
|
||||
msgid "Active after edit"
|
||||
msgstr "Attivo dopo la modifica"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_is_enabled
|
||||
msgid "Active before edit"
|
||||
msgstr "Attivo prima della modifica"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__add
|
||||
msgid "Add"
|
||||
msgstr "Aggiungi"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Creato da"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Creato il"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Date and time of edition"
|
||||
msgstr "Data e ora della modifica"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__unlink
|
||||
msgid "Delete"
|
||||
msgstr "Cancella"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nome visualizzato"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__edit
|
||||
msgid "Edit"
|
||||
msgstr "Modifica"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
msgid "Edited user"
|
||||
msgstr "Utente modifica"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Editor"
|
||||
msgstr "Editor"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Group By"
|
||||
msgstr "Raggruppa per"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_base_user_role_line_history
|
||||
msgid "History of user roles"
|
||||
msgstr "Stoico ruoli utente"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Ultima modifica il"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Ultimo aggiornamento di"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Ultimo aggiornamento il"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_res_users__last_role_line_modification
|
||||
msgid "Last roles modification"
|
||||
msgstr "Ultime modifiche ruoli"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_to
|
||||
msgid "New end date"
|
||||
msgstr "Nuova data fine"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "New role"
|
||||
msgstr "Nuovo ruolo"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_from
|
||||
msgid "New start date"
|
||||
msgstr "Nuova data inizio"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_to
|
||||
msgid "Old end date"
|
||||
msgstr "Vecchia data fine"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Old role"
|
||||
msgstr "Vecchio ruolo"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_from
|
||||
msgid "Old start date"
|
||||
msgstr "Vecchia data inisio"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#. odoo-python
|
||||
#: code:addons/base_user_role_history/models/res_users.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
#, python-format
|
||||
msgid "Roles history"
|
||||
msgstr "Storico ruoli"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_res_users
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__user_id
|
||||
msgid "User"
|
||||
msgstr "Utente"
|
||||
166
base_user_role_history/i18n/pt.po
Normal file
166
base_user_role_history/i18n/pt.po
Normal file
@@ -0,0 +1,166 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * base_user_role_history
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2023-08-31 10:35+0000\n"
|
||||
"Last-Translator: Pedro Castro Silva <pedrocs@exo.pt>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: pt\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 4.17\n"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
msgid "<span class=\"o_stat_text\">Last update of roles</span>"
|
||||
msgstr "<span class=\"o_stat_text\">Última atualização de funções</span>"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__performed_action
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Action"
|
||||
msgstr "Ação"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_is_enabled
|
||||
msgid "Active after edit"
|
||||
msgstr "Ativo após edição"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_is_enabled
|
||||
msgid "Active before edit"
|
||||
msgstr "Ativo antes da edição"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__add
|
||||
msgid "Add"
|
||||
msgstr "Adicionar"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Criado por"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__create_date
|
||||
msgid "Created on"
|
||||
msgstr "Criado em"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Date and time of edition"
|
||||
msgstr "Data e hora da edição"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__unlink
|
||||
msgid "Delete"
|
||||
msgstr "Excluir"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Nome"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields.selection,name:base_user_role_history.selection__base_user_role_line_history__performed_action__edit
|
||||
msgid "Edit"
|
||||
msgstr "Editar"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
msgid "Edited user"
|
||||
msgstr "Utilizador editado"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_tree_view
|
||||
msgid "Editor"
|
||||
msgstr "Editor"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Group By"
|
||||
msgstr "Agrupar Por"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_base_user_role_line_history
|
||||
msgid "History of user roles"
|
||||
msgstr "Histórico de funções de utilizador"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history____last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Última Modificação em"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Ultima Atualização por"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Última Atualização em"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_res_users__last_role_line_modification
|
||||
msgid "Last roles modification"
|
||||
msgstr "Última modificação de funções"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_to
|
||||
msgid "New end date"
|
||||
msgstr "Nova data de término"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "New role"
|
||||
msgstr "Nova função"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__new_date_from
|
||||
msgid "New start date"
|
||||
msgstr "Nova data de início"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_to
|
||||
msgid "Old end date"
|
||||
msgstr "Antiga data de término"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_role_id
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.base_user_role_line_history_search_view
|
||||
msgid "Old role"
|
||||
msgstr "Antiga função"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__old_date_from
|
||||
msgid "Old start date"
|
||||
msgstr "Antiga data de início"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#. odoo-python
|
||||
#: code:addons/base_user_role_history/models/res_users.py:0
|
||||
#: model_terms:ir.ui.view,arch_db:base_user_role_history.res_users_form_view
|
||||
#, python-format
|
||||
msgid "Roles history"
|
||||
msgstr "Histórico de funções"
|
||||
|
||||
#. module: base_user_role_history
|
||||
#: model:ir.model,name:base_user_role_history.model_res_users
|
||||
#: model:ir.model.fields,field_description:base_user_role_history.field_base_user_role_line_history__user_id
|
||||
msgid "User"
|
||||
msgstr "Utilizador"
|
||||
3
base_user_role_history/models/__init__.py
Normal file
3
base_user_role_history/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from . import res_users
|
||||
from . import base_user_role_line_history
|
||||
from . import res_users_role_line
|
||||
40
base_user_role_history/models/base_user_role_line_history.py
Normal file
40
base_user_role_history/models/base_user_role_line_history.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright 2019 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class BaseUserRoleLineHistory(models.Model):
|
||||
_name = "base.user.role.line.history"
|
||||
_description = "History of user roles"
|
||||
_order = "id desc"
|
||||
|
||||
performed_action = fields.Selection(
|
||||
string="Action",
|
||||
selection=[("add", "Add"), ("unlink", "Delete"), ("edit", "Edit")],
|
||||
required=True,
|
||||
)
|
||||
user_id = fields.Many2one(
|
||||
string="User",
|
||||
comodel_name="res.users",
|
||||
ondelete="cascade",
|
||||
index=True,
|
||||
)
|
||||
old_role_id = fields.Many2one(
|
||||
string="Old role",
|
||||
comodel_name="res.users.role",
|
||||
ondelete="cascade",
|
||||
index=True,
|
||||
)
|
||||
new_role_id = fields.Many2one(
|
||||
string="New role",
|
||||
comodel_name="res.users.role",
|
||||
ondelete="cascade",
|
||||
index=True,
|
||||
)
|
||||
old_date_from = fields.Date(string="Old start date")
|
||||
new_date_from = fields.Date(string="New start date")
|
||||
old_date_to = fields.Date(string="Old end date")
|
||||
new_date_to = fields.Date(string="New end date")
|
||||
old_is_enabled = fields.Boolean(string="Active before edit")
|
||||
new_is_enabled = fields.Boolean(string="Active after edit")
|
||||
30
base_user_role_history/models/res_users.py
Normal file
30
base_user_role_history/models/res_users.py
Normal file
@@ -0,0 +1,30 @@
|
||||
# Copyright 2019 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import _, fields, models
|
||||
|
||||
|
||||
class ResUsers(models.Model):
|
||||
_inherit = "res.users"
|
||||
|
||||
last_role_line_modification = fields.Datetime(
|
||||
compute="_compute_last_role_line_modification",
|
||||
)
|
||||
|
||||
def _compute_last_role_line_modification(self):
|
||||
for user in self:
|
||||
res = self.env["base.user.role.line.history"].search(
|
||||
[("user_id", "=", user.id)], limit=1, order="id desc"
|
||||
)
|
||||
user.last_role_line_modification = res.create_date if res else False
|
||||
|
||||
def show_role_lines_history(self): # pragma: no cover
|
||||
self.ensure_one()
|
||||
domain = [("user_id", "=", self.id)]
|
||||
return {
|
||||
"name": _("Roles history"),
|
||||
"type": "ir.actions.act_window",
|
||||
"view_mode": "tree,form",
|
||||
"res_model": "base.user.role.line.history",
|
||||
"domain": domain,
|
||||
}
|
||||
72
base_user_role_history/models/res_users_role_line.py
Normal file
72
base_user_role_history/models/res_users_role_line.py
Normal file
@@ -0,0 +1,72 @@
|
||||
from odoo import api, models
|
||||
|
||||
|
||||
class ResUsersRoleLine(models.Model):
|
||||
_inherit = "res.users.role.line"
|
||||
|
||||
def write(self, vals):
|
||||
history_lines = []
|
||||
for line in self:
|
||||
history_line = {
|
||||
"performed_action": "edit",
|
||||
"user_id": line.user_id.id,
|
||||
"old_role_id": line.role_id.id,
|
||||
"old_date_from": line.date_from,
|
||||
"old_date_to": line.date_to,
|
||||
"old_is_enabled": line.is_enabled,
|
||||
"new_role_id": vals.get("role_id", line.role_id.id),
|
||||
"new_date_from": vals.get("date_from", line.date_from),
|
||||
"new_date_to": vals.get("date_to", line.date_to),
|
||||
"new_is_enabled": vals.get("is_enabled", line.is_enabled),
|
||||
}
|
||||
if (
|
||||
history_line["old_role_id"] == history_line["new_role_id"]
|
||||
and history_line["old_date_from"] == history_line["new_date_from"]
|
||||
and history_line["old_date_to"] == history_line["new_date_to"]
|
||||
and history_line["old_is_enabled"] == history_line["new_is_enabled"]
|
||||
):
|
||||
continue
|
||||
|
||||
history_lines.append(history_line)
|
||||
|
||||
res = super().write(vals)
|
||||
self.env["base.user.role.line.history"].sudo().create(history_lines)
|
||||
|
||||
return res
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
history_lines = []
|
||||
for line in vals_list:
|
||||
history_line = {
|
||||
"performed_action": "add",
|
||||
"user_id": line.get("user_id", False),
|
||||
"new_role_id": line.get("role_id", False),
|
||||
"new_date_from": line.get("date_from", False),
|
||||
"new_date_to": line.get("date_to", False),
|
||||
"new_is_enabled": line.get("is_enabled", True),
|
||||
}
|
||||
history_lines.append(history_line)
|
||||
|
||||
res = super().create(vals_list)
|
||||
self.env["base.user.role.line.history"].sudo().create(history_lines)
|
||||
|
||||
return res
|
||||
|
||||
def unlink(self):
|
||||
history_lines = []
|
||||
for line in self:
|
||||
history_line = {
|
||||
"performed_action": "unlink",
|
||||
"user_id": line.user_id.id,
|
||||
"old_role_id": line.role_id.id,
|
||||
"old_date_from": line.date_from,
|
||||
"old_date_to": line.date_to,
|
||||
"old_is_enabled": line.is_enabled,
|
||||
}
|
||||
history_lines.append(history_line)
|
||||
|
||||
res = super().unlink()
|
||||
self.env["base.user.role.line.history"].sudo().create(history_lines)
|
||||
|
||||
return res
|
||||
3
base_user_role_history/pyproject.toml
Normal file
3
base_user_role_history/pyproject.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
||||
4
base_user_role_history/readme/CONTRIBUTORS.md
Normal file
4
base_user_role_history/readme/CONTRIBUTORS.md
Normal file
@@ -0,0 +1,4 @@
|
||||
- Benoit Aimont \<<benoit.aimont@acsone.eu>\> (<https://acsone.eu>)
|
||||
- Thomas Binsfeld \<<thomas.binsfeld@acsone.eu>\> (<https://acsone.eu>)
|
||||
- Christopher Rogos \<<crogos@gmail.com>\> (<https://glueckkanja.com>)
|
||||
- Mohamed Osman \<<mohamed.osman3@yahoo.com>\> (<https://glueckkanja.com>)
|
||||
4
base_user_role_history/readme/DESCRIPTION.md
Normal file
4
base_user_role_history/readme/DESCRIPTION.md
Normal file
@@ -0,0 +1,4 @@
|
||||
This addon provides history for roles modifications on users. Each time
|
||||
a role is added/updated/unlinked on a user, a new role history line is
|
||||
created mentioning what changes were made and who made them. Theses
|
||||
informations are directly accessible from users via a smart button.
|
||||
3
base_user_role_history/readme/ROADMAP.md
Normal file
3
base_user_role_history/readme/ROADMAP.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Since roles on role history line have 'cascade' ondelete, role deletion
|
||||
leads to role history line deletion. In order to keep history even in
|
||||
the case of a role deletion, module could be upgraded.
|
||||
2
base_user_role_history/readme/USAGE.md
Normal file
2
base_user_role_history/readme/USAGE.md
Normal file
@@ -0,0 +1,2 @@
|
||||
Changes on user roles are easily accessible via a button on user form
|
||||
view.
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2019 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<record model="ir.model.access" id="base_user_role_line_history_access_name">
|
||||
<field name="name">base.user.role.line.history access user</field>
|
||||
<field name="model_id" ref="model_base_user_role_line_history" />
|
||||
<field name="group_id" ref="base.group_user" />
|
||||
<field name="perm_read" eval="1" />
|
||||
<field name="perm_create" eval="0" />
|
||||
<field name="perm_write" eval="0" />
|
||||
<field name="perm_unlink" eval="0" />
|
||||
</record>
|
||||
</odoo>
|
||||
BIN
base_user_role_history/static/description/icon.png
Normal file
BIN
base_user_role_history/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
444
base_user_role_history/static/description/index.html
Normal file
444
base_user_role_history/static/description/index.html
Normal file
@@ -0,0 +1,444 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||
<title>Base User Role History</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
.subscript {
|
||||
vertical-align: sub;
|
||||
font-size: smaller }
|
||||
|
||||
.superscript {
|
||||
vertical-align: super;
|
||||
font-size: smaller }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title, .code .error {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left, table.align-left {
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right, table.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
table.align-center {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: inherit }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
.align-top {
|
||||
vertical-align: top }
|
||||
|
||||
.align-middle {
|
||||
vertical-align: middle }
|
||||
|
||||
.align-bottom {
|
||||
vertical-align: bottom }
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
/* "booktabs" style (no vertical lines) */
|
||||
table.docutils.booktabs {
|
||||
border: 0px;
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table.docutils.booktabs * {
|
||||
border: 0px;
|
||||
}
|
||||
table.docutils.booktabs th {
|
||||
border-bottom: thin solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="base-user-role-history">
|
||||
<h1 class="title">Base User Role History</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:db5f768a177dfcc1ad17e65d53bedeeac1d7d840e0d009dba5338d27478a0382
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" 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 image-reference" 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 image-reference" href="https://github.com/OCA/server-backend/tree/17.0/base_user_role_history"><img alt="OCA/server-backend" src="https://img.shields.io/badge/github-OCA%2Fserver--backend-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-backend-17-0/server-backend-17-0-base_user_role_history"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-backend&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This addon provides history for roles modifications on users. Each time
|
||||
a role is added/updated/unlinked on a user, a new role history line is
|
||||
created mentioning what changes were made and who made them. Theses
|
||||
informations are directly accessible from users via a smart button.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
|
||||
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
|
||||
<p>Changes on user roles are easily accessible via a button on user form
|
||||
view.</p>
|
||||
</div>
|
||||
<div class="section" id="known-issues-roadmap">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
|
||||
<p>Since roles on role history line have ‘cascade’ ondelete, role deletion
|
||||
leads to role history line deletion. In order to keep history even in
|
||||
the case of a role deletion, module could be upgraded.</p>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-backend/issues">GitHub Issues</a>.
|
||||
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
|
||||
<a class="reference external" href="https://github.com/OCA/server-backend/issues/new?body=module:%20base_user_role_history%0Aversion:%2017.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>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>ACSONE SA/NV</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Benoit Aimont <<a class="reference external" href="mailto:benoit.aimont@acsone.eu">benoit.aimont@acsone.eu</a>> (<a class="reference external" href="https://acsone.eu">https://acsone.eu</a>)</li>
|
||||
<li>Thomas Binsfeld <<a class="reference external" href="mailto:thomas.binsfeld@acsone.eu">thomas.binsfeld@acsone.eu</a>> (<a class="reference external" href="https://acsone.eu">https://acsone.eu</a>)</li>
|
||||
<li>Christopher Rogos <<a class="reference external" href="mailto:crogos@gmail.com">crogos@gmail.com</a>> (<a class="reference external" href="https://glueckkanja.com">https://glueckkanja.com</a>)</li>
|
||||
<li>Mohamed Osman <<a class="reference external" href="mailto:mohamed.osman3@yahoo.com">mohamed.osman3@yahoo.com</a>> (<a class="reference external" href="https://glueckkanja.com">https://glueckkanja.com</a>)</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>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.</p>
|
||||
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
|
||||
<p><a class="reference external image-reference" href="https://github.com/ThomasBinsfeld"><img alt="ThomasBinsfeld" src="https://github.com/ThomasBinsfeld.png?size=40px" /></a></p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/server-backend/tree/17.0/base_user_role_history">OCA/server-backend</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
2
base_user_role_history/tests/__init__.py
Normal file
2
base_user_role_history/tests/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import test_base_user_role_history
|
||||
from . import test_res_users_role
|
||||
142
base_user_role_history/tests/test_base_user_role_history.py
Normal file
142
base_user_role_history/tests/test_base_user_role_history.py
Normal file
@@ -0,0 +1,142 @@
|
||||
# Copyright 2019 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).µ
|
||||
|
||||
from datetime import date, timedelta
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
# DEPRECATED: This tests are deprecated but stay to show that the new code is working.
|
||||
class TestBaseUserRoleHistory(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
|
||||
# MODELS
|
||||
|
||||
cls.history_line_model = cls.env["base.user.role.line.history"]
|
||||
cls.role_model = cls.env["res.users.role"]
|
||||
cls.user_model = cls.env["res.users"]
|
||||
|
||||
# INSTANCE
|
||||
|
||||
cls.user_01 = cls.user_model.search([("id", "!=", cls.env.user.id)], limit=1)
|
||||
cls.role_01 = cls.role_model.create({"name": "Role test 01"})
|
||||
|
||||
def test_write_role_lines_on_user(self):
|
||||
"""
|
||||
Data :
|
||||
- user with no role
|
||||
Test case :
|
||||
1) add a role
|
||||
2) role modification with dates
|
||||
3) role modification with no change
|
||||
4) role unlink
|
||||
Expected results :
|
||||
1) new role history line created with performed_action == 'add'
|
||||
2) new role history line created with performed_action == 'edit'
|
||||
3) no new role history line created
|
||||
4) new role history line created with performed_action == 'unlink'
|
||||
"""
|
||||
# 1
|
||||
history_lines_0 = self.history_line_model.search(
|
||||
[("user_id", "=", self.user_01.id)]
|
||||
)
|
||||
self.assertFalse(history_lines_0)
|
||||
self.user_01.write({"role_line_ids": [(0, 0, {"role_id": self.role_01.id})]})
|
||||
history_lines_1 = self.history_line_model.search(
|
||||
[("user_id", "=", self.user_01.id)]
|
||||
)
|
||||
self.assertTrue(history_lines_1)
|
||||
self.assertEqual(len(history_lines_1), 1)
|
||||
self.assertEqual(history_lines_1.performed_action, "add")
|
||||
self.assertFalse(history_lines_1.old_role_id)
|
||||
self.assertEqual(history_lines_1.new_role_id, self.role_01)
|
||||
# 2
|
||||
self.user_01.write(
|
||||
{
|
||||
"role_line_ids": [
|
||||
(
|
||||
1,
|
||||
self.user_01.role_line_ids[0].id,
|
||||
{
|
||||
"date_from": date.today(),
|
||||
"date_to": date.today() + timedelta(days=5),
|
||||
},
|
||||
)
|
||||
]
|
||||
}
|
||||
)
|
||||
history_lines_2 = self.history_line_model.search(
|
||||
[("user_id", "=", self.user_01.id), ("id", "not in", history_lines_1.ids)]
|
||||
)
|
||||
self.assertTrue(history_lines_2)
|
||||
self.assertEqual(len(history_lines_2), 1)
|
||||
self.assertEqual(history_lines_2.performed_action, "edit")
|
||||
self.assertEqual(history_lines_2.old_role_id, self.role_01)
|
||||
self.assertEqual(history_lines_2.new_role_id, self.role_01)
|
||||
self.assertFalse(history_lines_2.old_date_from)
|
||||
self.assertEqual(history_lines_2.new_date_from, date.today())
|
||||
self.assertFalse(history_lines_2.old_date_to)
|
||||
self.assertEqual(history_lines_2.new_date_to, date.today() + timedelta(days=5))
|
||||
self.user_01.write(
|
||||
{"role_line_ids": [(1, self.user_01.role_line_ids[0].id, {})]}
|
||||
)
|
||||
history_lines_3 = self.history_line_model.search(
|
||||
[
|
||||
("user_id", "=", self.user_01.id),
|
||||
("id", "not in", (history_lines_1 | history_lines_2).ids),
|
||||
]
|
||||
)
|
||||
self.assertFalse(history_lines_3)
|
||||
# 4
|
||||
self.user_01.write(
|
||||
{"role_line_ids": [(2, self.user_01.role_line_ids[0].id, False)]}
|
||||
)
|
||||
history_lines_4 = self.history_line_model.search(
|
||||
[
|
||||
("user_id", "=", self.user_01.id),
|
||||
("id", "not in", (history_lines_1 | history_lines_2).ids),
|
||||
]
|
||||
)
|
||||
self.assertTrue(history_lines_4)
|
||||
self.assertEqual(len(history_lines_4), 1)
|
||||
self.assertEqual(history_lines_4.performed_action, "unlink")
|
||||
self.assertEqual(history_lines_4.old_role_id, self.role_01)
|
||||
self.assertFalse(history_lines_4.new_role_id)
|
||||
self.assertEqual(history_lines_4.old_date_from, date.today())
|
||||
self.assertFalse(history_lines_4.new_date_from)
|
||||
self.assertEqual(history_lines_4.old_date_to, date.today() + timedelta(days=5))
|
||||
self.assertFalse(history_lines_4.new_date_to)
|
||||
|
||||
def test_create_role_lines_on_new_user(self):
|
||||
"""
|
||||
Data : /
|
||||
Test case :
|
||||
- create a user with a role
|
||||
Expected results :
|
||||
- new role history line created with performed_action == 'add'
|
||||
"""
|
||||
new_user = self.user_model.create(
|
||||
{
|
||||
"login": "new_user",
|
||||
"name": "new_user",
|
||||
"role_line_ids": [(0, 0, {"role_id": self.role_01.id})],
|
||||
}
|
||||
)
|
||||
history_lines = self.history_line_model.search([("user_id", "=", new_user.id)])
|
||||
self.assertTrue(history_lines)
|
||||
self.assertEqual(len(history_lines), 1)
|
||||
self.assertEqual(history_lines.performed_action, "add")
|
||||
|
||||
def test_no_create_role_lines_on_new_user(self):
|
||||
"""
|
||||
Data : /
|
||||
Test case :
|
||||
- create a user without role
|
||||
Expected results :
|
||||
- no role history line created
|
||||
"""
|
||||
new_user = self.user_model.create({"login": "new_user", "name": "new_user"})
|
||||
history_lines = self.history_line_model.search([("user_id", "=", new_user.id)])
|
||||
self.assertEqual(len(history_lines), 0)
|
||||
181
base_user_role_history/tests/test_res_users_role.py
Normal file
181
base_user_role_history/tests/test_res_users_role.py
Normal file
@@ -0,0 +1,181 @@
|
||||
from datetime import date
|
||||
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestResUsersRole(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.ResUsers = cls.env["res.users"]
|
||||
cls.ResUsersRole = cls.env["res.users.role"]
|
||||
cls.ResUsersRoleLine = cls.env["res.users.role.line"]
|
||||
cls.BaseUserRoleLineHistory = cls.env["base.user.role.line.history"]
|
||||
|
||||
cls.user = cls.ResUsers.create(
|
||||
{
|
||||
"name": "Test user 01",
|
||||
"login": "test1",
|
||||
}
|
||||
)
|
||||
|
||||
def test_create_adds_history(self):
|
||||
# act
|
||||
role_01 = self.ResUsersRole.create(
|
||||
{"name": "Test role 01", "line_ids": [(0, 0, {"user_id": self.user.id})]}
|
||||
)
|
||||
|
||||
# assert
|
||||
self.assertTrue(role_01.name, "Test role 01")
|
||||
|
||||
history_lines_all = self.BaseUserRoleLineHistory.search(
|
||||
[("user_id", "=", self.user.id)]
|
||||
)
|
||||
self.assertEqual(len(history_lines_all), 1)
|
||||
|
||||
history_line_1 = history_lines_all[0]
|
||||
self.assertEqual(history_line_1.user_id, self.user)
|
||||
self.assertEqual(history_line_1.performed_action, "add")
|
||||
self.assertFalse(history_line_1.old_role_id)
|
||||
self.assertEqual(history_line_1.new_role_id, role_01)
|
||||
self.assertFalse(history_line_1.old_is_enabled)
|
||||
self.assertTrue(history_line_1.new_is_enabled)
|
||||
|
||||
def test_write_adds_history_entry(self):
|
||||
# arrange
|
||||
role_01 = self.ResUsersRole.create(
|
||||
{"name": "Test role 01", "line_ids": [(0, 0, {"user_id": self.user.id})]}
|
||||
)
|
||||
|
||||
role_01_line = role_01.line_ids[0]
|
||||
|
||||
# act
|
||||
role_01_line.write(
|
||||
{
|
||||
"date_from": "2024-05-01",
|
||||
"date_to": "2024-05-30",
|
||||
}
|
||||
)
|
||||
|
||||
# assert
|
||||
history_lines_all = self.BaseUserRoleLineHistory.search(
|
||||
[("user_id", "=", self.user.id)]
|
||||
)
|
||||
|
||||
self.assertEqual(len(history_lines_all), 2)
|
||||
|
||||
history_lines_add = history_lines_all.filtered(
|
||||
lambda x: x.performed_action == "edit"
|
||||
)
|
||||
self.assertEqual(len(history_lines_add), 1)
|
||||
|
||||
history_line_1 = history_lines_add[0]
|
||||
self.assertEqual(history_line_1.performed_action, "edit")
|
||||
self.assertFalse(history_line_1.old_date_from)
|
||||
self.assertEqual(history_line_1.new_date_from, date(2024, 5, 1))
|
||||
self.assertFalse(history_line_1.old_date_to)
|
||||
self.assertEqual(history_line_1.new_date_to, date(2024, 5, 30))
|
||||
self.assertTrue(history_line_1.old_is_enabled)
|
||||
self.assertTrue(history_line_1.new_is_enabled)
|
||||
|
||||
def test_write_no_history_entry(self):
|
||||
# arrange
|
||||
role_01 = self.ResUsersRole.create(
|
||||
{
|
||||
"name": "Test role 01",
|
||||
"line_ids": [
|
||||
(
|
||||
0,
|
||||
0,
|
||||
{
|
||||
"user_id": self.user.id,
|
||||
"date_from": "2024-05-01",
|
||||
"date_to": "2024-05-30",
|
||||
},
|
||||
)
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
role_01_line = role_01.line_ids[0]
|
||||
|
||||
# act
|
||||
# write same values again
|
||||
role_01_line.write(
|
||||
{
|
||||
"date_from": "2024-05-01",
|
||||
"date_to": "2024-05-30",
|
||||
}
|
||||
)
|
||||
|
||||
# assert
|
||||
history_lines_all = self.BaseUserRoleLineHistory.search(
|
||||
[("user_id", "=", self.user.id)]
|
||||
)
|
||||
|
||||
self.assertTrue(len(history_lines_all), 1)
|
||||
history_lines_edit = history_lines_all.filtered(
|
||||
lambda x: x.performed_action == "edit"
|
||||
)
|
||||
self.assertTrue(len(history_lines_edit), 0)
|
||||
|
||||
def test_create_adds_history_entry(self):
|
||||
# arrange
|
||||
role_01 = self.ResUsersRole.create({"name": "Test role 01", "line_ids": []})
|
||||
|
||||
# act
|
||||
self.ResUsersRoleLine.create(
|
||||
{
|
||||
"role_id": role_01.id,
|
||||
"user_id": self.user.id,
|
||||
"date_from": "2024-05-01",
|
||||
"date_to": "2024-05-30",
|
||||
}
|
||||
)
|
||||
|
||||
# assert
|
||||
history_line_add = self.BaseUserRoleLineHistory.search(
|
||||
[("user_id", "=", self.user.id), ("performed_action", "=", "add")]
|
||||
)
|
||||
|
||||
self.assertEqual(len(history_line_add), 1)
|
||||
history_line_1 = history_line_add[0]
|
||||
self.assertFalse(history_line_1.old_role_id)
|
||||
self.assertEqual(history_line_1.new_role_id, role_01)
|
||||
self.assertFalse(history_line_1.old_date_from)
|
||||
self.assertEqual(history_line_1.new_date_from, date(2024, 5, 1))
|
||||
self.assertFalse(history_line_1.old_date_to)
|
||||
self.assertEqual(history_line_1.new_date_to, date(2024, 5, 30))
|
||||
self.assertFalse(history_line_1.old_is_enabled)
|
||||
self.assertTrue(history_line_1.new_is_enabled)
|
||||
|
||||
def test_unlink_adds_history_entry(self):
|
||||
# arrange
|
||||
role_01 = self.ResUsersRole.create(
|
||||
{"name": "Test role 01", "line_ids": [(0, 0, {"user_id": self.user.id})]}
|
||||
)
|
||||
|
||||
# act
|
||||
role_01.line_ids[0].unlink()
|
||||
|
||||
# assert
|
||||
history_line_all = self.BaseUserRoleLineHistory.search(
|
||||
[("user_id", "=", self.user.id)]
|
||||
)
|
||||
|
||||
self.assertEqual(len(history_line_all), 2)
|
||||
|
||||
history_lines_unlink = history_line_all.filtered(
|
||||
lambda x: x.performed_action == "unlink"
|
||||
)
|
||||
self.assertEqual(len(history_lines_unlink), 1)
|
||||
|
||||
history_line_1 = history_lines_unlink[0]
|
||||
self.assertEqual(history_line_1.old_role_id, role_01)
|
||||
self.assertFalse(history_line_1.new_role_id)
|
||||
self.assertFalse(history_line_1.old_date_from)
|
||||
self.assertFalse(history_line_1.new_date_from)
|
||||
self.assertFalse(history_line_1.old_date_to)
|
||||
self.assertFalse(history_line_1.new_date_to)
|
||||
self.assertTrue(history_line_1.old_is_enabled)
|
||||
self.assertFalse(history_line_1.new_is_enabled)
|
||||
92
base_user_role_history/views/base_user_role_line_history.xml
Normal file
92
base_user_role_history/views/base_user_role_line_history.xml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2019 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<!--FORM view-->
|
||||
<record model="ir.ui.view" id="base_user_role_line_history_form_view">
|
||||
<field
|
||||
name="name"
|
||||
>base.user.role.line.history.form (in base_user_role_history)</field>
|
||||
<field name="model">base.user.role.line.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<form create="0" edit="0" delete="0">
|
||||
<header>
|
||||
</header>
|
||||
<sheet>
|
||||
<group name="group_main" col="4">
|
||||
<field name="create_uid" string="Editor" />
|
||||
<field name="performed_action" readonly="True" />
|
||||
<field name="user_id" string="Edited user" readonly="True" />
|
||||
<field name="create_date" string="Date and time of edition" />
|
||||
<field name="old_role_id" readonly="True" />
|
||||
<field name="new_role_id" readonly="True" />
|
||||
<field name="old_date_from" readonly="True" />
|
||||
<field name="new_date_from" readonly="True" />
|
||||
<field name="old_date_to" readonly="True" />
|
||||
<field name="new_date_to" readonly="True" />
|
||||
<field name="old_is_enabled" readonly="True" />
|
||||
<field name="new_is_enabled" readonly="True" />
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<!--TREE view-->
|
||||
<record model="ir.ui.view" id="base_user_role_line_history_tree_view">
|
||||
<field
|
||||
name="name"
|
||||
>base.user.role.line.history.tree (in base_user_role_history)</field>
|
||||
<field name="model">base.user.role.line.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree
|
||||
decoration-success="performed_action == 'add'"
|
||||
decoration-danger="performed_action == 'unlink'"
|
||||
create="0"
|
||||
edit="0"
|
||||
delete="0"
|
||||
>
|
||||
<field name="create_uid" string="Editor" />
|
||||
<field name="create_date" string="Date and time of edition" />
|
||||
<field name="performed_action" />
|
||||
<field name="old_role_id" />
|
||||
<field name="new_role_id" />
|
||||
<field name="old_date_from" />
|
||||
<field name="new_date_from" />
|
||||
<field name="old_date_to" />
|
||||
<field name="new_date_to" />
|
||||
<field name="old_is_enabled" />
|
||||
<field name="new_is_enabled" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<!--SEARCH view-->
|
||||
<record model="ir.ui.view" id="base_user_role_line_history_search_view">
|
||||
<field
|
||||
name="name"
|
||||
>base.user.role.line.history.search (in base_user_role_history)</field>
|
||||
<field name="model">base.user.role.line.history</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="old_role_id" />
|
||||
<field name="new_role_id" />
|
||||
<group string="Group By" name="groupby">
|
||||
<filter
|
||||
name="group_by_old_role"
|
||||
string="Old role"
|
||||
context="{'group_by': 'old_role_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="group_by_new_role"
|
||||
string="New role"
|
||||
context="{'group_by': 'new_role_id'}"
|
||||
/>
|
||||
<filter
|
||||
name="group_by_performed_action"
|
||||
string="Action"
|
||||
context="{'group_by': 'performed_action'}"
|
||||
/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
30
base_user_role_history/views/res_users.xml
Normal file
30
base_user_role_history/views/res_users.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2019 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
<!--FORM view-->
|
||||
<record model="ir.ui.view" id="res_users_form_view">
|
||||
<field name="name">res.users.form (in base_user_role_history)</field>
|
||||
<field name="model">res.users</field>
|
||||
<field name="inherit_id" ref="base.view_users_form" />
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<button
|
||||
name="show_role_lines_history"
|
||||
help="Roles history"
|
||||
class="oe_stat_button"
|
||||
icon="fa-history"
|
||||
type="object"
|
||||
>
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Last update of roles</span>
|
||||
<field
|
||||
class="o_stat_value"
|
||||
name="last_role_line_modification"
|
||||
/>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user