Deployment

Production Prerequisites

  • Odoo 18 on a Linux server (Debian/Ubuntu recommended)
  • PostgreSQL 16
  • Python 3.12 with virtualenv
  • Nginx as reverse proxy
  • SSL/TLS (Let's Encrypt recommended)

Module Installation

# Go to the addons directory
cd /opt/odoo/kalpana-addons

# Pull the latest version
git pull origin main

# Restart Odoo and update the module
sudo systemctl restart odoo
# or
python odoo-bin -c /etc/odoo/odoo.conf -d your_db -u airdoo --stop-after-init

Python Dependencies

source /opt/odoo/venv/bin/activate
pip install google-auth google-auth-oauthlib google-api-python-client html2text

Post-Installation Configuration

After installing the module on the production database:

  1. Configure product items (Accommodation Nights, Cleaning Fee)
  2. Connect Gmail (Google Cloud account + credentials.json)
  3. Create accommodations with their Airbnb Listing Name
  4. Configure the API: retrieve the Native API Key from settings
  5. Configure the webhook secret for external integrations

Next.js Environment Variables

# .env.local (never committed)
AIRDOO_API_URL=https://your-odoo.com
AIRDOO_API_TOKEN=your_native_api_key
AIRDOO_WEBHOOK_SECRET=your_webhook_secret

# Stripe (if direct bookings)
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...

Nginx — SSL + Proxy Configuration

server {
    listen 443 ssl;
    server_name your-odoo.com;

    ssl_certificate /etc/letsencrypt/live/your-odoo.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/your-odoo.com/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:8069;
        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;
    }
}

Module Update

cd /opt/odoo/kalpana-addons/airdoo
git pull origin main
sudo systemctl restart odoo
python odoo-bin -c /etc/odoo/odoo.conf -d your_db -u airdoo --stop-after-init

Backup

Always perform a PostgreSQL backup before an update:

pg_dump your_db > backup_$(date +%Y%m%d).sql


← Back: Testing | Next: FAQ →