6d1efc6c430727543587556994d0fa5c46fad04a
Odoo 19 forbids local SCSS @import statements for security reasons and
silently falls back to the OLD cached CSS bundle when it sees them. My
redesign commit used:
@import "./fp_shopfloor_tokens";
in three SCSS files. Odoo logged
WARNING Local import './fp_shopfloor_tokens' is forbidden for
security reasons. Please remove all @import {your_file} imports
in your custom files.
...and the compiled bundle kept rendering the old look. That's what
the user saw.
Fix:
1. Add _fp_shopfloor_tokens.scss as the FIRST entry in
web.assets_backend in the manifest. Odoo concatenates the bundle
in order, so variables/mixins in the first file are visible to
every later file — native @import is not needed.
2. Strip the @import "./fp_shopfloor_tokens"; line from all three
consumer files (tablet, manager, plant overview).
Verified: asset bundle regenerated to /web/assets/.../web.assets_backend.min.css
(1.45 MB). Grepped the compiled CSS and all five new classes are present:
o_fp_tablet_header, o_fp_kpi_strip, o_fp_mgr_card, o_fp_live_dot,
o_fp_panel_unassigned. 8 radial-gradients baked in. Zero warnings in
the Odoo server log post-rebuild.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
Odoo 19 custom modules
Languages
Python
55.9%
HTML
26.1%
JavaScript
14.9%
SCSS
1.8%
CSS
0.8%
Other
0.4%