Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
10441 Переглядів

Hi,

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 ?

Аватар
Відмінити
Найкраща відповідь

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.

Аватар
Відмінити
Найкраща відповідь

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.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
черв. 15
4708
2
трав. 15
8384
0
бер. 15
11581
1
бер. 17
4330
1
бер. 15
8197