User reported that after Enterprise uninstall, clicking 'Reports' opened PDF statements instead of the dynamic Fusion report viewer. Root cause: the OWL ReportViewer (registered as view_type='fusion_reports') was only reachable via the period-picker WIZARD; no menu items used the OWL view directly. Plus the JS service ignored report_code, so even within the viewer, all PnL-typed reports rendered the canonical P&L line_specs. Changes: JS layer - reports_service.js: runReport now accepts and forwards reportCode; state tracks currentReportCode so re-runs after period/comparison changes preserve the variant. - report_viewer.js: reads default_report_code (and default_comparison) from the action context. - period_filter.js: passes the cached reportCode on date changes; clears it when the user picks a different report_type. Backend - New fusion_accounting_reports/views/report_actions.xml with 11 dedicated ir.actions.act_window records, one per built-in report (P&L, Balance Sheet, Trial Balance, GL, Cash Flow, Executive Summary, Annual Statements, Aged Receivable, Aged Payable, Partner Ledger, Tax Summary). Each opens view_mode='fusion_reports' with the appropriate default_report_type + default_report_code context. - views/menu_views.xml: each report now gets its own menu item directly under Accounting > Reporting (sequence 10-40), matching Enterprise's flat structure. Custom Period wizard, XLSX export and Anomaly browser collected under a 'Tools' sub-group at the bottom. - fusion_accounting_l10n_ca: adds menu items for 'Profit and Loss (Canada)' and 'Balance Sheet (Canada)' as siblings, plus a 'Tax Returns (CA)' configuration menu. Verified live on westin-v19: - pnl rendering 3 rows, cash_flow 9, executive_summary 7, annual_statements 5, ca_profit_loss 9 \u2014 each report now renders its own line_specs correctly. - Reporting menu shows 14 Fusion report entries + Tools group. - 136/136 reports + l10n_ca tests pass. Version bumps: reports 19.0.1.1.1, l10n_ca 19.0.1.1.0. Made-with: Cursor
102 lines
5.2 KiB
XML
102 lines
5.2 KiB
XML
<?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.
|
|
|
|
New menus per-report live below; users no longer need to go through
|
|
the period-picker wizard for the standard reports.
|
|
-->
|
|
|
|
<!-- ============================================================
|
|
CORE REPORTS (one per Fusion engine method)
|
|
============================================================ -->
|
|
|
|
<record id="action_fusion_report_pnl" model="ir.actions.act_window">
|
|
<field name="name">Profit and Loss</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">Balance Sheet</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">Trial Balance</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">General Ledger</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">fusion_reports</field>
|
|
<field name="context">{'default_report_type': 'general_ledger', 'default_report_code': 'general_ledger'}</field>
|
|
</record>
|
|
|
|
<!-- ============================================================
|
|
SECONDARY PnL VARIANTS (engine.compute_pnl with code)
|
|
============================================================ -->
|
|
|
|
<record id="action_fusion_report_cash_flow" model="ir.actions.act_window">
|
|
<field name="name">Cash Flow Statement</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">Executive Summary</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">Annual Statements</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">Tax Summary</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">fusion_reports</field>
|
|
<field name="context">{'default_report_type': 'trial_balance', 'default_report_code': 'tax_summary'}</field>
|
|
</record>
|
|
|
|
<!-- ============================================================
|
|
PARTNER-GROUPED REPORTS
|
|
============================================================ -->
|
|
|
|
<record id="action_fusion_report_aged_receivable" model="ir.actions.act_window">
|
|
<field name="name">Aged Receivable</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">Aged Payable</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">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">
|
|
<field name="name">Partner Ledger</field>
|
|
<field name="res_model">fusion.report</field>
|
|
<field name="view_mode">fusion_reports</field>
|
|
<field name="context">{'default_report_type': 'partner_ledger', 'default_report_code': 'partner_ledger'}</field>
|
|
</record>
|
|
</odoo>
|