Is there a work around for session time out in version 10?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi Niyas thanks. But how can I inherit/override that function
see this module, https://www.odoo.com/apps/modules/8.0/inactive_session_timeout/
Hi,
There is a function in session_gc , in http.py file . This function will handle the inactive session in Odoo. Normally if the session is inactive for the past one week, then this function will unlink the path to this session, which will force the user to start a new session.
This is the function,
def session_gc(session_store):
if random.random() < 0.001:
# we keep session one week
last_week = time.time() - 60*60*24*7
for fname in os.listdir(session_store.path):
path = os.path.join(session_store.path, fname)
try:
if os.path.getmtime(path) < last_week:
os.unlink(path)
except OSError:
pass
By using a front-end proxy like NGINX (reverse proxy or wsgi) you can set the timeout limit.
Please go through this link , https://www.odoo.com/forum/help-1/question/why-there-is-not-timeout-period-session-connection-to-expire-in-openerp-8203
Thanks
session_gc() doesn't take in account the last activity time. The session will expire in a week even if you are active all the time. What you really want is the ability to have the session expired after a period of inactivity. And looking at the link it doesn't seem that setting timeout in NGINX will help with that. (NGINX has no idea about the odoo session). So is there any solution so far or not? The module Web Sessions Management does not kill the session in V10. and the module auth_session_timeout is not working after Odoo commit da1f153d61d747d9357694382fe04f96c0ca886a