跳至内容
菜单
此问题已终结
1 回复
8355 查看

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

形象
丢弃
编写者

@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 :/

最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
3
7月 25
3016
7
7月 25
50565
0
12月 24
1346
ODOO.sh 已解决
2
10月 24
13278
1
10月 24
2195