diff --git a/auto_logout_idle_user_odoo/README.rst b/auto_logout_idle_user_odoo/README.rst new file mode 100644 index 000000000..e0e76c9ad --- /dev/null +++ b/auto_logout_idle_user_odoo/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/licence-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/16.0/legal/licenses/licenses.html) + +Credits +------- +* Developers: yadhukrishnan @ cybrosys, 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..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..1970e9f28 --- /dev/null +++ b/auto_logout_idle_user_odoo/__manifest__.py @@ -0,0 +1,48 @@ +# -*- 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': '16.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.jpg'], + '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' + ] + }, + '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..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..cbfed26c0 --- /dev/null +++ b/auto_logout_idle_user_odoo/controllers/auto_logout_idle_user_odoo.py @@ -0,0 +1,44 @@ +# -*- 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 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..8b108a667 --- /dev/null +++ b/auto_logout_idle_user_odoo/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 05.06.2023 +#### Version 16.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..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..5c32a91be --- /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 + _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/l1.png b/auto_logout_idle_user_odoo/static/description/assets/modules/l1.png new file mode 100644 index 000000000..ed175b076 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/l1.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/l2.png b/auto_logout_idle_user_odoo/static/description/assets/modules/l2.png new file mode 100644 index 000000000..a3194264c Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/l2.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/l3.png b/auto_logout_idle_user_odoo/static/description/assets/modules/l3.png new file mode 100644 index 000000000..e894393ef Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/l3.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/l4.png b/auto_logout_idle_user_odoo/static/description/assets/modules/l4.png new file mode 100644 index 000000000..f3c986fc1 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/l4.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/l5.png b/auto_logout_idle_user_odoo/static/description/assets/modules/l5.png new file mode 100644 index 000000000..b21837312 Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/l5.png differ diff --git a/auto_logout_idle_user_odoo/static/description/assets/modules/l6.png b/auto_logout_idle_user_odoo/static/description/assets/modules/l6.png new file mode 100644 index 000000000..e64a5b55c Binary files /dev/null and b/auto_logout_idle_user_odoo/static/description/assets/modules/l6.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..73efe1e9e 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..7f5486eab 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..728d925e4 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..0112ddb6b 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.jpg b/auto_logout_idle_user_odoo/static/description/banner.jpg new file mode 100644 index 000000000..5ebc89036 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..fa0f79816 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..df7df5283 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/description/index.html @@ -0,0 +1,570 @@ +
+ +
+ +
+
+ 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 -> 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

+
+
+
+
+
+
+
+ +
+
+
+ + 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..ee2c28f30 --- /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; +} \ No newline at end of file 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..c9360d080 --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/js/systray.js @@ -0,0 +1,117 @@ +/** @odoo-module **/ +import SystrayMenu from 'web.SystrayMenu'; +import Widget from 'web.Widget'; +var ajax = require('web.ajax'); +var TimerWidget = Widget.extend({ + template: 'TimerSystray', + /** + calling the method get_idle_time to get the data + */ + willStart: function() { + var self = this; + return this._super().then(function() { + self.get_idle_time(); + }); + }, + /** + Getting minutes through python for the corresponding user + */ + get_idle_time: function() { + var self = this + var now = new Date().getTime(); + ajax.rpc('/get_idle_time/timer').then(function(data) { + if (data) { + self.minutes = data + self.idle_timer() + } + }) + }, + /** + passing values of the countdown to the xml + */ + idle_timer: function() { + 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) { + 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); + /** + 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(); + } + }, +}); +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..44fad7cca --- /dev/null +++ b/auto_logout_idle_user_odoo/static/src/xml/systray.xml @@ -0,0 +1,12 @@ + + + + +
+
+ +

+

+
+
+
\ 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..7a1070073 --- /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 + + + + + + + + + + + + + \ No newline at end of file