feat(fusion_accounting_reports): adopt Enterprise account_reports look
User feedback: 'i like the odoo enterprise style reports, I hate our style.'
Replaces our custom 'o_fusion_reports' visual with a faithful adaptation
of Enterprise account_reports. Same .account_report root class, same
table semantics (line_name + line_cell + line_level_N), same border
treatment (1px gray-300 borders, 0.25rem radius, sticky thead), same
button hover behavior (gray-300 -> enterprise-action-color), same dense
0.8rem font-size + padded cells.
SCSS layout:
- reports.scss in web.assets_backend bundle (eager light)
- reports.dark.scss in web.assets_web_dark bundle (lazy dark mode)
- _variables.scss reduced to spacing/typography only -- colors use
Odoo's \$o-* SCSS vars so dark mode flips automatically via the
separate dark bundle
- old dark_mode.scss removed (was using non-Odoo [data-color-scheme]
selector that never matched anything)
QWeb templates rewritten to mirror Enterprise's structure:
- report_viewer.xml roots at .account_report with scroll container
- report_table.xml uses Enterprise's td.line_name + td.line_cell with
.wrapper > .content nesting; partner-grouped reports now actually
render their aging buckets (previously showed nothing)
- period_filter.xml is now a clean Bootstrap-styled inline filter bar
Kept Fusion-only components but restyled to fit:
- anomaly_strip uses Bootstrap alert-{danger,warning,info} colors
- ai_commentary_panel is a plain bordered panel, no gradients/emojis
- drill_down_dialog unchanged (already a Bootstrap modal)
Made-with: Cursor
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
sitting alongside Community's PDF-based "Statement Reports" /
|
||||
"Partner Reports" / "Taxes & Fiscal" / "Management" wrappers.
|
||||
|
||||
Each menu opens an act_window with view_mode='fusion_reports'
|
||||
Each menu opens an ir.actions.client with tag='fusion_reports'
|
||||
(the OWL ReportViewer). report_actions.xml defines the actions.
|
||||
|
||||
All gated to the coexistence group so they only appear when
|
||||
|
||||
@@ -1,44 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!--
|
||||
One ir.actions.act_window per built-in report, each opens the OWL
|
||||
ReportViewer (view_mode='fusion_reports'). The viewer reads
|
||||
``default_report_type`` and ``default_report_code`` from the action
|
||||
context to pick which fusion.report to render.
|
||||
One ir.actions.client per built-in report. tag="fusion_reports"
|
||||
dispatches to the OWL ReportViewer (registered in
|
||||
static/src/views/report_viewer/report_viewer_view.js).
|
||||
|
||||
New menus per-report live below; users no longer need to go through
|
||||
the period-picker wizard for the standard reports.
|
||||
The viewer reads ``default_report_type``, ``default_report_code``,
|
||||
and ``default_comparison`` from the action context to pick which
|
||||
fusion.report to render with which line_specs.
|
||||
|
||||
Why ir.actions.client and not ir.actions.act_window:
|
||||
a custom OWL view type (view_mode='fusion_reports') would require
|
||||
a placeholder ir.ui.view record per action plus a registered "view"
|
||||
in the views registry; the standard act_window resolver also rejects
|
||||
view_modes that have no corresponding ir.ui.view record. Client
|
||||
actions are the V19-canonical pattern for record-less dashboards.
|
||||
-->
|
||||
|
||||
<!-- ============================================================
|
||||
CORE REPORTS (one per Fusion engine method)
|
||||
============================================================ -->
|
||||
|
||||
<record id="action_fusion_report_pnl" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_pnl" model="ir.actions.client">
|
||||
<field name="name">Profit and Loss</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'pnl', 'default_report_code': 'pnl'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_balance_sheet" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_balance_sheet" model="ir.actions.client">
|
||||
<field name="name">Balance Sheet</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'balance_sheet', 'default_report_code': 'balance_sheet'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_trial_balance" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_trial_balance" model="ir.actions.client">
|
||||
<field name="name">Trial Balance</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'trial_balance', 'default_report_code': 'trial_balance'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_general_ledger" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_general_ledger" model="ir.actions.client">
|
||||
<field name="name">General Ledger</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'general_ledger', 'default_report_code': 'general_ledger'}</field>
|
||||
</record>
|
||||
|
||||
@@ -46,31 +49,27 @@
|
||||
SECONDARY PnL VARIANTS (engine.compute_pnl with code)
|
||||
============================================================ -->
|
||||
|
||||
<record id="action_fusion_report_cash_flow" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_cash_flow" model="ir.actions.client">
|
||||
<field name="name">Cash Flow Statement</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'pnl', 'default_report_code': 'cash_flow', 'default_comparison': 'previous_year'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_executive_summary" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_executive_summary" model="ir.actions.client">
|
||||
<field name="name">Executive Summary</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'pnl', 'default_report_code': 'executive_summary', 'default_comparison': 'previous_year'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_annual_statements" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_annual_statements" model="ir.actions.client">
|
||||
<field name="name">Annual Statements</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'pnl', 'default_report_code': 'annual_statements', 'default_comparison': 'previous_year'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_tax_summary" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_tax_summary" model="ir.actions.client">
|
||||
<field name="name">Tax Summary</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'trial_balance', 'default_report_code': 'tax_summary'}</field>
|
||||
</record>
|
||||
|
||||
@@ -78,24 +77,21 @@
|
||||
PARTNER-GROUPED REPORTS
|
||||
============================================================ -->
|
||||
|
||||
<record id="action_fusion_report_aged_receivable" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_aged_receivable" model="ir.actions.client">
|
||||
<field name="name">Aged Receivable</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'aged_receivable', 'default_report_code': 'aged_receivable'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_aged_payable" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_aged_payable" model="ir.actions.client">
|
||||
<field name="name">Aged Payable</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'aged_payable', 'default_report_code': 'aged_payable'}</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fusion_report_partner_ledger" model="ir.actions.act_window">
|
||||
<record id="action_fusion_report_partner_ledger" model="ir.actions.client">
|
||||
<field name="name">Partner Ledger</field>
|
||||
<field name="res_model">fusion.report</field>
|
||||
<field name="view_mode">fusion_reports</field>
|
||||
<field name="tag">fusion_reports</field>
|
||||
<field name="context">{'default_report_type': 'partner_ledger', 'default_report_code': 'partner_ledger'}</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user