SaaS Base

by ,
v 12.0 Third Party 15
Download for 12.0 series Deploy on
You bought this module and need support ? Click here !
Technical name saas
Included Dependencies
License: AGPL-3

SaaS Base

Base module for master SaaS instance.

The module is similar to saas_portal in odoo-saas-tools.

Models overview

  • saas.template -- similar to saas_portal.plan in odoo-saas-tools, but covers only technical aspects (database creation) and not any sale/trial stuff. A single record can be used for multiple servers (via saas.template.operator.
  • saas.operator -- similar to saas_portal.server in odoo-saas-tools. Credentials to create-destroy, update, migrate, backup, etc. odoo instances.
    • It doesn't need special odoo instance (database, SaaS Server in terms of odoo-saas-tool project) in corresponding server and could work by sending requests, for example, to kubernetes.
    • Single operator is only one set of modules at some versions. If you have a server which is used for different versions of odoo or just module version, then you need you to create saas.operator per each module set. Those operators may use same credentials.
    • Different Operators may have same postgresql scope. It's usefull in staging when we apply a database for new versions of modules. On the other hand, it force us to have unique database names across operators
  • saas.db -- similar to saas_portal.client in odoo-saas-tools
  • saas.log -- saas history, e.g. database creation, updating, etc.


  • TODO: Create menu for SaaS Operator
    • smart button for builds list
  • TODO: Create menu for SaaS Log model
    • saas.db form: add smart button for saas.log's
    • saas.operator: add smart button for saas.log's
  • TODO: Add check uniqueness of database name across saas.db records with state == done. Also check that there is no records of saas.db with name equal to one that user wants to use in use in wizard, saas template operator.

  • TODO: Make the saas.template form duplicable again

  • TODO: Add page refresh button on saas.template form

  • TODO: saas_test: add database creation rollback and extra safety:
    • setUp: prepare list of database names that will be created during the tests. Check that those databases don't exist and raise error otherwise
    • use random suffix to avoid droping database reserved for production purposes during test execution, e.g. template_database_ecusnc63asdf234
    • tearDown: drop created databases after test exectuion
  • TODO: Add coverage for "Connect to the build" button:
    • get authentication on master database in requests' session (use authenticate method from odoo/tests/
    • open "connect to build url"
    • check that you are finally redirected to /web page at the build
  • TODO: add computed record in saas.db model to avoid using the name of the master database. Some new db type is needed. Say, ('other', 'Reserved DB Name')

  • TODO: saas.operator: add a button that runs a wizard which allows to make new build (saas.db) from backup; add a method in saas.operator which takes the backup as argument; implement the method for "Same Instance" operator




Further information


Usage instructions: doc/index.rst

Changelog: doc/changelog.rst

Notifications on updates: via Atom, by Email

Tested on Odoo 12.0 7b1a894573b1499e9ea563f500c866378a65e1ca

SaaS Base


  • Follow instruction of Job Queue module.
  • Install this module in a usual way
  • Restart the odoo as required by the Job Queue module


  • Use db-filter=^%d$ when using Same Instance type in saas.operator model


Create template

  • Open menu [[ SaaS ]] >> Templates
  • Click [Create]
  • Fill in the required fields including Template's deployments

Create build

  • Wait until at least one of Template's deployments is ready (refresh the page)
  • Click [Create build]
  • Fill in required fields in a popup window
  • Click [Create build] and then you will be redirected to the build form
  • Wait for the creation of the build on the template (refresh the page)
  • Click [Connect to the build]
  • RESULT: you will be redirected and logged in to the created build

Delete created build

  • Open menu [[ SaaS ]] >> Builds
  • Open the build you want to delete
  • Click on Action, then press Delete
  • After confirming the action, the build will be deleted

Delete created Template's deployment

  • Open menu [[ SaaS ]] >> Templates
  • Open the Template in which you want to make changes
  • Click on Edit
  • Choose Template's deployment line you want to remove and click on the delete icon on the right

Template Changes and rebuild Template's deployments

The template will be rebuilt automatically during the following steps:

  • Open menu [[ SaaS ]] >> Templates
  • Open the Template in which you want to make changes.
  • Make the changes you need.
  • If among the changed fields there are Install demo data, Modules to install or Template Initialization then Template's deployment will be rebuilt.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.