fix(scss): remove forbidden @import "variables" lines breaking V19 asset bundle

Phases 1-3's SCSS files used '@import "variables";' to pull in tokens
from _variables.scss. V19's odoo.addons.base.models.assetsbundle
forbids cross-file SCSS imports for security ('Local import forbidden')
and the asset bundle warning was firing on every web request.

Phase 4 caught + fixed this for fusion_accounting_followup; Phases 1-3
were never updated. Today's deployment surfaced the CSS error reported
by the user.

Resolution:
- Removed @import lines from 7 SCSS files across bank_rec, reports, assets
- Variables come from _variables.scss via manifest concatenation order
  (bundle order is _variables.scss first, then dependent files)
- Replaced documentation comments to NOT contain the literal string
  '@import "variables"' \u2014 Odoo's check is regex-based and was
  matching even SCSS comments

Verified clean: bundle rebuilds with zero 'Local import forbidden'
warnings; all 534 fusion-module tests still pass.

Made-with: Cursor
This commit is contained in:
gsinghpal
2026-04-19 21:57:22 -04:00
parent 190c296240
commit 51d8ce494d
7 changed files with 10 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
@import "variables";
// Variables come from _variables.scss via manifest concatenation order.
// (V19 forbids cross-file SCSS imports; rely on bundle order instead.)
.o_fusion_assets {
background: $asset-bg-secondary;

View File

@@ -1,4 +1,4 @@
@import "variables";
// Variables come from _variables.scss via manifest concatenation order.
[data-color-scheme="dark"] .o_fusion_assets {
background: #1f2937; color: #f9fafb;

View File

@@ -1,4 +1,4 @@
@import "variables";
// Variables come from _variables.scss via manifest concatenation order.
// ============================================================
// AI Suggestion strip (inline, on each statement line card)

View File

@@ -1,4 +1,5 @@
@import "variables";
// Variables come from _variables.scss via manifest concatenation order.
// (V19 forbids cross-file SCSS imports; rely on bundle order instead.)
// ============================================================
// Bank reconciliation kanban container

View File

@@ -1,5 +1,4 @@
@import "variables";
// Variables come from _variables.scss via manifest concatenation order.
// Activated via [data-color-scheme="dark"] on body or any ancestor.
// Mirrors Odoo's standard dark-mode trigger pattern.

View File

@@ -1,4 +1,4 @@
@import "variables";
// Variables come from _variables.scss via manifest concatenation order.
[data-color-scheme="dark"] .o_fusion_reports {
background: #1f2937;

View File

@@ -1,4 +1,5 @@
@import "variables";
// Variables come from _variables.scss via manifest concatenation order.
// (V19 forbids cross-file SCSS imports; rely on bundle order instead.)
.o_fusion_reports {
background: $report-bg-secondary;