Skip to Content
Menu
This question has been flagged
1 Reply
6312 Views

Hello,


I am integrating an Odoo instance (hosted on Odoo.sh) with my company backend (communication is made via xmlrpc) and i would like to know if there is a way to retrieve the database name of my instance.

I access to my Odoo instance with the following endpoint : my-company.odoo.com and it looks like the database name is something like my-company-XXXXXXX. With XXXXXX changing everytime a build is made. This is problematic because i need to be able to specify the odoo database name in my backend to communicate with it.


Do you know how to solve this problem ?


Thanks

Avatar
Discard
Author

@Niyas

Thanks for your super fast answer.


Indeed i did not make the attempt (yet) on the main branch. What you say reassures me.


Actually i planned to trigger automatically a new build on staging every day to have a fresh copy of the production environment on my staging environment so the "update previous build" solution will not work for me.


I noticed the following endpoint : https://www.odoo.sh/project/json/builds_per_branch that returns everything i need, but this is undocumented so i imagine that this api might change at anytime :/

Best Answer

Hi,

if you are in the production branch, the database name will not get changed in the each commit. Seems you might be in staging or development branch.


If you don't need to get new build after each commit, you can make change in your odoo sh settings, click on your branch name, then click on the settings, there you can see the option named:  Behavior upon new commits, set it as Update Previous Build.


To get the database name, you can activate the developer mode, then you can see the db name at the top right of the screen, near logged in user name.


Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Dec 24
41
ODOO.sh Solved
2
Oct 24
2658
1
Oct 24
268
1
Sep 24
286
8
Aug 24
46710