diff --git a/fusion_accounting_l10n_ca/__manifest__.py b/fusion_accounting_l10n_ca/__manifest__.py index 1fc3db66..fafa7cca 100644 --- a/fusion_accounting_l10n_ca/__manifest__.py +++ b/fusion_accounting_l10n_ca/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Fusion Accounting — Canadian Reports', - 'version': '19.0.1.0.0', + 'version': '19.0.1.1.0', 'category': 'Accounting/Localizations/Reporting', 'summary': 'Canadian-specific report definitions and tax return templates for Fusion Accounting.', 'description': """ @@ -21,6 +21,7 @@ Auto-installs when l10n_ca + fusion_accounting_reports are both present. 'data/fusion_tax_return_data.xml', 'data/report_ca_balance_sheet.xml', 'data/report_ca_profit_loss.xml', + 'views/menu_views.xml', ], 'auto_install': ['l10n_ca', 'fusion_accounting_reports'], 'installable': True, diff --git a/fusion_accounting_l10n_ca/views/menu_views.xml b/fusion_accounting_l10n_ca/views/menu_views.xml new file mode 100644 index 00000000..8f3786d8 --- /dev/null +++ b/fusion_accounting_l10n_ca/views/menu_views.xml @@ -0,0 +1,56 @@ + + + + + + Profit and Loss (Canada) + fusion.report + fusion_reports + {'default_report_type': 'pnl', 'default_report_code': 'ca_profit_loss', 'default_comparison': 'previous_year'} + + + + Balance Sheet (Canada) + fusion.report + fusion_reports + {'default_report_type': 'balance_sheet', 'default_report_code': 'ca_balance_sheet', 'default_comparison': 'previous_period'} + + + + + + + + Tax Returns + fusion.tax.return + list,form + + No tax returns recorded yet + Track GST/HST/PST/T4/T5018/payroll-remittance filings. + Each return covers a (date_from, date_to) window and moves + from draft \u2192 to-file \u2192 filed as you submit it. + + + + + diff --git a/fusion_accounting_reports/__manifest__.py b/fusion_accounting_reports/__manifest__.py index 9a73b6da..476f5e28 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.0', + 'version': '19.0.1.1.1', 'category': 'Accounting/Accounting', 'summary': 'AI-augmented financial reports (P&L, balance sheet, trial balance, GL).', 'description': """ @@ -47,6 +47,7 @@ menu hides; the engine and AI tools remain available for the chat. 'reports/report_pdf_template.xml', 'wizards/xlsx_export_wizard_views.xml', 'wizards/period_picker_wizard_views.xml', + 'views/report_actions.xml', 'views/menu_views.xml', ], 'external_dependencies': { diff --git a/fusion_accounting_reports/static/src/components/period_filter/period_filter.js b/fusion_accounting_reports/static/src/components/period_filter/period_filter.js index 2d0af5a0..decce061 100644 --- a/fusion_accounting_reports/static/src/components/period_filter/period_filter.js +++ b/fusion_accounting_reports/static/src/components/period_filter/period_filter.js @@ -15,9 +15,11 @@ export class PeriodFilter extends Component { async onReportTypeChange(ev) { const reportType = ev.target.value; if (reportType && this.state.dateFrom && this.state.dateTo) { + // Switching report type clears the report_code (user is picking + // a different category, not a variant). await this.reports.runReport( reportType, this.state.dateFrom, this.state.dateTo, - this.state.comparison); + this.state.comparison, null); } } @@ -27,7 +29,8 @@ export class PeriodFilter extends Component { await this.reports.runReport( this.state.currentReportType, this.state.dateFrom, this.state.dateTo, - this.state.comparison); + this.state.comparison, + this.state.currentReportCode); } } diff --git a/fusion_accounting_reports/static/src/services/reports_service.js b/fusion_accounting_reports/static/src/services/reports_service.js index e772c936..65a18bf5 100644 --- a/fusion_accounting_reports/static/src/services/reports_service.js +++ b/fusion_accounting_reports/static/src/services/reports_service.js @@ -16,6 +16,7 @@ export class ReportsService { this.state = reactive({ availableReports: [], currentReportType: null, + currentReportCode: null, currentResult: null, currentAnomalies: [], currentCommentary: null, @@ -41,15 +42,17 @@ export class ReportsService { } } - async runReport(reportType, dateFrom, dateTo, comparison = 'none') { + async runReport(reportType, dateFrom, dateTo, comparison = 'none', reportCode = null) { this.state.isLoading = true; this.state.currentReportType = reportType; + this.state.currentReportCode = reportCode; this.state.dateFrom = dateFrom; this.state.dateTo = dateTo; this.state.comparison = comparison; try { this.state.currentResult = await this.rpc(`${ENDPOINT_BASE}/run`, { report_type: reportType, + report_code: reportCode, date_from: dateFrom, date_to: dateTo, comparison: comparison, @@ -136,7 +139,8 @@ export class ReportsService { this.state.comparison = mode; if (this.state.currentReportType) { return this.runReport(this.state.currentReportType, - this.state.dateFrom, this.state.dateTo, mode); + this.state.dateFrom, this.state.dateTo, mode, + this.state.currentReportCode); } } } diff --git a/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.js b/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.js index b99ec52b..3c357f5e 100644 --- a/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.js +++ b/fusion_accounting_reports/static/src/views/report_viewer/report_viewer.js @@ -22,6 +22,11 @@ export class ReportViewer extends Component { const ctx = this.props.action?.context || {}; const reportType = ctx.default_report_type || 'pnl'; + // default_report_code lets multiple reports of the same type + // (e.g. pnl, cash_flow, executive_summary, annual_statements all + // type='pnl') resolve to their own line_specs. + const reportCode = ctx.default_report_code || null; + const comparison = ctx.default_comparison || 'none'; const companyId = this.env.services.user?.context?.allowed_company_ids?.[0]; onWillStart(async () => { @@ -29,7 +34,8 @@ export class ReportViewer extends Component { const today = new Date(); const year = today.getFullYear(); await this.reports.runReport( - reportType, `${year}-01-01`, `${year}-12-31`, 'none'); + reportType, `${year}-01-01`, `${year}-12-31`, + comparison, reportCode); }); } diff --git a/fusion_accounting_reports/views/menu_views.xml b/fusion_accounting_reports/views/menu_views.xml index 1c291af1..47750a6d 100644 --- a/fusion_accounting_reports/views/menu_views.xml +++ b/fusion_accounting_reports/views/menu_views.xml @@ -1,23 +1,111 @@ - - + + + + + + + + + + + + + + + + + + + + + - @@ -30,7 +118,7 @@ diff --git a/fusion_accounting_reports/views/report_actions.xml b/fusion_accounting_reports/views/report_actions.xml new file mode 100644 index 00000000..78e7b756 --- /dev/null +++ b/fusion_accounting_reports/views/report_actions.xml @@ -0,0 +1,101 @@ + + + + + + + + Profit and Loss + fusion.report + fusion_reports + {'default_report_type': 'pnl', 'default_report_code': 'pnl'} + + + + Balance Sheet + fusion.report + fusion_reports + {'default_report_type': 'balance_sheet', 'default_report_code': 'balance_sheet'} + + + + Trial Balance + fusion.report + fusion_reports + {'default_report_type': 'trial_balance', 'default_report_code': 'trial_balance'} + + + + General Ledger + fusion.report + fusion_reports + {'default_report_type': 'general_ledger', 'default_report_code': 'general_ledger'} + + + + + + Cash Flow Statement + fusion.report + fusion_reports + {'default_report_type': 'pnl', 'default_report_code': 'cash_flow', 'default_comparison': 'previous_year'} + + + + Executive Summary + fusion.report + fusion_reports + {'default_report_type': 'pnl', 'default_report_code': 'executive_summary', 'default_comparison': 'previous_year'} + + + + Annual Statements + fusion.report + fusion_reports + {'default_report_type': 'pnl', 'default_report_code': 'annual_statements', 'default_comparison': 'previous_year'} + + + + Tax Summary + fusion.report + fusion_reports + {'default_report_type': 'trial_balance', 'default_report_code': 'tax_summary'} + + + + + + Aged Receivable + fusion.report + fusion_reports + {'default_report_type': 'aged_receivable', 'default_report_code': 'aged_receivable'} + + + + Aged Payable + fusion.report + fusion_reports + {'default_report_type': 'aged_payable', 'default_report_code': 'aged_payable'} + + + + Partner Ledger + fusion.report + fusion_reports + {'default_report_type': 'partner_ledger', 'default_report_code': 'partner_ledger'} + +
No tax returns recorded yet
Track GST/HST/PST/T4/T5018/payroll-remittance filings. + Each return covers a (date_from, date_to) window and moves + from draft \u2192 to-file \u2192 filed as you submit it.