diff --git a/auto_logout_idle_user_odoo/README.rst b/auto_logout_idle_user_odoo/README.rst new file mode 100644 index 000000000..4e3e88663 --- /dev/null +++ b/auto_logout_idle_user_odoo/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Logout Idle User +================ +Auto logout idle user with fixed time + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V16) Yadhukrishnan k, Contact: odoo@cybrosys.com + +License +------- +Affero General Public License, Version 3 `(AGPL v3). +`__ + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ + + diff --git a/auto_logout_idle_user_odoo/__init__.py b/auto_logout_idle_user_odoo/__init__.py new file mode 100644 index 000000000..1e015eaa4 --- /dev/null +++ b/auto_logout_idle_user_odoo/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import controllers +from . import models diff --git a/auto_logout_idle_user_odoo/__manifest__.py b/auto_logout_idle_user_odoo/__manifest__.py new file mode 100644 index 000000000..ba2b7cd41 --- /dev/null +++ b/auto_logout_idle_user_odoo/__manifest__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +{ + 'name': 'Logout Idle User', + 'version': '15.0.1.0.0', + 'summary': 'Auto logout idle user with fixed time', + 'description': """User can fix the timer in the user's profile, if the user + is in idle mode the user will logout from session automatically""", + 'category': 'Extra Tools', + 'author': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'license': 'AGPL-3', + 'depends': ['base'], + 'images': ['static/description/banner.png'], + 'data': [ + 'views/res_users_views.xml' + ], + 'assets': { + 'web.assets_backend': [ + '/auto_logout_idle_user_odoo/static/src/js/systray.js', + '/auto_logout_idle_user_odoo/static/src/css/systray.css' + ], + 'web.assets_qweb': [ + '/auto_logout_idle_user_odoo/static/src/xml/systray.xml', ] + }, + 'application': False, + 'installable': True, + 'auto_install': False +} diff --git a/auto_logout_idle_user_odoo/controllers/__init__.py b/auto_logout_idle_user_odoo/controllers/__init__.py new file mode 100644 index 000000000..7a9ee874c --- /dev/null +++ b/auto_logout_idle_user_odoo/controllers/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import auto_logout_idle_user_odoo diff --git a/auto_logout_idle_user_odoo/controllers/auto_logout_idle_user_odoo.py b/auto_logout_idle_user_odoo/controllers/auto_logout_idle_user_odoo.py new file mode 100644 index 000000000..976a8edee --- /dev/null +++ b/auto_logout_idle_user_odoo/controllers/auto_logout_idle_user_odoo.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from odoo import http +from odoo.http import request + + +class AutoLogoutIdleUSer(http.Controller): + """ + The EasyLanguageSelector passing minute that selected in the login user + account. + Methods: + get_idle_time(self): + when the page is loaded adding total activated languages options + to the selection field. + return a list variable. + """ + + @http.route('/get_idle_time/timer', auth='user', type='json') + def get_idle_time(self): + """ + Summery: + Getting value that selected from the login user account and pass it + to the js function. + return: + type:It is a variable, that contain selected minutes. + """ + return request.env.user.idle_time if request.env.user.enable_idle\ + else False diff --git a/auto_logout_idle_user_odoo/doc/RELEASE_NOTES.md b/auto_logout_idle_user_odoo/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..ad696c914 --- /dev/null +++ b/auto_logout_idle_user_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 06.10.2023 +#### Version 15.0.1.0.0 +##### ADD +- Initial Commit for Logout Idle User diff --git a/auto_logout_idle_user_odoo/models/__init__.py b/auto_logout_idle_user_odoo/models/__init__.py new file mode 100644 index 000000000..af6528027 --- /dev/null +++ b/auto_logout_idle_user_odoo/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from . import res_users diff --git a/auto_logout_idle_user_odoo/models/res_users.py b/auto_logout_idle_user_odoo/models/res_users.py new file mode 100644 index 000000000..56dae2f5f --- /dev/null +++ b/auto_logout_idle_user_odoo/models/res_users.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +################################################################################ +from odoo import fields, models + + +class Users(models.Model): + """ Inherit and adding some fields to the 'res.users'""" + _inherit = "res.users" + + enable_idle = fields.Boolean(string="Enable Idle Time", + help="Enable Idle Timer") + idle_time = fields.Integer(string="Idle Time (In minutes)", default=10, + help="Set Idle Time For theis User") + + _sql_constraints = [ + ('positive_idle_time', 'CHECK(idle_time >= 1)', + 'Idle Time should be a positive number.'), + ] diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/check.png b/auto_logout_idle_user_odoo/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/check.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/chevron.png b/auto_logout_idle_user_odoo/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/chevron.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/cogs.png b/auto_logout_idle_user_odoo/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/cogs.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/consultation.png b/auto_logout_idle_user_odoo/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/consultation.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/ecom-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/ecom-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/education-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/education-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/hotel-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/hotel-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/license.png b/auto_logout_idle_user_odoo/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/license.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/lifebuoy.png b/auto_logout_idle_user_odoo/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/lifebuoy.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/manufacturing-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/manufacturing-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/pos-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/pos-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/puzzle.png b/auto_logout_idle_user_odoo/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/puzzle.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/restaurant-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/restaurant-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/service-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/service-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/trading-black.png b/auto_logout_idle_user_odoo/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/trading-black.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/training.png b/auto_logout_idle_user_odoo/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/training.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/update.png b/auto_logout_idle_user_odoo/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/update.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/user.png b/auto_logout_idle_user_odoo/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/user.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/icons/wrench.png b/auto_logout_idle_user_odoo/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/wrench.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/categories.png b/auto_logout_idle_user_odoo/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/categories.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/check-box.png b/auto_logout_idle_user_odoo/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/check-box.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/compass.png b/auto_logout_idle_user_odoo/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/compass.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/corporate.png b/auto_logout_idle_user_odoo/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/corporate.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/customer-support.png b/auto_logout_idle_user_odoo/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/customer-support.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/cybrosys-logo.png b/auto_logout_idle_user_odoo/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/cybrosys-logo.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/features.png b/auto_logout_idle_user_odoo/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/features.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/logo.png b/auto_logout_idle_user_odoo/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/logo.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/pictures.png b/auto_logout_idle_user_odoo/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/pictures.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/pie-chart.png b/auto_logout_idle_user_odoo/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/pie-chart.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/right-arrow.png b/auto_logout_idle_user_odoo/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/right-arrow.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/star.png b/auto_logout_idle_user_odoo/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/star.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/support.png b/auto_logout_idle_user_odoo/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/support.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp.png b/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/1.png b/auto_logout_idle_user_odoo/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/1.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/2.png b/auto_logout_idle_user_odoo/static/description/assets/modules/2.png new file mode 100644 index 000000000..1ae7cfe3b Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/2.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/3.png b/auto_logout_idle_user_odoo/static/description/assets/modules/3.png new file mode 100644 index 000000000..3c3ff1afb Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/3.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/4.png b/auto_logout_idle_user_odoo/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/4.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/5.gif b/auto_logout_idle_user_odoo/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/5.gif differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/6.png b/auto_logout_idle_user_odoo/static/description/assets/modules/6.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/6.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/screenshots/Screenshot2.png b/auto_logout_idle_user_odoo/static/description/assets/screenshots/Screenshot2.png new file mode 100644 index 000000000..7820ab893 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/screenshots/Screenshot2.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/screenshots/Screenshot3.png b/auto_logout_idle_user_odoo/static/description/assets/screenshots/Screenshot3.png new file mode 100644 index 000000000..3c8155148 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/screenshots/Screenshot3.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/screenshots/hero.gif b/auto_logout_idle_user_odoo/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..ec7113c9c Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/screenshots/hero.gif differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/screenshots/screenshot.png b/auto_logout_idle_user_odoo/static/description/assets/screenshots/screenshot.png new file mode 100644 index 000000000..e59544669 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/screenshots/screenshot.png differ diff --git a/auto_logout_idle_user_odoo/static/description/banner.png b/auto_logout_idle_user_odoo/static/description/banner.png new file mode 100644 index 000000000..8171370f7 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/banner.png differ diff --git a/auto_logout_idle_user_odoo/static/description/icon.png b/auto_logout_idle_user_odoo/static/description/icon.png new file mode 100644 index 000000000..e686f89d0 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/icon.png differ diff --git a/auto_logout_idle_user_odoo/static/description/index.html b/auto_logout_idle_user_odoo/static/description/index.html new file mode 100644 index 000000000..5767b34a9 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/index.html @@ -0,0 +1,535 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Logout Idle User +

