Márcio Lopes's picture

Hello,

I'm Márcio, and i install a odoo appliance in virtualbox, this is for test porpose, i made the instalation of appliance, everythin ok, define the passwords on first run, and can login on webmin and adminer, but when i create a new database on odoo, i cant use that database, only the default odoo, but on webmin i see that the new database is created, how can i use the new database?

 

Thanks in advance

 

Márcio lopes

Forum: 
Jeremy Davis's picture

Hi there Márcio. What a great question, thanks for asking. FWIW, I wasn't aware myself, so I've fired up a v15.0 Odoo appliance and had a look.

It turns out that our default config is not ideal. I'll detail how to get it to work here, but FWIW I've also opened a feature request to improve our default config in the next release.

To support viewing/selecting any database from those that are available, please run the following:

sed -i "/^db_name/ s|=.*|=|" /etc/odoo/odoo.conf
service odoo restart

If you'd like to make it open your new DB by default (assuming the new DB is named NEW_DB), then run this:

DEFAULT_DB="NEW_DB"
sed -i "/^db_name/ s|=.*|= $DEFAULT_DB|" /etc/odoo/odoo.conf
service odoo restart

FWIW you can use regex to limit access to specific DBs (again within the config file) by setting the 'dbfilter' option.

E.g. if you want only DBs that are named starting with the string 'public_' (e.g. DBs like 'public_new_db' and 'public_odoo') then edit the dbfilter = line in the config file to look like this:

dbfilter = public_

Or only allow DBs that start with a number (e.g. DBs like '1newDB' or '999_cutom_db':

dbfilter = \d

('\d' is any digit)

I hope that helps. :)

Add new comment