logo

How to Create a Custom Website Builder Experience in Odoo for SaaS

VH CHAUDHARY

Explore Odoo servicesBook a discovery call

How to Create a Custom Website Builder Experience in Odoo for SaaS

Creating a custom website builder experience in Odoo 18 for a SaaS platform involves multiple layers of development, from extending the website module to managing user onboarding and isolating customer data. This guide walks you through the detailed steps to build a fully functional, multi-tenant website builder system in Odoo 18.


Table of Contents

  1. Overview of Requirements
  2. Prerequisites
  3. Step 1: Create a Custom Module Structure
  4. Step 2: Add a Website Setup Wizard
  5. Step 3: Extend Website Templates & Blocks
  6. Step 4: User Onboarding Flow for SaaS
  7. Step 5: Multi-Tenant Data Isolation
  8. Step 6: Custom Domain & SSL Mapping
  9. Step 7: Billing and Subscription
  10. Step 8: Deploying & Scaling

1. Overview of Requirements

A custom website builder for SaaS should provide:

  • A setup wizard during first login
  • Drag & drop page builder based on templates
  • Tenant-based data isolation
  • Custom domain mapping
  • Integrated billing system

2. Prerequisites

  • Odoo 18 Community or Enterprise version installed
  • Python and PostgreSQL setup
  • Knowledge of Odoo module development
  • Understanding of website builder and controller system in Odoo

3. Step 1: Create a Custom Module Structure

odoo-addon-custom_website_builder/
├── __manifest__.py
├── __init__.py
├── models/
│   └── website_config.py
├── wizards/
│   └── website_setup_wizard.py
├── views/
│   ├── wizard_views.xml
│   └── website_templates.xml
├── controllers/
│   └── main.py
├── static/
│   └── src/
│       └── js/
│           └── custom_blocks.js

manifest.py:

{
    "name": "Custom Website Builder for SaaS",
    "version": "18.0.1.0.0",
    "depends": ["website", "web", "portal", "sale_subscription"],
    "data": [
        "views/wizard_views.xml",
        "views/website_templates.xml",
    ],
    "assets": {
        "web.assets_frontend": [
            "custom_website_builder/static/src/js/custom_blocks.js",
        ]
    },
    "installable": True,
    "auto_install": False,
}

4. Step 2: Add a Website Setup Wizard

Create a wizard that opens automatically after a new website is created.

website_setup_wizard.py:

from odoo import models, fields, api

class WebsiteSetupWizard(models.TransientModel):
    _name = 'website.setup.wizard'
    _description = 'Website Setup Wizard'

    name = fields.Char(string="Website Name")
    theme_id = fields.Many2one('website.theme', string='Select Theme')

    def action_setup_website(self):
        website = self.env['website'].create({
            'name': self.name,
            'theme_id': self.theme_id.id,
        })
        return {
            'type': 'ir.actions.act_url',
            'url': '/web#id=%s&model=website' % website.id,
            'target': 'self',
        }

5. Step 3: Extend Website Templates & Blocks

Add custom drag & drop blocks.

website_templates.xml:

<odoo>
    <template id="custom_block" inherit_id="website.snippet_options">
        <xpath expr="//div[@id='snippet_structure']" position="inside">
            <t t-snippet="custom_website_builder.custom_text_block" t-thumbnail="/path/to/image.png"/>
        </xpath>
    </template>

    <template id="custom_text_block">
        <section class="s_custom_text">
            <div class="container">
                <h2>Custom Headline</h2>
                <p>This is a custom block</p>
            </div>
        </section>
    </template>
</odoo>

6. Step 4: User Onboarding Flow for SaaS

  • On user sign-up, create a unique website instance.
  • Use default templates and pre-defined themes.

main.py (controller):

from odoo import http
from odoo.http import request

class WebsiteSaaSController(http.Controller):

    @http.route('/website/saas/setup', type='http', auth='user')
    def website_setup(self, **kw):
        request.env['website.setup.wizard'].create({})
        return request.render('custom_website_builder.website_setup_template')

7. Step 5: Multi-Tenant Data Isolation

Use Odoo’s multi-website support + database-level tenant scoping:

  • Attach all models (pages, assets, config) to website_id
  • Restrict queries via @api.model decorators

Example:

@api.model
def create(self, vals):
    vals['website_id'] = self.env['website'].get_current_website().id
    return super().create(vals)

8. Step 6: Custom Domain & SSL Mapping

Use Odoo’s website.domain field and setup Nginx reverse proxy with SNI-based SSL.

  • Update ir.http to match domain with website instance
  • Map domains in Nginx:
server {
    listen 443 ssl;
    server_name client1.pysquad.com;
    ssl_certificate /etc/ssl/client1.crt;
    ssl_certificate_key /etc/ssl/client1.key;

    location / {
        proxy_pass http://localhost:8069;
    }
}

9. Step 7: Billing and Subscription

Use sale_subscription:

  • Create subscription products for website packages
  • Trigger provisioning on subscription confirmation

Optional Automation:

  • Auto-disable website on expired subscription
  • Send renewal email via mass_mailing

10. Step 8: Deploying & Scaling

  • Use Docker or systemd for service management
  • Nginx as frontend load balancer
  • PostgreSQL replication for scale
  • Cloudflare for DNS & SSL automation
  • Add Redis for caching if needed

11. Where PySquad Can Help

At PySquad, we've helped SaaS platforms successfully build and scale Odoo-based website builders tailored to industry needs. Here’s how we can support you:

  • Turnkey Development: From architecture to deployment, we build custom SaaS-ready website builder modules.
  • Odoo Customization: We create bespoke templates, snippets, and wizards tailored to your niche.
  • Multi-Tenancy Setup: Expert-level implementation of website/data isolation, domain routing, and security.
  • Subscription & Billing Integration: Seamless product plans with automated workflows.
  • DevOps Support: Nginx/SSL, Docker setup, multi-instance scaling, and cloud integrations.
  • Ongoing Maintenance: SLA-based long-term support and enhancements.

If you're planning to launch or enhance your SaaS with a website builder, our team is ready to collaborate. Visit pysquad.com or reach out to solutions@pysquad.com to discuss your vision.

Conclusion

With the steps above, you can build a scalable and user-friendly SaaS website builder in Odoo 18. This tutorial gives you the base system, extend it with analytics, content moderation, template marketplaces, and more as your SaaS grows.

For advanced help or implementation, you can collaborate with a development team experienced in Odoo and SaaS architecture.

About our Odoo practice

We implement, customize, and support Odoo for operations-heavy teams across retail, manufacturing, logistics, and services. Phased delivery, clear ownership, and support that continues after go-live.
View Odoo services