Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1820 Lượt xem

Hello

I've been trying to "communicate" with my odoo database by a Python script seen below, and after running the script, I get the error "unsupported XML-RPC protocol", While the xmlrpc.client seems to be already installed on my local computer.


Here is the code:


url = "mydburl\\.com"

db\ =\ 'mydb'

username\ =\ 'admin'

password\ =\ 'admin'

import\\ xmlrpc\\.client

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

version = common.version()

print("details...", version)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

Please refer the below forum answer, It provides details on how to connecting to an Odoo 16 database from Python 

https://www.odoo.com/sl_SI/forum/pomoc-1/connecting-to-an-odoo-16-database-from-python-221917


Hope it helps

Ảnh đại diện
Huỷ bỏ