diff --git a/auto_logout_idle_user_odoo/README.rst b/auto_logout_idle_user_odoo/README.rst new file mode 100644 index 000000000..17b0461d6 --- /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 `__ + +License +------- +Affero General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/17.0/legal/licenses/licenses.html) + +Credits +------- +* Developers: (V16) Developer Yadhukrishnan, + (V17) Developer Anurudh P + Contact: odoo@cybrosys.com +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..dce361296 --- /dev/null +++ b/auto_logout_idle_user_odoo/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anurudh P (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..2b28f514d --- /dev/null +++ b/auto_logout_idle_user_odoo/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anurudh P (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': '17.0.1.0.0', + 'category': 'Extra Tools', + '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 """, + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'license': 'AGPL-3', + 'depends': ['base'], + 'data': [ + 'views/res_users_views.xml' + ], + 'assets': { + 'web.assets_backend': [ + '/auto_logout_idle_user_odoo/static/src/xml/systray.xml', + '/auto_logout_idle_user_odoo/static/src/js/systray.js', + '/auto_logout_idle_user_odoo/static/src/css/systray.css' + ], + }, + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'auto_install': False, + 'application': 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..a71fac700 --- /dev/null +++ b/auto_logout_idle_user_odoo/controllers/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anurudh P (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..1b028c3f1 --- /dev/null +++ b/auto_logout_idle_user_odoo/controllers/auto_logout_idle_user_odoo.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anurudh p (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 EasyLanguageSelector(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='public', 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. + """ + if request.env.user.enable_idle: + return request.env.user.idle_time 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..1986373a3 --- /dev/null +++ b/auto_logout_idle_user_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 12.01.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial Commit for Logout Idle User \ No newline at end of file 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..f741e8b5f --- /dev/null +++ b/auto_logout_idle_user_odoo/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Anurudh P (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..cdf5c2118 --- /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) 2024-TODAY Cybrosys Technologies(). +# Author: Anurudh P (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 + _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/capture (1).png b/auto_logout_idle_user_odoo/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/capture (1).png differ 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/img.png b/auto_logout_idle_user_odoo/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/img.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/photo-capture.png b/auto_logout_idle_user_odoo/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/icons/photo-capture.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/Cybrosys R.png b/auto_logout_idle_user_odoo/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/misc/Cybrosys R.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/email.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/phone.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/star (1) 2.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/support (1) 1.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/support-email.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/tick-mark.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp 1.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp.svg b/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..d559d353b 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..0ebfe4c09 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..a0d2a84f8 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..a09d49458 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.png b/auto_logout_idle_user_odoo/static/description/assets/modules/5.png new file mode 100644 index 000000000..428458052 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/5.png 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..bbc5d81dc 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/1.png b/auto_logout_idle_user_odoo/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..024d53086 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/screenshots/1.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/screenshots/2.png b/auto_logout_idle_user_odoo/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..130b21d2c Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/screenshots/2.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/screenshots/3.png b/auto_logout_idle_user_odoo/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..e4e8aca5b Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/screenshots/3.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..b5be94794 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/banner.jpg b/auto_logout_idle_user_odoo/static/description/banner.jpg new file mode 100644 index 000000000..2d4e27a2c Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/banner.jpg 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..56ae76d20 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..aa87dc000 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/index.html @@ -0,0 +1,421 @@ + + + + + + + Logout Idle User + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Logout Idle User

+

+ Manages to logout when user is idle +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

A protection to your odoo session.

+

Manages to logout when user is idle. +

+
+
+
+
+
+
+ +
+
+

User can set their idle time in their profile.

+

Can set the idle time limit in user profile. +

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

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

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+ +
+
+

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

+
+
+
+
+
+
+
    +
  • + Manages to logout when user is idle. +
  • +
  • + User can set their idle time in their profile. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:12th Jan 2024 +
+

+ + Initial Commit for Logout Idle User.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + 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..c7779a36c --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/css/systray.css @@ -0,0 +1,8 @@ +#div-timer{ + color: black; + display:flex; + margin-top:1px; +} +#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..a17d51079 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/js/systray.js @@ -0,0 +1,117 @@ +/* @odoo-module */ +import { Component,useState } from "@odoo/owl"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import { registry } from "@web/core/registry"; +import { session } from "@web/session"; +import { useService } from "@web/core/utils/hooks"; +import { _t } from "@web/core/l10n/translation"; +const { onMounted, mount } = owl +class TimerSystrayItem extends Component{ + static template="auto_logout_idle_user_odoo.TimerSystray" + setup(){ + super.setup(); + this.get_idle_time(); + } + get_idle_time() { + var self = this + var now = new Date().getTime(); + jsonrpc('/get_idle_time/timer', { + method:'call', + }).then((data) => { + if (data) { + self.minutes = data + self.idle_timer() + } + }); + } + /** + passing values of the countdown to the xml + */ + idle_timer() { + var self = this + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.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) { + document.querySelector("#idle_timer").innerHTML = days + "d " + hours + "h " + minutes + "m " + seconds + "s "; + } else if (hours) { + document.querySelector("#idle_timer").innerHTML = hours + "h " + minutes + "m " + seconds + "s "; + } else { + document.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); + document.querySelector("#idle_timer").innerHTML = "EXPIRED"; + location.replace("/web/session/logout") + } + }, 1000); + /** + checking if the onmouse-move event is occur + */ + document.onmousemove = () => { + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.minutes); + updatedTimestamp = date.getTime(); + }; + /** + checking if the onkeypress event is occur + */ + document.onkeypress = () => { + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.minutes); + updatedTimestamp = date.getTime(); + }; + /** + checking if the onclick event is occur + */ + document.onclick = () => { + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.minutes); + updatedTimestamp = date.getTime(); + }; + /** + checking if the ontouchstart event is occur + */ + document.ontouchstart = () => { + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.minutes); + updatedTimestamp = date.getTime(); + } + /** + checking if the onmousedown event is occur + */ + document.onmousedown = () => { + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.minutes); + updatedTimestamp = date.getTime(); + } + /** + checking if the onload event is occur + */ + document.onload = () => { + var nowt = new Date().getTime(); + var date = new Date(nowt); + date.setMinutes(date.getMinutes() + self.minutes); + updatedTimestamp = date.getTime(); + } + } +} +export const systrayItem = { + Component: TimerSystrayItem +}; +registry.category("systray").add("auto_logout_idle_user_odoo.TimerSystray",systrayItem, {sequence:25}); 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..8a91c6509 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/xml/systray.xml @@ -0,0 +1,12 @@ + + + + +
+
+ +

+

+
+
+
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..82d6b33de --- /dev/null +++ b/auto_logout_idle_user_odoo/views/res_users_views.xml @@ -0,0 +1,19 @@ + + + + + res.users.view.form.inherit.auto.logout.idle.user.odoo + res.users + + + + + + + + + + + + +