Odoo Help


About dbfilter with -

on 5/23/14, 10:22 AM 1,700 views

Hello everybody,

I need some help with dbfilter, the tool on odoo server which redirect to the correct database depending of the web domain. I already manage a complex case but there is still a case I can't make work.

Domain : test.domain.org

Database : oct_test_domain_org

dbfilter : ^oct_%h$

This one works perfectly, but I have another case :

Domain : test-test.domain.org

Database : oct_test_test_domain_org

dbfilter : ^oct_%h$

This one doesn't work, I believe - aren't replaced by _, contrary to the dot.

Same problem if there is a - in the domain :

Domain : test.yolo-consulting.net

Database : oct_test_yolo_consulting_net

dbfilter : ^oct_%h$

What should I do?

On 6/10/14, 4:48 AM

I had no choice but to replace

    r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d)


    r = openerp.tools.config['dbfilter'].replace('%h', h).replace('%d', d).replace('-','_')

in server/openerp/http.py. Not really beautiful but at least it works.

If someone know a way to replace - by _ directly in the regular expression, it would be great.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 5/23/14, 10:22 AM
Seen: 1700 times
Last updated: 3/16/15, 8:10 AM