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

How to setup multiple websites in Odoo V8

  • Alle blogs
  • Tech Blog
  • How to setup multiple websites in Odoo V8
  • 5 maart 2021 in
    Administrator

    Odoo’s Lead Developer responds to this question (Please note that this is a very technical feature and is not yet easy to configure nor is it documented how to do it.)

    Post 1:
    Multi website was already planned since the first commit, it was just hard-coded to 1 in that commit. In saas-6 and master multi-website is supported for the 8.0 branch there is a non-official module with a backport of the feature in odoo-extra

    https://github.com/odoo/odoo-extra/tree/8.0/website_multi

    Post 2:
    The actual magic is here:
    https://github.com/odoo/odoo/tree/saas-6/addons/website/models/website.py#L386 in v8, 1 is hard-coded instead.

    There is another piece of magic, the one that resolve template name, instead of using xmlids in 8.0 we now use a key field on ir.ui.view and there is an optional website_id column on ir.ui.view.

    https://github.com/odoo/odoo/tree/saas-6/addons/website/models/ir_ui_view.py#L156

    Post 3:
    The documentation about it is non-existent, it works like virtual domains you odoo will select the website that match the right domain based on the Host: header.

    Then if want to have a different page you can duplicate the ir.ui.view template (so both have the same key) and set a different website_id for each one.

    So that you can choose which template you want to differentiate and which ones should stay common.

    To display different product for example you need to create an additional public user (on the second website (field user_id)) and use record rules.

    This is a very advanced functional topic, like multi-company.

    in Tech Blog
    Diagnosing Network Issues with MTR

    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)