¡BIENVENIDO AL FORO DE ODOO ARGENTINA!

BRINDAMOS UN ESPACIO A LA COMUNIDAD ARGENTINA DE ODOO PARA CENTRALIZAR EL DEBATE, COMPARTIR IDEAS, DESARROLLOS, Y FORMAR PARTE DE UNA COMUNIDAD QUE CRECE DÍA A DÍA

¿No estás registrado?  REGISTRATE

Se marcó esta pregunta
1 Responder
2756 Vistas

Hola, queria saber si alguno me puede ayudar con algo.

en una instancia de odoo tengo dos bases de datos y cada una con su sitio web (site builder), el problema es que quiero que cada cual sea accesible con URL diferentes, para ello hay una guia que explica perfectamente como hacer esto con apache que me gustaria compartir.

Hi.
I had a similar problem: multiple databases (with installed websites) on the same host and sharing the same Odoo installation. I solved installing the 'dbfilter_from_header' module.
This module catchs an header (HTTP_X_ODOO_DBFILTER) and uses its value as db-filter. 

In my scenario I configured Apache (but you can use any other webservice) to create two virtual domains associated to the same host (http://localhost:8069/) and for each of those domains I defined an 'X_ODOO_DBFILTER' header giving it the DB-name that I wanted link to the specific subdomain. 

Supposing that you use Apache, you should edit the file /etc/httpd/conf/httpd.conf typing something similar:

<VirtualHost *:80> ServerName first.localhost ProxyPass / http://localhost:8069/ Header add X-ODOO_DBFILTER "company1" RequestHeader add X-ODOO_DBFILTER "company1" </VirtualHost> <VirtualHost *:80> ServerName second.localhost ProxyPass / http://localhost:8069/ Header add X-ODOO_DBFILTER "company2" RequestHeader add X-ODOO_DBFILTER "company2" </VirtualHost>

The result is that:

  • If you type 'first.localhost' in your browser, you'll see the website related to the DB 'company1';
  • If you type 'second.localhost', you'll see the website related to the DB 'company2';

Antonio

Basicamente, si mal no interpreto, este Antonio, lo que hace es utilizar dbfilter_from_header ACA LINK: https://www.odoo.com/apps/modules/8.0/dbfilter_from_header/
Si mal no entiendo, meten un parametro al inicio, como podria hacer esto utilizando la instsalacion sobre docker de este sitio?

Un saludo, GRACIAS.

 

Avatar
Descartar
Mejor respuesta

Tendrías que usar un archivo .conf separado del docker. Para lo cual usas en "docker run" el parámetro: 

-v /opt/odoo/conf:/etc/odoo

donde /opt/odoo/conf sería un directorio donde se encuentra tu archivo de configuración y /etc/odoo es el directorio interno del docker donde está el conf estandar. Esto reemplaza el conf que está dentro por el tuyo. Lo más seguro es copiar ese conf y cambiarle los parámetros que necesites. El primer parametro que se cambia es el password "admin" por uno tuyo, mas seguro.

Y el parámetro que vos necesitas setear es éste: 

server_wide_modules=web,dbfilter_from_header

 

Avatar
Descartar