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

This is my code:


from xmlrpc import client



url = 'https://ghostinfernalejo-odoo-training-technical-dev-test1-3291583.dev.odoo.com'

db ='ghostinfernalejo-odoo-training-technical-dev-test1-3291583'

username ='Admin'

password ='Admin'



common = client.ServerProxy("{}/xmlrpc/2/common".format(url))

print(common.version())



uid = common.authenticate(db, username, password, {})

print("User ID = ", uid)


This is what my terminal returns : 

{'server_version': '14.0+e', 'server_version_info': [14, 0, 0, 'final', 0, 'e'], 'server_serie': '14.0', 'protocol_version': 1}

User ID = False


please help


アバター
破棄

Make sure you are passing correct user and password.

最善の回答

Hello World Food Industry. What is happening is that your username and password don't match. You are using the demo database, and the admin user is Mitchell Admin. If you go to users and search for Mitchell Admin, you will see that his username is admin, but there is no password set. You can click on Action, choose change password, and set it to admin. Once you do that, you will get the uid which is 2.

アバター
破棄

YES! thank you, this fixed it. if you go in your profile, click the gear next to your name at the top left, and click "change password", the screen that comes up will have the username for your profile that you need to make this work. In my case it was my email.

最善の回答

I am having the same problem

アバター
破棄
最善の回答

Username and password should be "admin". You have "Admin" (uppercase A) in the code posted by you.

アバター
破棄
著作者 最善の回答

hey and thanks for your response, i'm following the technical training and l follow exactly the video tutorial but my still got this error, i'm on the demo plateform i don't know what to do

please really need help it's on day 10

アバター
破棄