Restrict Concurrent User Login

by
Odoo
v 13.0 Third Party 1251
Download for v 13.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 328
Technical Name restrict_logins
LicenseLGPL-3
Websitehttps://www.cybrosys.com
Versions 14.0 13.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 328
Technical Name restrict_logins
LicenseLGPL-3
Websitehttps://www.cybrosys.com
Versions 14.0 13.0
Community
Enterprise

Restrict Concurrent User Login

Restrict Concurrent Sessions

Overview

Some times it is neccessary to restrict the user from multiple logins for security reasons.This module envisions the same.This module restricts the concurrent sessions for users.The user will get restricted from login if they already login in to another device.Also it provides an option to force logout for users. A inactive session will automatically expire after 45 minutes.

Features

Restrict concurrent sessions for users

User force logout

Automatic session expiry after 45 minutes

Screenshots

Login to Odoo

After installation, login to Odoo.

Notification when user is already logged in from other devices

When the User tries to login, a notification will prompt if he is already logged in.

Option for forced logout

Force log out from devices that are already logged in.

Suggested 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

Need Help?



Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
after install error psycopg2.errors.InFailedSqlTransaction
by
Joinners Mendez
on 5/8/20, 2:53 PM

after install the module, some times when go to the apps or settings menu show this error : Error: Odoo Server Error Traceback (most recent call last): File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\http.py", line 619, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\http.py", line 309, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\tools\pycompat.py", line 14, in reraise raise value File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\http.py", line 664, in dispatch result = self._call_function(**self.params) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\http.py", line 345, in _call_function return checked_call(self.db, *args, **kwargs) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\service\model.py", line 93, in wrapper return f(dbname, *args, **kwargs) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\http.py", line 338, in checked_call result = self.endpoint(*a, **kw) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\http.py", line 909, in __call__ return self.method(*args, **kw) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\http.py", line 510, in response_wrap response = f(*args, **kw) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1319, in call_kw return self._call_kw(model, method, args, kwargs) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1311, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\api.py", line 391, in call_kw result = _call_kw_model(method, model, args, kwargs) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\api.py", line 364, in _call_kw_model result = method(recs, *args, **kwargs) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\addons\base\models\res_config.py", line 487, in default_get classified = self._get_classified_fields() File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\addons\base\models\res_config.py", line 466, in _get_classified_fields module = IrModule.sudo().search([('name', '=', name[7:])], limit=1) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\models.py", line 1601, in search res = self._search(args, offset=offset, limit=limit, order=order, count=count) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\models.py", line 4369, in _search self._cr.execute(query_str, where_clause_params) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\sql_db.py", line 163, in wrapper return f(self, *args, **kwargs) File "C:\Users\PC GAMER\Documents\Inversiones Global JVR\Odoo\Odoo 13.0\server\odoo\sql_db.py", line 240, in execute res = self._obj.execute(query, params) psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block


module does not work.
by
Kestutis Urbonas
on 3/2/20, 7:46 AM

Installed module, but it does not make any effect. Can login from other devices, and does not logout after mentioned time.

Re: module does not work.
by
Cybrosys Technologies
on 3/2/20, 10:25 PM Author

Hi, Thanks for the feedback. looks like like it is not considering the existing session. We will update that soon Regarding the 2nd point, Could you please sent how did you tested the module to odoo@cybrosys.com


Version 15
by
Mamadou Oumar DIOP
on 9/24/22, 7:00 PM

Good evening
Do you have version 15 of this module???


V14 Enterprise
by
abc abc
on 2/17/22, 11:29 PM

Can this module be available in Odoo V14 Enterprise?

Re: V14 Enterprise
by
Cybrosys Technologies
on 2/18/22, 12:47 AM Author

Currently not available. Please contact on odoo@cybrosys.com if you really need this.


by
Guttappa
on 2/15/22, 1:11 AM

Hi im getting this error while restricting single user for login in odoo14

please help me out

