Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3648 มุมมอง

I want to create a database on remote server with xmlrpc 
I tried with  erppeek with   this code :

url = 'http://testodoo.com'
db_name = 'test_rpc'
password = 'test123'

client = erppeek.Client(server=url)
current_databases = client.db.list()

if db_name in current_databases:
raise ValidationError('Name of the Database is existing, Please choose another name.')
else:
client.create_database(password, db_name)
but it gives me error "Access Denied " , I think it need master password but I don't Know where I should write it 
I also tried with localhost and it works fine without master password 

so if any one has a script to create remote database or can fix my code I will be thankfulll.
อวตาร
ละทิ้ง
ผู้เขียน

Niyas Raphy
Thank you so much man, you are a great man.
this my first question I can not mark your answer as a best answer
so accept my thankful here.

คำตอบที่ดีที่สุด

Hi,

If you have configured master password for the odoo instance, you have to pass this password while calling the create_database function.


See Below from the doc:

Client.create_database(passwddatabasedemo=Falselang='en_US'user_password='admin'login='admin'country_code=None)[source]

Create a new database.

The superadmin passwd and the database name are mandatory.


If you are not aware of master password, you can get it from the conf file of the remote server.


Get Odoo master password:  https://www.youtube.com/watch?v=SJlM6jUslxk

Thanks

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
มิ.ย. 20
4568
0
ม.ค. 17
2621
1
ก.ค. 25
1424
1
พ.ค. 22
3285
0
พ.ค. 22
2271