Symptoms
- Odoo pages load without styling (raw HTML)
- Images and icons are missing
- JavaScript errors in browser console
- Login page works but backend is unstyled
- After module update, styles break
Cause 1: Asset Bundles Need Regeneration
Most common cause. Odoo compiles CSS and JS into asset bundles. After updates, these can become stale.
Fix:
# Option 1: Clear assets via Odoo
# Enable developer mode → Settings → Technical → Assets Bundles
# Click "Clear" to regenerate
# Option 2: Delete assets from database
psql -U odoo -d your_database -c "
DELETE FROM ir_attachment
WHERE name LIKE '%assets%'
AND res_model = 'ir.ui.view';"
# Option 3: Restart with asset regeneration
odoo -d your_database --dev=assetsCause 2: Nginx Not Serving Static Files
When: Static files return 404 through nginx.
Fix:
# nginx configuration
location /web/static/ {
proxy_pass http://127.0.0.1:8069;
expires 7d;
add_header Cache-Control "public, immutable";
}
# Or for direct file serving (faster):
location /web/static/ {
alias /usr/lib/python3/dist-packages/odoo/addons/web/static/;
expires 7d;
}Cause 3: Browser Cache
Fix:
# Hard refresh: Ctrl+Shift+R (or Cmd+Shift+R on Mac)
# Or clear browser cache and cookies for the Odoo domainCause 4: SCSS Compilation Error
When: Custom module has invalid SCSS.
Diagnosis: Check Odoo log for SCSS compilation errors.
Fix: Fix the SCSS syntax error in your custom module, then regenerate assets.
Cause 5: Proxy Mode Not Enabled
When: Running behind nginx but proxy_mode is not set.
Fix:
# odoo.conf
proxy_mode = TrueWithout proxy_mode, Odoo generates URLs with the wrong scheme/host, causing static file URLs to break.
Cause 6: Missing Static File Directory
When: Custom module's static/ directory is missing or permissions are wrong.
Fix:
# Check permissions
ls -la your_module/static/
# Fix permissions
chown -R odoo:odoo your_module/static/
chmod -R 755 your_module/static/Quick Fix Checklist
| Step | Action |
|---|---|
| 1 | Hard refresh browser (Ctrl+Shift+R) |
| 2 | Clear asset bundles in Odoo developer mode |
| 3 | Check proxy_mode = True in odoo.conf |
| 4 | Check nginx static file configuration |
| 5 | Check Odoo log for SCSS compilation errors |
| 6 | Restart Odoo service |
Prevention
DeployMonkey handles nginx configuration, proxy mode, and asset serving automatically. The AI agent detects static file issues and suggests fixes.