This question has been flagged
3 Replies
11782 Views

I am creating an external app which will create .txt files with the data that I have in the Odoo database. I want to know how I can connect to the Odoo.sh database since I don't have an IP address or at least I don't know where to find it... Thank you 

Avatar
Discard
Best Answer

How are you trying to connect the Odoo/database? Using XML/JSON RPC or something else?

Avatar
Discard
Author

I was thinking in trying to connect directly to the database using the 'psycopg2' library in python and providing all the parameters that are necessary to make a successful connection (db name, db user, db password, db host and db port) but I don't know where I can find this information in Odoo.sh... I don't know if this is the correct way and also I haven't tried or thought about using XML or JSON... is this a recommended way to do try the connection? Thank you very much for your time

Best Answer

"This is not possible because the Odoo hosting platforms (Odoo Online and Odoo.sh) do not expose the postgresql clusters to the internet.

If you need to communicate with a third party system/application (E-commerce, BI reporting, ...), you will need to setup the integration at the http layer.

Keep in mind that in case you need to periodically import data into an Odoo.sh database, you should use the #load() method of the model you want to import into (instead of making one rpc request per row to create/update) otherwise the requests might be rate limited."

https://www.odoo.sh/faq#system_administrator

Odoo databases that are hosted by us do not have static IP addresses due to high availability / load balancing requirements. 


Avatar
Discard
Author

Thank you very much, this was very helpful!

Where can I find documentation abount the load method ? I didn't found it.

The load method documentation I could find is the old (v7) version at https://doc.odoo.com/trunk/server/06_misc_import but you can see an example at v14 of this method being used to load a large JSON data file at https://github.com/odoo/odoo/blob/14.0/odoo/addons/test_impex/tests/test_load.py#L1072

Best Answer

How am going to link odoo inventory with quikbook?

Avatar
Discard