+

Logout the user in idle mode.

+ + +
+
+
+
+ + +
+
+ +
+

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ When the user in idle mode, this module redirect to the login page after a fixed time. +
+ +
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + A protection to your odoo session. +
+
+
+
+ + User can set their idle time in their profile. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Idle Timer

+

User need to enable the option idle timer under Settings -> Users & Companies-> Users Preferences after that set time for idle.

+ +
+ +
+

Timer On Systray +

+

After completion of above step a timer will be displayed in the systray +

+ +
+ +
+

Logout User +

+

After completion of timer the user will be logout automatically. +

+ +
+
+
+ + + +
+
+ +
+

Related + Products +

+
+
+
+ +
+
+ + + + +
+
+ +
+

Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + + + +
+
+ +
+

Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ + + + +
+
+ +
+

Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need help? Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on WhatsApp!

+ +

+91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ \ No newline at end of file diff --git a/auto_logout_idle_user_odoo/static/src/css/systray.css b/auto_logout_idle_user_odoo/static/src/css/systray.css new file mode 100644 index 000000000..9c4956384 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/css/systray.css @@ -0,0 +1,8 @@ +#div-timer{ + color:#fff; + display:flex; + margin-top:10px; +} +#div-timer i{ + padding: 4px; +} diff --git a/auto_logout_idle_user_odoo/static/src/js/systray.js b/auto_logout_idle_user_odoo/static/src/js/systray.js new file mode 100644 index 000000000..83333a02e --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/js/systray.js @@ -0,0 +1,79 @@ +/** @odoo-module **/ +import SystrayMenu from 'web.SystrayMenu'; +import Widget from 'web.Widget'; +var ajax = require('web.ajax'); +var TimerWidget = Widget.extend({ + template: 'TimerSystray', + /** + function run before loading the page to call methode "get_idle_time" + */ + willStart: function() { + var self = this; + return this._super().then(function() { + self.get_idle_time(); + }); + }, + /** + Getting minutes through python for the corresponding user in the backend + */ + get_idle_time: function() { + var self = this + var now = new Date().getTime(); + ajax.rpc('/get_idle_time/timer').then(function(data) { + if (data != false) { + self.minutes = data + self.idle_timer() + } + }) + }, + /** + passing values of the countdown to the xml + */ + idle_timer: function() { + var nowt = new Date().getTime(); + var date = new Date(nowt); + var self = this; + date.setMinutes(date.getMinutes() + this.minutes); + var updatedTimestamp = date.getTime(); + /** Running the count down using setInterval function */ + var idle = setInterval(function() { + var now = new Date().getTime(); + var distance = updatedTimestamp - now; + var days = Math.floor(distance / (1000 * 60 * 60 * 24)); + var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); + var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); + var seconds = Math.floor((distance % (1000 * 60)) / 1000); + if (hours && days) { + self.el.querySelector("#idle_timer").innerHTML = " " + days + "d " + hours + "h " + minutes + "m " + seconds + "s "; + } else if (hours) { + self.el.querySelector("#idle_timer").innerHTML = " " + hours + "h " + minutes + "m " + seconds + "s "; + } else { + self.el.querySelector("#idle_timer").innerHTML = " " + minutes + "m " + seconds + "s "; + } + /** if the countdown is zero the link is redirect to the login page*/ + if (distance < 0) { + clearInterval(idle); + self.el.querySelector("#idle_timer").innerHTML = "EXPIRED"; + location.replace("/web/session/logout") + } + }, 1000); + /** + * Reset the idle time + */ + function resetTimer(){ + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.minutes); + updatedTimestamp = date.getTime(); + } + /** + * Calling the resetTimer() for each event + */ + const events = ['mousemove', 'keypress', 'click', 'touchstart', 'mousedown', 'load']; + for (const event of events) { + document.addEventListener(event, resetTimer); + } + }, +}); +SystrayMenu.Items.push(TimerWidget); +export default TimerWidget; \ No newline at end of file diff --git a/auto_logout_idle_user_odoo/static/src/xml/systray.xml b/auto_logout_idle_user_odoo/static/src/xml/systray.xml new file mode 100644 index 000000000..07e711c7d --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/xml/systray.xml @@ -0,0 +1,11 @@ + + + + +
+
+

+

+
+
+
\ No newline at end of file diff --git a/auto_logout_idle_user_odoo/views/res_users_views.xml b/auto_logout_idle_user_odoo/views/res_users_views.xml new file mode 100644 index 000000000..0beb2264d --- /dev/null +++ b/auto_logout_idle_user_odoo/views/res_users_views.xml @@ -0,0 +1,19 @@ + + + + + view.users.form.inherit.auto.logout.idle.user.odoo + res.users + + + + + + + + + + + + +