uid = cls._login(db, login, password, user_agent_env=user_agent_env)
TypeError: _login() got an unexpected keyword argument 'user_agent_env'
Re:
by
Cybrosys Technologies
on 2/15/22, 4:34 AM Author

This is a v13 module. Please use in Odoo v13


by
Guttappa
on 2/15/22, 1:09 AM

Hi im getting this error while restricting single user for login in odoo14.

i'm trying this app
https://apps.odoo.com/apps/modules/13.0/restrict_logins/

please help me out

uid = cls._login(db, login, password, user_agent_env=user_agent_env)
TypeError: _login() got an unexpected keyword argument 'user_agent_env'

by
harold jacmin
on 1/7/22, 9:21 AM

Hello, 

This module is also available for the odoo website app? 

I don't want my future clients to login with same ID in different devises at the same time. I do. ot need it for the Odoo DB itselfs but for clients to login in the odoo website app


psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
by
Julio
on 12/6/21, 6:03 PM
I have this error after installing this module.
File "/opt/odoo/odoo/addons/base/models/res_users.py", line 753, in _has_group self._cr.execute("""SELECT 1 FROM res_groups_users_rel WHERE uid=%s AND gid IN File "/opt/odoo/odoo/sql_db.py", line 173, in wrapper return f(self, *args, **kwargs) File "/opt/odoo/odoo/sql_db.py", line 250, in execute res = self._obj.execute(query, params) psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block

This is the complete trace of the error:

Odoo Server Error
Traceback (most recent call last):
  File "/opt/odoo/odoo/tools/cache.py", line 85, in lookup
    r = d[key]
  File "/opt/odoo/odoo/tools/func.py", line 69, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/odoo/odoo/tools/lru.py", line 44, in __getitem__
    a = self.d[obj].me
KeyError: ('res.users', <function Users._has_group at 0x7fa26adaad30>, 2256, 'base.group_user')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/opt/odoo/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/web/controllers/main.py", line 1339, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/main.py", line 1331, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 383, in call_kw
    result = _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 356, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/mail/models/mail_message.py", line 419, in message_fetch
    messages = self.search(domain, limit=limit)
  File "/opt/odoo/odoo/models.py", line 1648, in search
    res = self._search(args, offset=offset, limit=limit, order=order, count=count)
  File "/opt/odoo/addons/website_mail/models/mail_message.py", line 49, in _search
    return super(MailMessage, self)._search(args, offset=offset, limit=limit, order=order,
  File "/opt/odoo/addons/calendar/models/mail_message.py", line 23, in _search
    return super(Message, self)._search(args, offset=offset, limit=limit, order=order, count=count, access_rights_uid=access_rights_uid)
  File "/opt/odoo/addons/mail/models/mail_message.py", line 640, in _search
    if not self.env['res.users'].has_group('base.group_user'):
  File "/opt/odoo/odoo/addons/base/models/res_users.py", line 738, in has_group
    return self.with_user(uid)._has_group(group_ext_id)
  File "<decorator-gen-87>", line 2, in _has_group
  File "/opt/odoo/odoo/tools/cache.py", line 90, in lookup
    value = d[key] = self.method(*args, **kwargs)
  File "/opt/odoo/odoo/addons/base/models/res_users.py", line 753, in _has_group
    self._cr.execute("""SELECT 1 FROM res_groups_users_rel WHERE uid=%s AND gid IN
  File "/opt/odoo/odoo/sql_db.py", line 173, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/odoo/odoo/sql_db.py", line 250, in execute
    res = self._obj.execute(query, params)
psycopg2.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block

Regards.







by
Rustem Amirov
on 4/5/21, 11:48 AM

Good afternoon. Does your module work in Odoo14? If not, when will the promise be released?


How to count license in Webkul Odoo SaaS?
by
wilsonkwok@marvelconnect.com
on 9/28/20, 9:00 AM

Hello,

We are planning to deploy Webkul Odoo SaaS, but how to count Restrict Concurrent User Login license for each instants?

Thanks