Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

How to set default database for anonymous user?

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
db_filter
2 Besvarelser
9616 Visninger
Avatar
Damian Bere

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:

dbfilter=mydbname

 - 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;

proxy_pass http://prod-odoo:8069/;

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?

 

0
Avatar
Kassér
Ermin Trevisan

Does anyone have any thoughts on this?  

Avatar
Michel Antonise
Bedste svar

Hi Damian,

Did you find a way around this? I'm facing a similar issue.

Thanx.

0
Avatar
Kassér
Damian Bere
Forfatter

Hi Michel,

Unfortunately, no. I assume this is not possible in Odoo 9, despite it seeming like it should be, based on how that functionality is described. We will be rolling out Odoo 10 soon, so will check to see if this works in the latest release.

If you do figure out how to get it to work, I'd love to hear about it :)

Cheers,

Damian

Michel Antonise

After consulting Odoo, it turns out our approach is wrong and I was asking the wrong questions.

We are still in the start-up fase, but the multiple DB issue was already raising a lot of questions.

We have a test copy of our production DB on our production server.

Causing new users having to choose their DB, which we wanted to avoid.

The solution, as simple as it is logical : we should have only 1 database on the production server.

Looking back on this, I can’t see how I missed this.

There are a million reasons why you would want an isolated production environment, without testing stuff on it.

I guess, we got blind sighted because it is so simple to create a duplicate of the production DB and use the copy as a “production like test”.

I hope you can get a solution for your question.

Regards,

Michel

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
Database list only showing 1 database
db_filter odoo.conf
Avatar
Avatar
Avatar
2
sep. 23
10627
How to prevent user select specific db by add ?db=select_db in url ?
list_db db_filter
Avatar
Avatar
Avatar
Avatar
3
aug. 21
17567
Where in code, i can find the db filter function? Løst
db_filter regex
Avatar
Avatar
1
maj 18
5487
Domain based db filter Løst
list_db db_filter
Avatar
Avatar
Avatar
Avatar
Avatar
11
jul. 24
103761
How to set dbfilter in multi-domain, multi-subdomain and multi-database? Løst
db_filter dbfilter odoo16features
Avatar
Avatar
Avatar
3
okt. 25
6014
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now