From 93286d87927492a559463e785cefc01db0d3ac00 Mon Sep 17 00:00:00 2001 From: Denis Mudarisov Date: Fri, 27 Dec 2019 00:23:41 +0500 Subject: [PATCH 1/9] [ADD] user_log_view Closes #154 --- user_log_view/__init__.py | 1 + user_log_view/__manifest__.py | 21 ++++++++ user_log_view/readme/CONTRIBUTORS.rst | 1 + user_log_view/readme/DESCRIPTION.rst | 1 + user_log_view/readme/USAGE.rst | 6 +++ user_log_view/views/res_users_views.xml | 68 +++++++++++++++++++++++++ 6 files changed, 98 insertions(+) create mode 100644 user_log_view/__init__.py create mode 100644 user_log_view/__manifest__.py create mode 100644 user_log_view/readme/CONTRIBUTORS.rst create mode 100644 user_log_view/readme/DESCRIPTION.rst create mode 100644 user_log_view/readme/USAGE.rst create mode 100644 user_log_view/views/res_users_views.xml diff --git a/user_log_view/__init__.py b/user_log_view/__init__.py new file mode 100644 index 0000000000..ca03eda077 --- /dev/null +++ b/user_log_view/__init__.py @@ -0,0 +1 @@ +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). diff --git a/user_log_view/__manifest__.py b/user_log_view/__manifest__.py new file mode 100644 index 0000000000..165bd2ac6d --- /dev/null +++ b/user_log_view/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2019 Denis Mudarisov (IT-Projects LLC) +# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). +{ + "name": "User's Log Viewer", + "summary": "Allow to see user's actions log", + "version": "12.0.1.0.0", + "development_status": "Production/Stable", + "category": "Extra Tools", + "website": "https://github.com/OCA/server-auth", + "author": "IT-Projects LLC, Odoo Community Association (OCA)", + "maintainers": ["trojikman"], + "license": "LGPL-3", + "application": False, + "installable": True, + "depends": [ + "base", + ], + "data": [ + "views/res_users_views.xml", + ], +} diff --git a/user_log_view/readme/CONTRIBUTORS.rst b/user_log_view/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..92972c6da2 --- /dev/null +++ b/user_log_view/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Denis Mudarisov (https://www.it-projects.info/) diff --git a/user_log_view/readme/DESCRIPTION.rst b/user_log_view/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..77050f7cbc --- /dev/null +++ b/user_log_view/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module adds a smart button on user's form to display authentication logs. diff --git a/user_log_view/readme/USAGE.rst b/user_log_view/readme/USAGE.rst new file mode 100644 index 0000000000..65a73ddb2e --- /dev/null +++ b/user_log_view/readme/USAGE.rst @@ -0,0 +1,6 @@ +To use this module, you need to: + +1) Go to Settings +2) Go to Users & Companies +3) Choose the User whose logs you need to see and go to Authentication logs +4) You will see a list of authentications for a specific user diff --git a/user_log_view/views/res_users_views.xml b/user_log_view/views/res_users_views.xml new file mode 100644 index 0000000000..c90cd63bf3 --- /dev/null +++ b/user_log_view/views/res_users_views.xml @@ -0,0 +1,68 @@ + + + + + + + Authentication logs + ir.actions.act_window + res.users.log + [[False, 'tree'], [False, 'form']] + [('create_uid', '=', active_id)] + current + {'search_default_groupby_date': True} + + + + res.users.log.search + res.users.log + + + + + + + + + + + + + res.users.view.form + res.users + + + +