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

How do I specify database in odoo Controller 

my code:

@http.route('/test/', type='http', auth='public', website=True, db='test')    

​def index(self, **kw):        

​return "Salutation"


this is what I did and then if I went to localhost:8069/test/ I got 404 Not found error.
but if I go to localhost:8069/database/selector and select the database I get the right response.
How do I specify the database in odoo Controller rather than select it manually from the browser

Avatar
Discard
Best Answer

Hello,

Instead of specifying the database in the odoo controller, you can use the dbfilter in the conf file.
add dbfilter = your_database_name in your odoo config file.

Thanks,
info@creyox.com

Avatar
Discard