diff --git a/fusion_accounting_reports/__manifest__.py b/fusion_accounting_reports/__manifest__.py index 476f5e28..1375eebd 100644 --- a/fusion_accounting_reports/__manifest__.py +++ b/fusion_accounting_reports/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Fusion Accounting Reports', - 'version': '19.0.1.1.1', + 'version': '19.0.1.2.0', 'category': 'Accounting/Accounting', 'summary': 'AI-augmented financial reports (P&L, balance sheet, trial balance, GL).', 'description': """ @@ -57,7 +57,6 @@ menu hides; the engine and AI tools remain available for the chat. 'web.assets_backend': [ 'fusion_accounting_reports/static/src/scss/_variables.scss', 'fusion_accounting_reports/static/src/scss/reports.scss', - 'fusion_accounting_reports/static/src/scss/dark_mode.scss', 'fusion_accounting_reports/static/src/services/reports_service.js', 'fusion_accounting_reports/static/src/views/report_viewer/report_viewer.js', 'fusion_accounting_reports/static/src/views/report_viewer/report_viewer.xml', @@ -73,6 +72,9 @@ menu hides; the engine and AI tools remain available for the chat. 'fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.js', 'fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.xml', ], + 'web.assets_web_dark': [ + 'fusion_accounting_reports/static/src/scss/reports.dark.scss', + ], 'web.assets_tests': [ 'fusion_accounting_reports/static/src/tours/reports_tours.js', ], diff --git a/fusion_accounting_reports/migrations/19.0.1.1.2/pre-migration.py b/fusion_accounting_reports/migrations/19.0.1.1.2/pre-migration.py new file mode 100644 index 00000000..0c70eeb4 --- /dev/null +++ b/fusion_accounting_reports/migrations/19.0.1.1.2/pre-migration.py @@ -0,0 +1,73 @@ +"""Pre-migration: convert legacy act_window report actions to client actions. + +In 19.0.1.1.1 we shipped 11 ``ir.actions.act_window`` records with +``view_mode='fusion_reports'``. Odoo's act_window resolver requires a +matching ``ir.ui.view`` record per view_mode, so clicking those menus +raised "View types not defined fusion_reports". + +19.0.1.1.2 reissues the same xml_ids as ``ir.actions.client`` records +with ``tag='fusion_reports'``. Odoo refuses to update a record across +models, so this pre-migration drops the legacy records before the new +data file loads. Idempotent: safe to re-run. +""" + +import logging + +_logger = logging.getLogger(__name__) + + +LEGACY_XIDS = ( + 'action_fusion_report_pnl', + 'action_fusion_report_balance_sheet', + 'action_fusion_report_trial_balance', + 'action_fusion_report_general_ledger', + 'action_fusion_report_cash_flow', + 'action_fusion_report_executive_summary', + 'action_fusion_report_annual_statements', + 'action_fusion_report_tax_summary', + 'action_fusion_report_aged_receivable', + 'action_fusion_report_aged_payable', + 'action_fusion_report_partner_ledger', +) + + +def migrate(cr, version): + if not version: + return + deleted = 0 + for name in LEGACY_XIDS: + cr.execute( + """ + SELECT id, model, res_id + FROM ir_model_data + WHERE module = 'fusion_accounting_reports' AND name = %s + """, + (name,), + ) + row = cr.fetchone() + if not row: + continue + ir_md_id, model, res_id = row + if model != 'ir.actions.act_window': + continue + cr.execute( + "DELETE FROM ir_act_window WHERE id = %s", + (res_id,), + ) + cr.execute( + "DELETE FROM ir_actions WHERE id = %s", + (res_id,), + ) + cr.execute( + "DELETE FROM ir_model_data WHERE id = %s", + (ir_md_id,), + ) + deleted += 1 + _logger.info("Dropped legacy act_window for fusion_accounting_reports.%s", name) + + if deleted: + _logger.info( + "fusion_accounting_reports pre-migration: dropped %d legacy " + "act_window records to make way for ir.actions.client variants.", + deleted, + ) diff --git a/fusion_accounting_reports/static/src/components/ai_commentary_panel/ai_commentary_panel.xml b/fusion_accounting_reports/static/src/components/ai_commentary_panel/ai_commentary_panel.xml index 8454d6f3..62dbe089 100644 --- a/fusion_accounting_reports/static/src/components/ai_commentary_panel/ai_commentary_panel.xml +++ b/fusion_accounting_reports/static/src/components/ai_commentary_panel/ai_commentary_panel.xml @@ -3,10 +3,10 @@
-

📊 AI Commentary

+

AI Commentary

-

+

@@ -36,7 +36,7 @@
-
+
Cached •
diff --git a/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.js b/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.js index bbcd4649..cecddb9d 100644 --- a/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.js +++ b/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.js @@ -2,12 +2,22 @@ import { Component } from "@odoo/owl"; +const SEVERITY_TO_BS = { + high: 'danger', + medium: 'warning', + low: 'info', +}; + export class AnomalyStrip extends Component { static template = "fusion_accounting_reports.AnomalyStrip"; static props = { anomaly: { type: Object }, }; + get alertClass() { + return SEVERITY_TO_BS[this.props.anomaly.severity] || 'secondary'; + } + formatAmount(amount) { if (amount === null || amount === undefined) return ""; return new Intl.NumberFormat(undefined, { diff --git a/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.xml b/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.xml index 021b394e..b88892e6 100644 --- a/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.xml +++ b/fusion_accounting_reports/static/src/components/anomaly_strip/anomaly_strip.xml @@ -2,15 +2,15 @@ -
- - +
+ + % () - - severity: + +
diff --git a/fusion_accounting_reports/static/src/components/period_filter/period_filter.xml b/fusion_accounting_reports/static/src/components/period_filter/period_filter.xml index 2c3fdb44..a81de7a0 100644 --- a/fusion_accounting_reports/static/src/components/period_filter/period_filter.xml +++ b/fusion_accounting_reports/static/src/components/period_filter/period_filter.xml @@ -2,9 +2,9 @@ -
+
- - - - Loading...
diff --git a/fusion_accounting_reports/static/src/components/report_table/report_table.js b/fusion_accounting_reports/static/src/components/report_table/report_table.js index 5bc7da93..94fe308b 100644 --- a/fusion_accounting_reports/static/src/components/report_table/report_table.js +++ b/fusion_accounting_reports/static/src/components/report_table/report_table.js @@ -9,6 +9,10 @@ export class ReportTable extends Component { onDrillDown: { type: Function, optional: true }, }; + get isPartnerGrouped() { + return this.props.result?.report_type === 'partner_grouped'; + } + formatAmount(amount) { if (amount === null || amount === undefined) return ""; return new Intl.NumberFormat(undefined, { @@ -22,15 +26,35 @@ export class ReportTable extends Component { } } + onPartnerRowClick(row) { + // Partner-grouped reports are not (yet) drillable through the + // dialog; we still expose the click hook for future expansion. + if (this.props.onDrillDown && row.partner_id) { + // Intentionally no-op until partner drill is wired up. + } + } + rowClass(row) { - const classes = ['report-row', `level-${row.level || 0}`]; - if (row.is_subtotal) classes.push('subtotal'); - if (row.account_id) classes.push('drillable'); + const classes = [`line_level_${row.level || 0}`]; + if (row.is_subtotal) classes.push('total'); + if (row.account_id) classes.push('unfoldable'); + return classes.join(' '); + } + + partnerRowClass(row) { + const classes = ['line_level_1']; + if (row.partner_id) classes.push('unfoldable'); + return classes.join(' '); + } + + lineNameClass(row) { + const classes = ['line_name']; + if (row.account_id) classes.push('unfoldable'); return classes.join(' '); } varianceClass(pct) { if (pct === null || pct === undefined) return ""; - return pct > 0 ? 'variance-pos' : pct < 0 ? 'variance-neg' : ''; + return pct > 0 ? 'variance_pos' : pct < 0 ? 'variance_neg' : ''; } } diff --git a/fusion_accounting_reports/static/src/components/report_table/report_table.xml b/fusion_accounting_reports/static/src/components/report_table/report_table.xml index 1a143d8f..4ed43b42 100644 --- a/fusion_accounting_reports/static/src/components/report_table/report_table.xml +++ b/fusion_accounting_reports/static/src/components/report_table/report_table.xml @@ -2,44 +2,106 @@ -
- - - - - - - - - +
LineAmount - - Variance %
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + - - - - + - -
PartnerCurrent1 - 3031 - 6061 - 9090+Total
+ + + + Variance%
+
+
+ +
+
+
Total
- + +
+
+
- + +
+ +
- + +
+ +
- - % - + +
+ +
+
+
+ + % + +
-
+
+ +
diff --git a/fusion_accounting_reports/static/src/scss/_variables.scss b/fusion_accounting_reports/static/src/scss/_variables.scss index e158bfdc..698cc1df 100644 --- a/fusion_accounting_reports/static/src/scss/_variables.scss +++ b/fusion_accounting_reports/static/src/scss/_variables.scss @@ -1,29 +1,15 @@ -// Fusion reports design tokens (extends Phase 1's bank_rec tokens for consistency). +// Fusion reports design tokens. +// +// COLORS now come from Odoo's own SCSS palette ($o-view-background-color, +// $o-gray-100..900, $o-enterprise-action-color). Dark-mode adjustments live +// in the separate `reports.dark.scss` bundle (web.assets_web_dark) so they +// load automatically when Odoo enters dark mode -- no [data-bs-theme] hack +// is needed. +// +// This file therefore only carries spacing/typography tokens used by the +// Fusion-only components (AI commentary panel, anomaly strip). -// Colors — semantic -$report-bg-primary: #ffffff; -$report-bg-secondary: #f9fafb; -$report-bg-tertiary: #f3f4f6; -$report-border: #e5e7eb; -$report-text-primary: #111827; -$report-text-secondary: #6b7280; -$report-text-muted: #9ca3af; -$report-accent: #3b82f6; -$report-accent-bg: #eff6ff; - -// Severity colors (mirrors bank_rec) -$report-severity-high: #ef4444; -$report-severity-high-bg: #fef2f2; -$report-severity-medium: #f59e0b; -$report-severity-medium-bg: #fffbeb; -$report-severity-low: #10b981; -$report-severity-low-bg: #ecfdf5; - -// Variance indicators -$report-variance-positive: #10b981; -$report-variance-negative: #ef4444; - -// Spacing +// Spacing scale (4px increments) $report-space-1: 0.25rem; $report-space-2: 0.5rem; $report-space-3: 0.75rem; @@ -38,12 +24,7 @@ $report-font-size-sm: 0.875rem; $report-font-size-base: 1rem; $report-font-size-lg: 1.125rem; $report-font-size-xl: 1.25rem; -$report-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace; -// Borders + radii -$report-border-radius: 0.375rem; +// Border radius +$report-border-radius: 0.25rem; $report-border-radius-md: 0.5rem; -$report-border-radius-lg: 0.75rem; - -// Subtotal indentation -$report-indent-per-level: 1.5rem; diff --git a/fusion_accounting_reports/static/src/scss/dark_mode.scss b/fusion_accounting_reports/static/src/scss/dark_mode.scss deleted file mode 100644 index acb4325d..00000000 --- a/fusion_accounting_reports/static/src/scss/dark_mode.scss +++ /dev/null @@ -1,34 +0,0 @@ -// Variables come from _variables.scss via manifest concatenation order. - -[data-color-scheme="dark"] .o_fusion_reports { - background: #1f2937; - color: #f9fafb; - - &_header, &_table, &_filters, .o_fusion_commentary_panel { - background: #111827; - border-color: #374151; - color: #f9fafb; - } - - &_table { - th { background: #1f2937; color: #d1d5db; } - td { border-color: #374151; } - tr.subtotal { background: #1f2937; } - tr.drillable:hover { background: #1e3a8a; } - } - - .btn_report { - background: #374151; - border-color: #4b5563; - color: #f9fafb; - - &:hover { background: #4b5563; } - &.primary { background: #3b82f6; } - } - - .o_fusion_anomaly_strip { - &[data-severity="high"] { background: rgba(239, 68, 68, 0.15); } - &[data-severity="medium"] { background: rgba(245, 158, 11, 0.15); } - &[data-severity="low"] { background: rgba(16, 185, 129, 0.15); } - } -} diff --git a/fusion_accounting_reports/static/src/scss/reports.dark.scss b/fusion_accounting_reports/static/src/scss/reports.dark.scss new file mode 100644 index 00000000..8e7b2076 --- /dev/null +++ b/fusion_accounting_reports/static/src/scss/reports.dark.scss @@ -0,0 +1,80 @@ +// Dark-mode overrides for the Fusion reports viewer. +// Loaded only via web.assets_web_dark, mirroring the strategy used by +// Enterprise account_reports.dark.scss. The light styles in reports.scss +// reference Odoo's $o-* palette so most surfaces flip automatically when +// the dark bundle re-derives those palette vars; this file just smooths +// over the few spots where Enterprise applies a manual touch-up. + +.account_report { + .o_fusion_report_header { + background-color: $o-view-background-color; + border-bottom-color: $o-gray-700; + + h1 { color: $o-gray-200 } + .o_fusion_report_period { color: $o-gray-400 } + } + + .o_fusion_report_filters { + background-color: $o-view-background-color; + border-bottom-color: $o-gray-700; + + label { color: $o-gray-300 } + } + + .table { + background-color: $o-view-background-color; + border-color: $o-gray-700; + + > thead > tr:not(:last-child) > th:not(:first-child) { + border-color: $o-gray-700; + } + + > tbody > tr { + &:not(.empty) > td { border-bottom-color: $o-gray-800 } + &.unfolded > td { border-bottom-color: $o-gray-700 } + > td.muted { color: $o-gray-600 } + &:hover .muted { color: $o-gray-300 } + } + } + + table.striped { + > thead > tr:not(:first-child) > th:nth-child(2n+3) { background: $o-gray-800 } + > tbody { + > tr:not(.line_level_0):not(.empty) > td:nth-child(2n+3) { background: $o-gray-800 } + > tr.line_level_0 > td:nth-child(2n+3) { background: $o-gray-700 } + } + } + + thead.sticky { background-color: $o-view-background-color } + + .line_level_0 { + color: $o-gray-200; + + > td { background-color: $o-gray-700 } + .muted { color: $o-gray-500 !important } + } + + @for $i from 2 through 16 { + .line_level_#{$i} > td { color: $o-gray-300 } + } + + .btn_dropdown, .btn_foldable, .btn_foldable_empty, + .btn_more, .btn_action { + color: $o-gray-600; + } + .btn_foldable { color: $o-gray-500 } + .btn_action { + background-color: $o-view-background-color; + color: $o-gray-300; + border-color: $o-gray-600; + } + + .o_fusion_commentary_panel { + background-color: $o-view-background-color; + border-color: $o-gray-700; + + h4 { color: $o-gray-200 } + .commentary-section h5 { color: $o-gray-400 } + .commentary-meta { color: $o-gray-500 } + } +} diff --git a/fusion_accounting_reports/static/src/scss/reports.scss b/fusion_accounting_reports/static/src/scss/reports.scss index b3ea9519..b8e37ad5 100644 --- a/fusion_accounting_reports/static/src/scss/reports.scss +++ b/fusion_accounting_reports/static/src/scss/reports.scss @@ -1,162 +1,344 @@ -// Variables come from _variables.scss via manifest concatenation order. -// (V19 forbids cross-file SCSS imports; rely on bundle order instead.) +// Faithful adaptation of Enterprise account_reports' look. +// Source reference: +// account_reports/static/src/components/account_report/account_report.scss +// We mirror the same root selector (.account_report), the same table +// semantics (.line_name + .line_cell + .line_level_N), the same border +// treatment (1px gray-300, 0.25rem radius, sticky thead) and the same +// button hover behavior (gray-300 -> enterprise action color). +// +// Trimmed: chatter, annotations, audit-balance and journal-line debug +// popovers are Enterprise-only features we do not ship. -.o_fusion_reports { - background: $report-bg-secondary; - min-height: 100vh; - - &_header { - background: $report-bg-primary; - border-bottom: 1px solid $report-border; - padding: $report-space-4 $report-space-6; +.account_report { + //-------------------------------------------------------------------- + // Header (Fusion-only -- Enterprise uses Odoo ControlPanel; we keep + // a lightweight header to host the report title + AI commentary + // trigger but style it to feel native). + //-------------------------------------------------------------------- + .o_fusion_report_header { display: flex; - justify-content: space-between; align-items: center; + justify-content: space-between; + gap: 1rem; + padding: 0.5rem 1.5rem; + background-color: $o-view-background-color; + border-bottom: 1px solid $o-gray-300; h1 { - font-size: $report-font-size-xl; + font-size: 1.125rem; + font-weight: 600; margin: 0; + color: $o-gray-800; + } + + .o_fusion_report_period { + font-size: 0.8rem; + color: $o-gray-600; + margin-top: 2px; } } - &_table { - background: $report-bg-primary; - border: 1px solid $report-border; - border-radius: $report-border-radius-md; - margin: $report-space-4; - overflow: hidden; - font-family: $report-font-mono; - font-size: $report-font-size-sm; + //-------------------------------------------------------------------- + // Scroll container (mirrors Enterprise) + //-------------------------------------------------------------------- + .o_account_report_scroll_container { + margin-inline: 0 !important; + } - table { - width: 100%; - border-collapse: collapse; + //-------------------------------------------------------------------- + // Table (verbatim from Enterprise, minus chatter/annotation/audit) + //-------------------------------------------------------------------- + .table { + background-color: $o-view-background-color; + border-collapse: separate; + border-spacing: 0; + font-size: 0.8rem; + margin: 24px 24px; + padding: 24px; + width: auto; + min-width: 800px; + border: 1px solid $o-gray-300; + border-radius: 0.25rem; + + > :not(caption) > * > * { padding: 0.25rem 0.75rem } + + > thead { + > tr { + th:first-child { + color: lightgrey; + } + th:not(:first-child) { + text-align: center; + vertical-align: middle; + } + } + > tr:not(:last-child) > th:not(:first-child) { border: 1px solid $o-gray-300 } } - th { - background: $report-bg-tertiary; - padding: $report-space-3 $report-space-4; - text-align: left; - font-weight: 600; - color: $report-text-secondary; - border-bottom: 1px solid $report-border; + > tbody { + > tr { + &.unfolded { font-weight: bold } + > td { + a { cursor: pointer } + .clickable { color: $o-enterprise-action-color } + &.muted { color: $o-gray-300 } + &:empty::after{ content: "\00a0" } + &:empty { line-height: 1 } + } + + &:not(.empty) > td { border-bottom: 1px solid $o-gray-200 } + &.total { font-weight: bold } + &.o_bold_tr { font-weight: bold } + + &.unfolded { + > td { border-bottom: 1px solid $o-gray-300 } + .btn_action { opacity: 1 } + .btn_more { opacity: 1 } + } + + &:hover { + &.empty > * { --table-accent-bg: transparent } + .muted { color: $o-gray-800 } + .btn_action, .btn_more { + opacity: 1; + color: $o-enterprise-action-color; + } + .btn_dropdown { color: $o-enterprise-action-color } + .btn_foldable { color: $o-enterprise-action-color } + } + } } - th.amount, td.amount { - text-align: right; - white-space: nowrap; + @media print { + border: 0; + padding: 0; + } + } + + table.striped { + > thead > tr:not(:first-child) > th:nth-child(2n+3) { background: $o-gray-100 } + > tbody { + > tr:not(.line_level_0):not(.empty) > td:nth-child(2n+3) { background: $o-gray-100 } + > tr.line_level_0 > td:nth-child(2n+3) { background: $o-gray-300 } + } + } + + thead.sticky { + background-color: $o-view-background-color; + position: sticky; + top: 0; + z-index: 999; + } + + //-------------------------------------------------------------------- + // Line cells + //-------------------------------------------------------------------- + .line_name { + vertical-align: middle; + > .wrapper { + display: flex; + align-items: center; + + > .content { + display: flex; + align-items: center; + } } - td { - padding: $report-space-2 $report-space-4; - border-bottom: 1px solid lighten($report-border, 5%); + .name { white-space: nowrap } + &.draft { color: $o-info; } + &.unfoldable:hover { cursor: pointer } + } + + .line_cell { + vertical-align: middle; + > .wrapper { + display: flex; + align-items: center; + + > .content { + display: flex; + align-items: center; + } } - tr.subtotal { - font-weight: 600; - background: $report-bg-secondary; - border-top: 1px solid $report-text-muted; - } + &.date > .wrapper { justify-content: center } + &.numeric > .wrapper { justify-content: flex-end } + .name { white-space: nowrap } + } - tr.subtotal td { - border-bottom: 1px solid $report-text-muted; - } + //-------------------------------------------------------------------- + // Indentation per level + //-------------------------------------------------------------------- + .line_level_0 { + color: $o-gray-700; + font-weight: bold; - tr.drillable { + > td { + border-bottom: 0 !important; + background-color: $o-gray-300; + } + .muted { color: $o-gray-400 !important } + } + + @for $i from 2 through 16 { + .line_level_#{$i} { + $indentation: (($i + 1) * 8px) - 20px; + + > td { + color: $o-gray-700; + + &.line_name.unfoldable .wrapper { column-gap: calc(#{ $indentation }) } + &.line_name:not(.unfoldable) .wrapper { padding-left: $indentation } + } + } + } + + //-------------------------------------------------------------------- + // Variance helpers (Fusion-only -- comparison reports surface signed + // deltas right-aligned in their own column). + //-------------------------------------------------------------------- + .variance_pos { color: $o-success } + .variance_neg { color: $o-danger } + + //-------------------------------------------------------------------- + // Link + //-------------------------------------------------------------------- + .link { color: $o-enterprise-action-color } + + //-------------------------------------------------------------------- + // Buttons (foldable / dropdown / action / more) + //-------------------------------------------------------------------- + .btn_dropdown, .btn_foldable, .btn_foldable_empty, + .btn_more, .btn_action { + border: none; + color: $o-gray-300; + font-size: inherit; + font-weight: normal; + padding: 0; + text-align: center; + width: 20px; + white-space: nowrap; + background: transparent; + + &:hover { + color: $o-enterprise-action-color !important; cursor: pointer; - &:hover { background: $report-accent-bg; } } - - .level-1 { padding-left: $report-space-4 + $report-indent-per-level; } - .level-2 { padding-left: $report-space-4 + $report-indent-per-level * 2; } - .level-3 { padding-left: $report-space-4 + $report-indent-per-level * 3; } - - .variance-pos { color: $report-variance-positive; } - .variance-neg { color: $report-variance-negative; } } - &_filters { - background: $report-bg-primary; - padding: $report-space-3 $report-space-4; - border-bottom: 1px solid $report-border; - display: flex; - gap: $report-space-3; - align-items: center; - flex-wrap: wrap; + .btn_foldable { color: $o-gray-500 } + .btn_foldable_empty:hover { cursor: default } + .btn_more { opacity: 1 } + .btn_action { + opacity: 0; + background-color: $o-view-background-color; + color: $o-gray-600; + width: auto; + padding: 0 0.25rem; + margin: 0 0.25rem; + border: 1px solid $o-gray-300; + border-radius: 0.25rem; } - .btn_report { - padding: $report-space-2 $report-space-4; - border-radius: $report-border-radius; - background: $report-bg-primary; - border: 1px solid $report-border; - color: $report-text-primary; - font-size: $report-font-size-sm; - cursor: pointer; - transition: all 150ms ease-in-out; + //-------------------------------------------------------------------- + // Dropdown + //-------------------------------------------------------------------- + .dropdown { display: inline } +} - &:hover { background: $report-bg-tertiary; } +//-------------------------------------------------------------------- +// Period filter bar (Fusion-only -- Enterprise has a much richer +// filter component; we keep our minimal date+comparison+report-type +// bar but style it to feel native to .account_report). +//-------------------------------------------------------------------- +.account_report .o_fusion_report_filters { + display: flex; + align-items: center; + gap: 0.75rem; + flex-wrap: wrap; + padding: 0.5rem 1.5rem; + background-color: $o-view-background-color; + border-bottom: 1px solid $o-gray-200; + font-size: 0.8rem; - &.primary { - background: $report-accent; - border-color: $report-accent; - color: white; + label { + color: $o-gray-700; + margin-bottom: 0; + font-weight: normal; + } - &:hover { background: darken($report-accent, 8%); } - } + .form-select, .form-control { + font-size: 0.8rem; + padding: 0.25rem 0.5rem; + height: auto; + min-height: 0; } } -.o_fusion_anomaly_strip { - margin: $report-space-3; - padding: $report-space-3; - border-radius: $report-border-radius; - border: 1px solid; - font-size: $report-font-size-sm; - - &[data-severity="high"] { - background: $report-severity-high-bg; - border-color: $report-severity-high; - } - &[data-severity="medium"] { - background: $report-severity-medium-bg; - border-color: $report-severity-medium; - } - &[data-severity="low"] { - background: $report-severity-low-bg; - border-color: $report-severity-low; - } -} - -.o_fusion_commentary_panel { - background: $report-bg-primary; - border: 1px solid $report-border; - border-radius: $report-border-radius-md; - margin: $report-space-3; - padding: $report-space-4; +//-------------------------------------------------------------------- +// AI commentary panel (Fusion-only addition) +//-------------------------------------------------------------------- +.account_report .o_fusion_commentary_panel { + background-color: $o-view-background-color; + border: 1px solid $o-gray-300; + border-radius: 0.25rem; + margin: 0 24px 24px; + padding: 1rem 1.25rem; + font-size: 0.85rem; h4 { - margin: 0 0 $report-space-3; - font-size: $report-font-size-base; - color: $report-text-primary; + font-size: 0.95rem; + font-weight: 600; + margin: 0 0 0.5rem; + color: $o-gray-800; } .commentary-section { - margin-bottom: $report-space-3; + margin-bottom: 0.75rem; h5 { - font-size: $report-font-size-sm; - color: $report-text-secondary; + font-size: 0.75rem; + font-weight: 600; + color: $o-gray-600; text-transform: uppercase; letter-spacing: 0.05em; - margin-bottom: $report-space-2; + margin: 0 0 0.25rem; } ul { margin: 0; - padding-left: $report-space-4; - - li { margin: $report-space-1 0; } + padding-left: 1.25rem; + li { margin: 0.15rem 0 } } + + p { margin: 0 } + } + + .commentary-meta { + font-size: 0.7rem; + color: $o-gray-500; + } +} + +//-------------------------------------------------------------------- +// Anomaly strip (Fusion-only) -- now a plain Bootstrap-style alert, +// inset to align with the report table padding. +//-------------------------------------------------------------------- +.account_report .o_fusion_anomaly_strip { + margin: 0.5rem 24px 0; + padding: 0.4rem 0.75rem; + border: 1px solid; + border-radius: 0.25rem; + font-size: 0.8rem; + + .anomaly_label { font-weight: 600 } + .anomaly_delta { margin-left: 0.5rem } + .anomaly_severity { + margin-left: 0.75rem; + font-size: 0.7rem; + text-transform: uppercase; + letter-spacing: 0.05em; + opacity: 0.8; } } diff --git a/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.xml b/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.xml index 3d90b445..1a48ea62 100644 --- a/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.xml +++ b/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.xml @@ -2,18 +2,22 @@ -
-
+