Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3227 Widoki

Hello, 

How do you configure the dbfilter for a multiwebsite installation? 

I have my dbfilter set to ^%d$, which works well as long if I have one one website per database. But now I have one database that has 2 websites, I configured them to be:

1th website: domain.be

2th website: domain-b2b.domain.be

The name of the database is: domain

This works perfect for the 1th site (domain.be) but the second website goes to the 'create database page of odoo' which is the logical thing to do.

So how can I configure the domain filter so that both url's go to the same database. I did chose the url's so that the subdomain of the second site has the name of the first domain included (domain-b2b.domain.be) I hope this helps.

so both domain.be and domain-b2b.be should filter to the same database. 

I saw that oca has a a module that could possibly help, but it looks like it is not available yet for odoo15

Awatar
Odrzuć

I have same the situation, but nothing i tried from documentation or this forum worked. My setting is like this :
one db : my_db with two companies : company1, company2.
I need to set two websites , with two differente domains
company1.com
company2.com
Has any figured out how to do it ?
Regards

Autor

Did you try my sollution bellow? What exactly isn't working?

Autor Najlepsza odpowiedź

I figured out one way of doing this. I don't know if this is the right way to do. 

I changed the dbfilter from ^%d$ to ^%d this way the filter will direct any url that has part or the whole name of the database as the first characters in the subdomain to the database.

So, for my case: I renamed the name of the database to subdomain-b2b

My subdomains are:

subdomain-b2b.domain.be

subdomain.domain.be


Because both of the subdomains have part of the database name in their name they will both be directed to the database. 

This works for now, but let me know if there is a better way to do this. 

Thank you

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
gru 24
5013
0
gru 22
2249
2
maj 24
3164
0
maj 23
939
1
lut 22
2930