Ir al contenido
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Inicia sesión
  • Nederlands English (US) Español (AR)
  • Contáctanos
  • Inicio
  • Blog
  • Empleos
  • Contáctanos
Cafayate.Net
  • 0
  • 0
    • Inicio
    • Blog
    • Empleos
    • Contáctanos
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Inicia sesión
  • Contáctanos

Website not selectable at more than one databases #1401 Odoo

  • Todos los blogs
  • Tech Blog
  • Website not selectable at more than one databases #1401 Odoo
  • 5 de marzo de 2021 por
    Administrator

    I have installed two databases (company1 and company2) at my local odoo installation and at both the module website is installed. When calling the url “localhost:8069” always the last website, at which I was logged in last, is shown. It is not possible to call a specific website. I tried to select the database in the url (for example “http://localhost:8069/?db=company2”) but this also doesn’t works.

    How is it possible to call a specific website with a url? Can you please implement the db-filter for the website module, that “http://localhost:8069/?db=company2” starts the website from the database company2?

    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:


    ServerName first.localhost
    ProxyPass / http://localhost:8069/
    Header add X-ODOO_DBFILTER “company1”
    RequestHeader add X-ODOO_DBFILTER “company1”


    ServerName second.localhost
    ProxyPass / http://localhost:8069/
    Header add X-ODOO_DBFILTER “company2”
    RequestHeader add X-ODOO_DBFILTER “company2”

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

    thanks for your information. Is this also working with physical domains, not only with virtual domains? I have two companies installed at one odoo installation. And each company has their own domain (www.company1.com for DB “company1” and www.company2.com for DB “company2”). My idea is to use the domain www.company1.com for the website-module of DB “company1”, www.company2.com for the website-module of DB “company2” aso.

    The other way to change the current database without use the dbfilter_header module is to access the url /web/database/selector
    Eg. http://localhost:8069/web/database/selector

    en Tech Blog
    ‘Extension Manager’ App
    Helps You Install and Manage GNOME Shell Extensions

    Diseñado para empresas

    Somos un equipo de personas apasionadas cuyo objetivo es mejorar la vida de todos a través de productos revolucionarios. Creamos grandes productos para resolver sus problemas empresariales. Nuestros productos están diseñados para pequeñas y medianas empresas dispuestas a optimizar su rendimiento.

    Contáctenos

    Plantexel
    Pedernera
    Salta Capital 
    Argenina

    • +31 653-919-302
    • [email protected]
    Síganos
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)