Odoo Help


This community 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.


get session_id using XMLRPC

on 4/4/13, 3:18 PM 1,842 views


Using a JAvaScript Library for XMLRPC (Mimic), I tested my authentification with success. The return message with success : <value><int>1</int></value>

And if failed: <value><boolean>0</boolean></value>

How can I get the session_id ? I don't think that 1 is the session id, is it ?


Francesco OpenCode

--Francesco OpenCode--
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 4/4/13, 3:25 PM

1 (in you case, probably you are using admin user) is the uid (user id). It's important because is the id used by openERP to manage create and write (and other operation). If you read the code you can see that uid is passed to all the functions. You don't need session_id because you have a connection and the uid yet.

On 4/4/13, 4:43 PM

The session object is defined as follows:

def __init__(self):
    self._creation_time = time.time()
    self._db = False
    self._uid = False
    self._login = False
    self._password = False
    self._suicide = False
    self.context = {}
    self.jsonp_requests = {}

session.authenticate returns the UID so for all practical purposes this is the session id.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 4/4/13, 3:18 PM
Seen: 1842 times
Last updated: 3/16/15, 8:10 AM