Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
11 ตอบกลับ
101096 มุมมอง

Actualy, I posted the same question here () But Since it got no response .. I repost it here, I apologie for this.

Version : OpenErp 7

I create 2 db : db1 and db2

I also have hostname setup on my dns server ; db1.erp.bno db2.erp.bno

and in my /etc/openerp/openerp-server.conf , I put :

list_db = False To disable the DB choice list, and
db_filter=^%d$ In hope that web UI will select the db in regards of hostname (first part of FQDN)

But both didn't work ,the DB choice list still there.

My installation is in ubuntu using apt-get

Kindly please give me your enlighten

Sincerely

-bino-

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

That is bug already know, as Danimar says

But I think hack the code is always not a good option.

You can use server startup with parameter --db-filter as: '%d' or '^%d' or even '^%d$'

The value is a regular expression, you may use %d for a hostname part of domain or %h to full domain name.

E.g.

domain = hostname.domainname.com

OpenERP replaces like:

%d = hostname

%h = hostname.domainname.com

The '^' means start of line and the '$' end of line, so '^%d$' only filter db with name 'hostname' following the example.

Starting the server with:

openerp-server --db-filter='^%d'

Filter name of any db starting with "hostname" domain part.

อวตาร
ละทิ้ง

Hi Phoebe, As Thierry BOULOGNE have said you can do: ''' DAEMON_OPTS="-c $CONFIGFILE --db-filter=^%d$" ''' But in debian family like ubuntu, mintlinux and etc you can do that change this configuration in: ''' /etc/default/openerp ''' This setting are environment variables to openerp-server daemon, this variable added or changed in that file will be availbale to /etc/init.d/openerp script.

คำตอบที่ดีที่สุด

This a known bug with a fix of 3 characters. https://bugs.launchpad.net/bugs/940439

Just change in config.py the line where it adds the dbfilter option from: group.add_option("--db-filter", dest="dbfilter", default=".", to group.add_option("--db-filter", dest="dbfilter", my_default=".",

There is a merge proposal in the bug with this change, but is too hard to do that :)

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

dbfilter = example-com (DB name)

Give this in the .conf file ,

it will works. :)

อวตาร
ละทิ้ง

Hi i have a Test and Ecommerce db, my domain is www.simpleenergytech.com. when i enter this i want to connect Ecommerce db. How i can do this ? In which file need to make change ?

you need to find the odoo configuration file,

its location is based on your installation,

preferable is go to /etc/odoo.conf

In the file please add a line,

dbfilter = Ecommerce

คำตอบที่ดีที่สุด

Hello,

Another way to do it is to change the initscript (debian/ubuntu) :

DAEMON_OPTS="-c $CONFIGFILE --db-filter=^%d$"

You could make this change into : /etc/init.d/openerp-server (replace with your init script name).

And then restart opener server.

Works great :-).

Regards

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi all,

May be this help you.

We find a solution for use %h and subdomain, create your db in replace '.' by '-'.

Example : for the domaine erp.pharmacy.com, create db erp-pharmacy-com

And in your file .conf, at line dbfilter, write this : dbfilter = %h

Works for Odoo v8

อวตาร
ละทิ้ง

Hey, does it work for a domain name mapping ? I want to map example.com to my database, so I created the database like : example-com as you said, and set : db_filter = ^%h$ but it doesn't work. Thanks for help.

คำตอบที่ดีที่สุด

Hi bino

Since OpenERP-Server didn't recognize this param in openerp-server.conf , you need to specify it in start command

openerp-server --db-filter ^%d$ -s /etc/openerp/openerp-server.conf

I've tested it on my computer and it works . You can have try .

Alex

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

-r yourpassword-w yourpassword -d my_data_base--db-filter= my_data_base --xmlrpc-port=8069 --db_host=localhost --addons-path=justice_addons --update=all

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ส.ค. 21
16642
2
ต.ค. 16
8907
2
ก.ย. 23
9377
1
พ.ค. 18
4758
3
ม.ค. 25
4331