Toggle navigation

Instruction for manual installation

Use saas.py script for automatic installation

  1. Configure Odoo installation

    • set dbfilter in config file or run odoo with --db-filter parameter, e.g. ^%h$

      • be sure, that you don't use db_name in config file and don't run odoo with -d (--database) parameter
      • check odoo documentation for understanding db filter and database parameters.
    • execute commands below to allow create databases with dots in name:

    cd path/to/odoo

    sed -i 's/matches="[^"]*"//g' addons/web/static/src/xml/base.xml

    • If you run odoo locally, add domains you are going to use to /etc/hosts. E.g.

    127.0.0.1 odoo.local # portal

    127.0.0.1 s1.odoo.local # server

    127.0.0.1 t1.odoo.local # template

    127.0.0.1 t2.odoo.local # template

    127.0.0.1 client-x.odoo.local

    127.0.0.1 client-y.odoo.local

    127.0.0.1 client-z.odoo.local

    • Redirect requests to domains above to localhost:8069 (e.g. via nginx)

      • be sure, that odoo gets host header, e.g. for nginx:

    proxy_set_header Host $host;

    proxy_set_header X-Real-IP $remote_addr;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_set_header X-Forwarded-Proto $scheme;

    • install dependencies:

      • oauthlib:

        • pip install oauthlib
      • requests

        • pip install requests --upgrade
  2. Create two databases (via /web/database/manager):

    • Main Database, e.g. odoo.local: * install saas_portal and saas_portal_* (optional) modules
    • Server Database, e.g. s1.odoo.local * install saas_server
  3. Configure Server Database * Activate the developer mode via "(?)/About" menu at the top right-hand corner * Open Settings/Users/OAuth Providers - SaaS

    • click [Edit]
    • update domain name at "Authentication URL" and "Validation URL", change http to https if needed. E.g.

      • http://odoo.local/oauth2/auth
      • http://odoo.local/oauth2/tokeninfo

        • Edit Body according to your brand
        • click [Save]
    • remember value of Client ID field. It's a database.uuid of SaaS Server.
  4. Configure Main Database: * open Settings/SaaS Portal Settings

    • set Base SaaS domain, e.g. odoo.local
    • click Apply (do it even if you didn't make changes)
  5. Register Server Database in Main Database

    • open SaaS/SaaS/Servers

      • click [Create]
      • set Database Name, e.g. s1.odoo.local
      • fix autogenerated Database UUID to actual one (see previous section)
      • click [Save]
  6. Create Plan

    • open Saas/SaaS/Plans

      • click [Create]
      • set Plan's name, e.g. "POS + ECommerce"
      • set SaaS Server
      • set Template DB: type name, e.g. t1.odoo.local, and click Create "__t1.odoo.local__"
      • click [Save]
      • click [Create Template DB].
      • wait couple minutes while Database is being created.
      • click [Sync server]
  7. Prepare Template Database for Plan

    • click [Log in to template DB] at Plan's form

      • click log in link
    • install modules that will be used for Plan, e.g. point_of_sale, website_sale
    • make any other changes in database if needed. E.g. configure chart of accounts.
    • open Settings/Users/Users - onwer_template. Configure Access Rights for Owner.
  8. Try to create database from template

    • open SaaS/Saas/Plans - select plan

      • click [Create Client]
      • set DB Name, e.g. client-x.odoo.local
      • click [Create]
      • wait couple minutes while Database is being created.
      • click [Sync server]
    • open SaaS/SaaS/Client - choose client

      • click [Configure]

        • open Parameters tab
        • add parameter "Max Users", set Value 2
        • click [Execute]
        • click [Close]
        • click [Log in]
        • you see created database
        • try to create new user to test "Max Users" setting
  9. Get more

    • check description of other saas_* modules to get more features