Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1672 Переглядів

Using Odoo 14 hosted at odoo.sh. 

When using the XML-RPC API, searching a specific model, report.stock.quantity, results in either an HTTP 502 BAD GATEWAY error after about 15 minutes or a negative ID is returned. Searching other models works as expected. Any tips on how to debug this issue or to alleviate whatever is causing the search query to take too long will be greatly appreciated. Below is a code snippet showing the query. Thank you.


import xmlrpc.client


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

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

odoo_models = xmlrpc.client.ServerProxy('{}/xmlrpc/2/object'.format(url))


model = 'report.stock.quantity'

res = odoo_models.execute_kw(db, uid, password, model, 'search', [[]], {'limit': 1})

print(res)

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
4
черв. 25
1962
1
черв. 25
807
0
лют. 25
888
1
лист. 24
1701
1
лист. 24
993