From 51d8ce494d1ca54262699be59daa133518e782e2 Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 19 Apr 2026 21:57:22 -0400 Subject: [PATCH] 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 --- fusion_accounting_assets/static/src/scss/assets.scss | 3 ++- fusion_accounting_assets/static/src/scss/dark_mode.scss | 2 +- fusion_accounting_bank_rec/static/src/scss/ai_suggestion.scss | 2 +- .../static/src/scss/bank_reconciliation.scss | 3 ++- fusion_accounting_bank_rec/static/src/scss/dark_mode.scss | 3 +-- fusion_accounting_reports/static/src/scss/dark_mode.scss | 2 +- fusion_accounting_reports/static/src/scss/reports.scss | 3 ++- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fusion_accounting_assets/static/src/scss/assets.scss b/fusion_accounting_assets/static/src/scss/assets.scss index bd60b796..d0bd458d 100644 --- a/fusion_accounting_assets/static/src/scss/assets.scss +++ b/fusion_accounting_assets/static/src/scss/assets.scss @@ -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; diff --git a/fusion_accounting_assets/static/src/scss/dark_mode.scss b/fusion_accounting_assets/static/src/scss/dark_mode.scss index 2de63446..41b06eb7 100644 --- a/fusion_accounting_assets/static/src/scss/dark_mode.scss +++ b/fusion_accounting_assets/static/src/scss/dark_mode.scss @@ -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; diff --git a/fusion_accounting_bank_rec/static/src/scss/ai_suggestion.scss b/fusion_accounting_bank_rec/static/src/scss/ai_suggestion.scss index e5f78b54..58d7ee6f 100644 --- a/fusion_accounting_bank_rec/static/src/scss/ai_suggestion.scss +++ b/fusion_accounting_bank_rec/static/src/scss/ai_suggestion.scss @@ -1,4 +1,4 @@ -@import "variables"; +// Variables come from _variables.scss via manifest concatenation order. // ============================================================ // AI Suggestion strip (inline, on each statement line card) diff --git a/fusion_accounting_bank_rec/static/src/scss/bank_reconciliation.scss b/fusion_accounting_bank_rec/static/src/scss/bank_reconciliation.scss index aeb36ba5..97485caf 100644 --- a/fusion_accounting_bank_rec/static/src/scss/bank_reconciliation.scss +++ b/fusion_accounting_bank_rec/static/src/scss/bank_reconciliation.scss @@ -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 diff --git a/fusion_accounting_bank_rec/static/src/scss/dark_mode.scss b/fusion_accounting_bank_rec/static/src/scss/dark_mode.scss index 2316281f..8131b3a8 100644 --- a/fusion_accounting_bank_rec/static/src/scss/dark_mode.scss +++ b/fusion_accounting_bank_rec/static/src/scss/dark_mode.scss @@ -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. diff --git a/fusion_accounting_reports/static/src/scss/dark_mode.scss b/fusion_accounting_reports/static/src/scss/dark_mode.scss index 4cb50e63..acb4325d 100644 --- a/fusion_accounting_reports/static/src/scss/dark_mode.scss +++ b/fusion_accounting_reports/static/src/scss/dark_mode.scss @@ -1,4 +1,4 @@ -@import "variables"; +// Variables come from _variables.scss via manifest concatenation order. [data-color-scheme="dark"] .o_fusion_reports { background: #1f2937; diff --git a/fusion_accounting_reports/static/src/scss/reports.scss b/fusion_accounting_reports/static/src/scss/reports.scss index f5f90a1e..b3ea9519 100644 --- a/fusion_accounting_reports/static/src/scss/reports.scss +++ b/fusion_accounting_reports/static/src/scss/reports.scss @@ -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;