Technical mailing list archives


Odoo 9 session management

Farid Shahy
- 25 يناير, 2016 10:26:42
Hi Community

Trying to develop some frontend stuff in for shop, I have a problem with Odoo 9 session object (defined in session.js), the situation is like this:
defined a JS module using odoo.define(), I can set and get cookies in client side. But when trying to get session_id on session object I always get a null value. Intersting point is that the browser has a value for session_id.
Reading through session.js source code, there is some comment at the beginning which says:

* "override_session": Default to false. If true, the current session object will
not try to re-use a previously created session id stored in a cookie.
* "session_id": Default to null. If specified, the specified session_id will be used
by this session object. Specifying this option automatically implies that the option
"override_session" is set to true.

Can somebody please help with this issue?

Thanks in advance

Farid Shahy

Python Developer

Bloopark Systems GmbH & Co. KG