コンテンツへスキップ
メニュー
この質問にフラグが付けられました
12528 ビュー

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)

アバター
破棄
関連投稿 返信 ビュー 活動
3
9月 21
11385
2
7月 24
1241
2
3月 24
3452
2
12月 23
14630
0
10月 23
33