Overslaan naar inhoud
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Aanmelden
  • Nederlands English (US) Español (AR)
  • Contact
  • Startpagina
  • Blog
  • Vacatures
  • Contact
Cafayate.Net
  • 0
  • 0
    • Startpagina
    • Blog
    • Vacatures
    • Contact
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Aanmelden
  • Contact

Website not selectable at more than one databases #1401 Odoo

  • Alle blogs
  • Tech Blog
  • Website not selectable at more than one databases #1401 Odoo
  • 5 maart 2021 in
    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

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

    Ontworpen voor bedrijven

    We zijn een team van gepassioneerde mensen met als doel levens te verbeteren met vernieuwende producten. We ontwikkelen geweldige oplossingen voor al je zakelijke uitdagingen. Onze producten zijn ontworpen voor kleine tot middelgrote bedrijven die hun prestaties willen optimaliseren.

    Neem contact op

    Plantexel
    Pedernera
    Salta Capital 
    Argentina

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