Odoo Aide

3

4
17 Réponses
3
Mohamed arif Inde
13/05/2013 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 Commentaires
Sudhir Arya (ERP Harbor Consulting Services) Inde
01/07/2013 03:09

Thanks Arif. It really worked.

Santiago Équateur
10/07/2013 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 Inde
19/07/2013 07:16

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

Sudhir Arya (ERP Harbor Consulting Services) Inde
20/07/2013 12:41

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

Odoo Inde
05/02/2015 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 Inde
05/02/2015 04:15

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

Gustavo Mexique
01/10/2015 17:05

Thanks arif, this code works for me :D

1
Avatar

Cyril Gaspard (GEM) France

--Cyril Gaspard (GEM)--

4334
| 6 6 10
Paris, France
--Cyril Gaspard (GEM)--

Forum contributor since 2008

Cyril Gaspard (GEM) France
24/03/2013 07:57
1 Commentaires
patrick Pays-Bas
29/03/2013 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 Inde
24/03/2013 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

Poser une question
Writer
Étiquettes
Keep Informed
3 Abonné(e)s
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
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now