Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
9149 Näkymät

hello.. is it possible to get a list of DB in odoo from external? (use API)

Avatar
Hylkää
Paras vastaus

Hi,

Use odoorpc library for this,

import odoorpc

# Prepare the connection to the server
odoo = odoorpc.ODOO('localhost', port=8069)
print(odoo.db.list())

odoo.db.list() will return all the db names


Know more about odoo rpc library: OdooRPC: Connect To Odoo Database and Perform All Operations


Thanks

Avatar
Hylkää
Paras vastaus

Hi! I know it's a late reply, just found this URL in Odoo's base code. This answer to anyone who needs it.

You can find this URL:

/web/database/list

Make sure you have "Content-Type" as "application/json" in headers and an empty {} in body. I tested this successfully in Postman.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
elok. 25
485
2
heinäk. 25
2920
3
heinäk. 25
688
1
kesäk. 25
2173
1
elok. 25
1063