Odoo Hilfe

3

4
17 Answers
3
Mohamed arif
13.05.13, 09:01

I found solution by modifying code in web/http.py

I updated following with code in the function def session_context(request, session_store, session_lock, sid):

for key, value in request.session.items():
    if not isinstance(value, session.OpenERPSession):
        continue
    if getattr(value, '_suicide', False) or (
               #not value._uid
           #and
            not value.jsonp_requests
           # FIXME do not use a fixed value
           and value._creation_time + (10 * 60) < time.time()):
        _logger.debug('remove session %s', key)
        removed_sessions.add(key)
        del request.session[key]
    else:
        value._creation_time = time.time()

It expires session automatically in 10 minute if user keeps browser idle.

7 Comments
Sudhir Arya (ERP Harbor Consulting Services)
01.07.13, 03:09

Thanks Arif. It really worked.

Santiago
10.07.13, 01:37

Dear Arif, we followed your instructions with no luck, we have only to change this code on /addons/web/http.py ? or are we missing something? Thanks!

Remya
19.07.13, 07:16

@ sudhir. This code doesnt works for me. any other configuration needed?

Sudhir Arya (ERP Harbor Consulting Services)
20.07.13, 12:41

I don't know but this code worked for me.

Odoo
05.02.15, 04:13

How to do this for a particular db,Not for all the db.I mean how to create a custom module for this session time out.What are the steps i can follow please help...

Odoo
05.02.15, 04:15

How to create a new module using inheritance web/http.py method...

Gustavo
01.10.15, 17:05

Thanks arif, this code works for me :D

1
Avatar

Cyril Gaspard (GEM)

--Cyril Gaspard (GEM)--

4314
| 6 6 10
Paris, Frankreich
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM)
24.03.13, 07:57
1 Kommentar
patrick
29.03.13, 09:52

I do get once in a while a message that my session has expired. I use the trunk of V7.0

0

Any solution for odoo10?

thanks...


Regards
Dika,

0
Mohamed arif
24.03.13, 08:00

I see some similar code which keep session for one week. File web/http.py, Line : 435

last_week = time.time() - 60*60*24*7

I am checking these codes.

Thanks

Fragen Sie
Writer
Keep Informed
3 Verfolger
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register