Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
12774 Zobrazení

Hi am trying to connect odoo via Rest API all the credentials was correct still am getting this error. Xmlrpc is working fine. 

import requests

url = 'http://x.x.x.x:8069'

headers = {
'content-type': 'application/json',
'charset':'utf-8'
}

username = 'admin'

data = {
'params':{
'fields': ['id','password'],
'domain': [('login','=', username)],
}

session = requests.Session()

​try:
    session.get('%s/api/res.users'%url, data=data, headers=headers)
except ConnectionError as ce:
    print(ce)

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
zář 21
11556
2
čvc 24
1414
2
bře 24
3663
2
pro 23
15036
0
říj 23
33