Skip to content

Fix Odoo Assets / CSS Not Loading

DeployMonkey Team · March 11, 2026 6 min read

What Odoo Assets Are

Odoo bundles all CSS and JavaScript into asset bundles stored in ir.attachment records in the database. When these bundles are missing, stale, or not served correctly, the interface loses its styling and functionality. This is different from a missing file — the files are generated dynamically and cached.

Step 1 — Clear Your Browser Cache First

Before anything else, hard-refresh the browser:

  • Chrome/Edge: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac)
  • Firefox: Ctrl+F5
  • Or open DevTools > Network > check "Disable cache" > refresh

If the page loads correctly after this, your browser was serving stale cached assets. No further action needed.

Step 2 — Regenerate Assets from the UI

In Odoo, activate developer mode first: go to Settings > scroll to bottom > Activate Developer Mode (or add ?debug=1 to the URL).

Then: Settings > Technical > User Interface > Assets > select all > Delete, then reload the page. Alternatively use the menu path:

Settings > Technical > Assets (search for "Assets" in the menu)
Delete all records > reload the page

Odoo will regenerate all asset bundles on the next page load. This takes 5–30 seconds depending on the number of modules.

Step 3 — Regenerate via Shell

If the UI is too broken to navigate:

# Connect to Odoo shell
python odoo-bin shell -d your_database

# Delete all asset bundles
env['ir.attachment'].search([('url', 'like', '/web/assets/')]).unlink()
env.cr.commit()
exit()

Or via psql directly:

psql -U odoo -d your_database -c \
  "DELETE FROM ir_attachment WHERE url LIKE '/web/assets/%';"

Restart Odoo afterwards so it regenerates on the next request.

Step 4 — Use --dev=all for Development

In development, asset bundles are regenerated on every request in --dev=all mode. This eliminates stale asset issues entirely during development:

python odoo-bin -d mydb --dev=all

Do not use --dev=all in production — it disables caching and makes every page load slower.

Step 5 — Check nginx for Proxy Issues

nginx can cause assets to fail in subtle ways:

  • Gzip on wrong content types — ensure gzip is configured for CSS/JS.
  • Buffering stripping headersproxy_buffering off for streaming, but ensure it is on for static assets.
  • Missing X-Forwarded-Proto — Odoo generates asset URLs based on the request scheme. If Odoo generates http:// URLs but the browser loaded the page over https://, the browser blocks mixed-content assets.
# Ensure these headers are set in nginx:
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;

Also add this to odoo.conf if behind a proxy:

proxy_mode = True

Step 6 — Check for Failed Asset Compilation

If a custom module has a SCSS or JavaScript syntax error, the entire bundle fails to compile. Check the Odoo log:

grep -i "asset\|scss\|less\|bundle\|error" /var/log/odoo/odoo.log | tail -30

Fix the syntax error in the custom module, then regenerate assets.

Step 7 — CDN Configuration

If you use a CDN for static assets, ensure the CDN origin is pointed at Odoo correctly and the web.base.url system parameter matches your domain:

-- In psql:
SELECT value FROM ir_config_parameter WHERE key = 'web.base.url';
UPDATE ir_config_parameter SET value = 'https://your-domain.com' WHERE key = 'web.base.url';

How DeployMonkey Handles Assets

DeployMonkey instances are provisioned with proxy_mode = True and the correct X-Forwarded-Proto headers pre-configured. Asset bundles are regenerated automatically after module updates. The control panel includes a one-click "Regenerate Assets" button for when you need it. See Odoo nginx Reverse Proxy for the full proxy configuration reference.

Start free at deploymonkey.app.

Frequently Asked Questions

Why do assets break after a module update?

Module updates add or remove CSS/JS files from bundles. Odoo tries to regenerate automatically, but sometimes the old cached bundles are served. Force regeneration using the steps above.

Assets load in Chrome but not Firefox — why?

Likely a browser caching difference. Hard-clear Firefox's cache specifically. If it persists, check for mixed-content (http vs https) errors in the Firefox console.

How do I verify which bundle is failing?

Open DevTools > Network tab > filter by JS or CSS > look for failed requests (red). Click the failed request to see the URL and error. The URL format /web/assets/HASH/bundle_name.js tells you which bundle is affected.

Is there a way to precompile assets before deployment?

Yes — run Odoo with --stop-after-init after a module update. It will compile and cache all assets before taking any user traffic.