Hi good day all.
My requirement is that after x number of minutes the system should logout and ask for relogin just like web-sessions. I tried to work with below piece of code in http.py but it is not working. Can anybody guide me how this can be done.
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
For security, session auto-timeout should be a default option in base Odoo... it's pretty ridiculous that it's not.