Skip to content

Odoo Assets Not Loading (CSS/JS Broken): Complete Fix Guide

DeployMonkey Team · March 22, 2026 11 min read

Symptoms

  • Odoo loads but looks unstyled (plain HTML, no CSS)
  • Buttons don't work (JavaScript not loaded)
  • Console shows 404 errors for /web/assets/*.js or *.css
  • White/blank page after login
  • "Asset compilation error" in logs
  • Only the login page works, everything else is broken

Fix 1: Clear Asset Bundles (Most Common)

# Method 1: UI (if you can access the interface)
# Settings → Technical → Asset Bundles → select all → Delete
# Then reload the page (Ctrl+Shift+R for hard refresh)

# Method 2: Database (if UI is broken)
DELETE FROM ir_attachment WHERE name LIKE 'web.assets%';
DELETE FROM ir_attachment WHERE name LIKE '/web/assets%';
# Restart Odoo
systemctl restart odoo

Fix 2: Browser Cache

# Hard refresh (bypass browser cache):
# Chrome/Edge: Ctrl+Shift+R (or Cmd+Shift+R on Mac)
# Firefox: Ctrl+Shift+R
# Safari: Cmd+Option+R

# Or clear browser cache completely:
# Chrome → Settings → Privacy → Clear browsing data → Cached images and files

Fix 3: Remove --dev Flag in Production

# If running with --dev=all or --dev=xml in production:
# Assets are NOT bundled and minified
# This can cause loading issues and performance problems

# Fix: remove dev flags from production
# Do NOT use: odoo-bin --dev=all in production
# Just use: odoo-bin -c /etc/odoo/odoo.conf

Fix 4: npm / Node.js Dependencies

# Some asset compilation requires Node.js packages:
apt install -y npm nodejs
npm install -g rtlcss  # Required for RTL language support
npm install -g less    # Required for LESS compilation (older versions)

# Check node version:
node --version  # Should be 14+ for Odoo 17+

Fix 5: File Permissions

# Odoo needs write access to compile and store assets:
# Check data directory permissions:
ls -la /var/lib/odoo/.local/share/Odoo/

# Fix:
chown -R odoo:odoo /var/lib/odoo/
chmod -R 755 /var/lib/odoo/

Fix 6: Custom Module Breaking Assets

# A custom module with bad CSS/JS can break all assets:
# Identify the breaking module:

# Check Odoo logs for asset compilation errors:
grep -i "asset\|compile\|scss\|less" /var/log/odoo/odoo.log | tail -20

# Common causes:
# - Syntax error in custom SCSS/CSS file
# - Missing closing bracket in JavaScript
# - Importing a file that doesn't exist
# - Circular dependency in asset bundles

# Test: disable custom modules one by one to find the culprit
# Or check the specific file mentioned in the error

Fix 7: Proxy/CDN Caching Old Assets

# If using Cloudflare or nginx caching:
# Old cached assets may conflict with new Odoo version

# Cloudflare:
# Dashboard → Caching → Purge Everything

# Nginx:
# Clear nginx cache directory (if configured)
rm -rf /var/cache/nginx/*
nginx -s reload

Fix 8: Disk Full

# Assets can't compile if disk is full:
df -h

# If disk is full, clear space first (see disk space guide)
# Then clear asset bundles and restart

Fix 9: Database Upgrade Leftover

# After module upgrade, old asset references may persist:

# Force regenerate all assets:
python odoo-bin -d dbname -u web --stop-after-init
systemctl restart odoo

# Nuclear option: delete ALL asset attachments
DELETE FROM ir_attachment
WHERE res_model = 'ir.ui.view'
   OR name LIKE '%assets%'
   OR url LIKE '/web/assets/%';

Diagnosis Checklist

  1. Open browser DevTools → Network tab → reload → check for 404 errors on .js/.css files
  2. Check browser Console for JavaScript errors
  3. Check Odoo log for asset compilation errors
  4. Check disk space (df -h)
  5. Check file permissions on Odoo data directory
  6. Check if --dev flag is set (should not be in production)
  7. Try clearing asset bundles + hard browser refresh
  8. Try a different browser (rules out browser cache)

DeployMonkey

DeployMonkey's AI agent detects asset loading failures and fixes them automatically — clearing bundles, identifying the breaking module, and recompiling assets. No manual intervention needed.