Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Simple requirement: When an anonymous user visits the website, I want it to default to a specific website/database so they don't have to choose the database before even seeing the site... which is a really bad experience, clearly.
However, I do want to have multiple databases that can be selected by users of Odoo when they log in (or are identified by the domain name used).
I have tried setting the db_name in the configuration, which has no effect, other than to provide a default for module installations etc.
I have tried setting the dbfilter, as follows:
- This correctly selects the exact db, but hides all the others from the selector, and is not dynamic based on domain name, therefore I am really stuck with a single DB with this approach.
dbfilter=^%h$ (which is supposed to be the variable for the full host.domain.tld name)
- This just does not work. I have set my db name as: domainname, domainname.tld (exactly as it appears in the browser) and domainname-tld (as per some tip in a community thread on this topic). In every case, it asks me to create a new database.
As I have a naked/bare domain (no www) I cannot use the %d variable, as this only provides the hostname part of the domain name.
I am using nginx and hosting odoo inside a docker container - the nginx proxy pass info set as such:
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
So, I assume I am passing the hostname correctly.
There appears no other way to make this work, but suggestions welcome.
Can you confirm a) is this possible, b) have I got my configuration correct, or c) is this a bug?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 6/5/16, 9:11 AM|
|Seen: 2054 times|
|Last updated: 10/24/16, 5:23 AM|