# Graph Report - /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports (2026-04-22) ## Corpus Check - 66 files · ~18,059 words - Verdict: corpus is large enough that graph structure adds value. ## Summary - 457 nodes · 729 edges · 38 communities detected - Extraction: 69% EXTRACTED · 31% INFERRED · 0% AMBIGUOUS · INFERRED: 229 edges (avg confidence: 0.71) - Token cost: 0 input · 0 output ## Community Hubs (Navigation) - [[_COMMUNITY_Community 0|Community 0]] - [[_COMMUNITY_Community 1|Community 1]] - [[_COMMUNITY_Community 2|Community 2]] - [[_COMMUNITY_Community 3|Community 3]] - [[_COMMUNITY_Community 4|Community 4]] - [[_COMMUNITY_Community 5|Community 5]] - [[_COMMUNITY_Community 6|Community 6]] - [[_COMMUNITY_Community 7|Community 7]] - [[_COMMUNITY_Community 8|Community 8]] - [[_COMMUNITY_Community 9|Community 9]] - [[_COMMUNITY_Community 10|Community 10]] - [[_COMMUNITY_Community 11|Community 11]] - [[_COMMUNITY_Community 12|Community 12]] - [[_COMMUNITY_Community 13|Community 13]] - [[_COMMUNITY_Community 14|Community 14]] - [[_COMMUNITY_Community 15|Community 15]] - [[_COMMUNITY_Community 16|Community 16]] - [[_COMMUNITY_Community 17|Community 17]] - [[_COMMUNITY_Community 18|Community 18]] - [[_COMMUNITY_Community 19|Community 19]] - [[_COMMUNITY_Community 20|Community 20]] - [[_COMMUNITY_Community 21|Community 21]] - [[_COMMUNITY_Community 22|Community 22]] - [[_COMMUNITY_Community 23|Community 23]] - [[_COMMUNITY_Community 24|Community 24]] - [[_COMMUNITY_Community 25|Community 25]] - [[_COMMUNITY_Community 26|Community 26]] - [[_COMMUNITY_Community 27|Community 27]] - [[_COMMUNITY_Community 28|Community 28]] - [[_COMMUNITY_Community 29|Community 29]] - [[_COMMUNITY_Community 30|Community 30]] - [[_COMMUNITY_Community 31|Community 31]] - [[_COMMUNITY_Community 32|Community 32]] - [[_COMMUNITY_Community 33|Community 33]] - [[_COMMUNITY_Community 34|Community 34]] - [[_COMMUNITY_Community 35|Community 35]] - [[_COMMUNITY_Community 36|Community 36]] - [[_COMMUNITY_Community 37|Community 37]] ## God Nodes (most connected - your core abstractions) 1. `Period` - 78 edges 2. `TotalLine` - 31 edges 3. `compute_pnl()` - 17 edges 4. `TestFusionReportEngine` - 14 edges 5. `compute_balance_sheet()` - 13 edges 6. `TestReportsController` - 12 edges 7. `TestDatePeriods` - 12 edges 8. `TestSeededReports` - 11 edges 9. `compute_trial_balance()` - 11 edges 10. `run()` - 11 edges ## Surprising Connections (you probably didn't know these) - `Local LLM compat smoke for the commentary generator. Auto-detects an LM Studio` --uses--> `Period` [INFERRED] /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/tests/test_local_llm_compat.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/services/date_periods.py - `Return (base_url, default_model) for the first reachable server, or (None, N` --uses--> `Period` [INFERRED] /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/tests/test_local_llm_compat.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/services/date_periods.py - `Performance benchmarks with P95 targets, tagged 'benchmark'. These tests are no` --uses--> `Period` [INFERRED] /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/tests/test_performance_benchmarks.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/services/date_periods.py - `Verify the seeded fusion.report definitions load and compute sensibly.` --uses--> `Period` [INFERRED] /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/tests/test_seeded_reports.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/services/date_periods.py - `Unit tests for date_periods, account_hierarchy, totaling services.` --uses--> `Period` [INFERRED] /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/tests/test_services_unit.py → /Users/gurpreet/Github/Odoo-Modules/fusion_accounting_reports/services/date_periods.py ## Communities ### Community 0 - "Community 0" Cohesion: 0.05 Nodes (46): Period, compute_balance_sheet(), compute_gl(), compute_pnl(), compute_trial_balance(), drill_down(), FusionReportEngine, The reports engine - orchestrator for all report computation. 5-method public A (+38 more) ### Community 1 - "Community 1" Cohesion: 0.05 Nodes (14): Coexistence tests for fusion_accounting_reports. Mirrors Phase 1's coexistence, The engine is registered regardless of Enterprise install state., TestReportsCoexistence, Tests for fusion.report.commentary cache model., TestFusionReportCommentary, Tests for fusion.report definition model., TestFusionReport, Tests for the 5 fusion AI tools registered in TOOL_DISPATCH. (+6 more) ### Community 2 - "Community 2" Cohesion: 0.08 Nodes (19): comparison_period(), fiscal_year_bounds(), month_bounds(), quarter_bounds(), Date period math for financial reports. Pure-Python helpers that compute: - Fis, Return the fiscal year period containing `reference_date`. Default: calenda, Return the calendar month containing `reference_date`., Return the calendar quarter containing `reference_date`. (+11 more) ### Community 3 - "Community 3" Cohesion: 0.07 Nodes (4): PeriodFilter, ReportTable, ReportViewer, ReportsService ### Community 4 - "Community 4" Cohesion: 0.1 Nodes (12): Anomaly, detect(), Anomaly detection for financial reports. Compares each row's current-period amo, Detect anomalies in a report_result dict (engine output). Returns list of a, _cron_anomaly_scan(), _cron_mv_refresh(), FusionReportsCron, Cron handlers for fusion_accounting_reports. Two scheduled jobs: - _cron_anomal (+4 more) ### Community 5 - "Community 5" Cohesion: 0.11 Nodes (14): generate_commentary(), _get_provider(), AI-generated narrative commentary for financial reports. Takes a report_result, Generate narrative commentary via LLM. Returns dict per the contract. If no, No-LLM fallback that produces a basic narrative from the report data., Look up provider for 'reports_commentary' feature; return None if not configured, _templated_fallback(), Tests for commentary_generator service. (+6 more) ### Community 6 - "Community 6" Cohesion: 0.14 Nodes (7): HttpCase, _percentile(), Performance benchmarks with P95 targets, tagged 'benchmark'. These tests are no, TestControllerBenchmarks, TestEngineBenchmarks, Python wrappers that run the OWL tours via HttpCase.start_tour. Tours require a, TestReportsTours ### Community 7 - "Community 7" Cohesion: 0.18 Nodes (10): AccountNode, build_tree(), filter_by_account_type(), Account hierarchy walker. Given a flat list of accounts with parent_id pointers, Build a forest from a flat list of account dicts. Each dict must have keys:, Depth-first walk yielding (node, depth, ancestors)., Return all nodes whose account_type starts with type_prefix (e.g. 'asset_' r, walk() (+2 more) ### Community 8 - "Community 8" Cohesion: 0.17 Nodes (10): test_aggregate_sum_equals_input_sum(), test_balanced_iff_debits_equal_credits(), TestTotaling, aggregate(), aggregate_per_account(), is_balanced(), Move-line aggregation primitives for report totaling. Pure-Python helpers - cal, Aggregate a list of move-line dicts into a TotalLine. Each dict must have: (+2 more) ### Community 9 - "Community 9" Cohesion: 0.22 Nodes (11): compute_partner_grouped(), _build_period(), compare_periods(), drill_down(), export_xlsx(), FusionReportsController, get_anomalies(), get_commentary() (+3 more) ### Community 10 - "Community 10" Cohesion: 0.17 Nodes (8): ConversionRate, convert_amount(), fetch_rates(), Multi-currency conversion for financial reports. Converts move-line amounts to, Convert `amount` from source to target at the given date. `rates` is a dict, Fetch all relevant rates from res.currency.rate as of a given date. Returns, Unit tests for currency_conversion service., TestCurrencyConversion ### Community 11 - "Community 11" Cohesion: 0.19 Nodes (4): FusionReportAnomaly, Persisted anomaly flags from the engine's variance detection. Each row captures, Tests for fusion.report.anomaly model., TestFusionReportAnomaly ### Community 12 - "Community 12" Cohesion: 0.26 Nodes (2): Controller tests using HttpCase for the 8 JSON-RPC endpoints., TestReportsController ### Community 13 - "Community 13" Cohesion: 0.23 Nodes (6): DrillDownRow, fetch_drill_down(), Drill-down: from a report line to its underlying journal items. Given an accoun, Fetch journal items for an account within a date range. Returns flat list o, Tests for drill_down_resolver., TestDrillDownResolver ### Community 14 - "Community 14" Cohesion: 0.22 Nodes (5): build_prompt(), LLM prompt for AI report commentary. Provider-agnostic system + user prompt bui, Build (system_prompt, user_prompt) tuple., Tests for commentary_prompt module., TestCommentaryPrompt ### Community 15 - "Community 15" Cohesion: 0.2 Nodes (6): FusionMigrationWizard, Reports-specific migration step. Ensures the 4 CORE report definitions are pres, Verify all 4 CORE report definitions exist., Override to add reports-bootstrap step at the end of the chain., Tests for the reports-bootstrap migration step., TestMigrationRoundTrip ### Community 16 - "Community 16" Cohesion: 0.22 Nodes (5): FusionAccountBalanceMV, Materialized view of per-account-per-month balances. Created lazily by init() (, _refresh(), Tests for fusion_account_balance MV., TestAccountBalanceMV ### Community 17 - "Community 17" Cohesion: 0.22 Nodes (2): Verify the seeded fusion.report definitions load and compute sensibly., TestSeededReports ### Community 18 - "Community 18" Cohesion: 0.25 Nodes (4): Tests for XLSX export wizard., TestXlsxExport, FusionXlsxExportWizard, XLSX export wizard for fusion financial reports. ### Community 19 - "Community 19" Cohesion: 0.5 Nodes (1): DrillDownDialog ### Community 20 - "Community 20" Cohesion: 0.5 Nodes (1): AnomalyStrip ### Community 21 - "Community 21" Cohesion: 0.67 Nodes (1): Pre-migration: convert legacy act_window report actions to client actions. In 1 ### Community 22 - "Community 22" Cohesion: 0.67 Nodes (2): FusionReport, Persistent definition of a Fusion financial report. Each report (P&L, balance s ### Community 23 - "Community 23" Cohesion: 0.67 Nodes (2): FusionReportCommentary, Cached AI-generated commentary for a report run. One row per (report, period_fr ### Community 24 - "Community 24" Cohesion: 1.0 Nodes (1): AiCommentaryPanel ### Community 25 - "Community 25" Cohesion: 1.0 Nodes (0): ### Community 26 - "Community 26" Cohesion: 1.0 Nodes (0): ### Community 27 - "Community 27" Cohesion: 1.0 Nodes (0): ### Community 28 - "Community 28" Cohesion: 1.0 Nodes (0): ### Community 29 - "Community 29" Cohesion: 1.0 Nodes (0): ### Community 30 - "Community 30" Cohesion: 1.0 Nodes (0): ### Community 31 - "Community 31" Cohesion: 1.0 Nodes (0): ### Community 32 - "Community 32" Cohesion: 1.0 Nodes (0): ### Community 33 - "Community 33" Cohesion: 1.0 Nodes (1): Run last-month P&L vs prior-year-same-month and persist anomalies. ### Community 34 - "Community 34" Cohesion: 1.0 Nodes (1): REFRESH CONCURRENTLY via dedicated autocommit cursor. REFRESH MATERIALI ### Community 35 - "Community 35" Cohesion: 1.0 Nodes (1): Refresh the MV. Falls back to non-concurrent if CONCURRENTLY fails. REF ### Community 36 - "Community 36" Cohesion: 1.0 Nodes (0): ### Community 37 - "Community 37" Cohesion: 1.0 Nodes (0): ## Knowledge Gaps - **66 isolated node(s):** `Pre-migration: convert legacy act_window report actions to client actions. In 1`, `Unit tests for anomaly_detection service.`, `Tests for commentary_prompt module.`, `Tests for the PDF export.`, `Tests for fusion.report.commentary cache model.` (+61 more) These have ≤1 connection - possible missing edges or undocumented components. - **Thin community `Community 24`** (2 nodes): `AiCommentaryPanel`, `ai_commentary_panel.js` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 25`** (1 nodes): `__init__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 26`** (1 nodes): `__init__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 27`** (1 nodes): `__init__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 28`** (1 nodes): `__init__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 29`** (1 nodes): `__init__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 30`** (1 nodes): `__init__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 31`** (1 nodes): `__init__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 32`** (1 nodes): `__manifest__.py` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 33`** (1 nodes): `Run last-month P&L vs prior-year-same-month and persist anomalies.` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 34`** (1 nodes): `REFRESH CONCURRENTLY via dedicated autocommit cursor. REFRESH MATERIALI` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 35`** (1 nodes): `Refresh the MV. Falls back to non-concurrent if CONCURRENTLY fails. REF` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 36`** (1 nodes): `reports_tours.js` Too small to be a meaningful cluster - may be noise or needs more connections extracted. - **Thin community `Community 37`** (1 nodes): `report_viewer_view.js` Too small to be a meaningful cluster - may be noise or needs more connections extracted. ## Suggested Questions _Questions this graph is uniquely positioned to answer:_ - **Why does `Period` connect `Community 0` to `Community 2`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 17`, `Community 18`?** _High betweenness centrality (0.301) - this node is a cross-community bridge._ - **Why does `TestControllerBenchmarks` connect `Community 6` to `Community 0`?** _High betweenness centrality (0.085) - this node is a cross-community bridge._ - **Why does `TestCurrencyConversion` connect `Community 10` to `Community 1`?** _High betweenness centrality (0.055) - this node is a cross-community bridge._ - **Are the 72 inferred relationships involving `Period` (e.g. with `TestServiceInvariants` and `TestLineResolverInvariants`) actually correct?** _`Period` has 72 INFERRED edges - model-reasoned connections that need verification._ - **Are the 29 inferred relationships involving `TotalLine` (e.g. with `TestServiceInvariants` and `TestLineResolverInvariants`) actually correct?** _`TotalLine` has 29 INFERRED edges - model-reasoned connections that need verification._ - **Are the 14 inferred relationships involving `compute_pnl()` (e.g. with `.test_commentary_with_local_llm()` and `.test_compute_pnl_p95()`) actually correct?** _`compute_pnl()` has 14 INFERRED edges - model-reasoned connections that need verification._ - **What connects `Pre-migration: convert legacy act_window report actions to client actions. In 1`, `Unit tests for anomaly_detection service.`, `Tests for commentary_prompt module.` to the rest of the system?** _66 weakly-connected nodes found - possible documentation gaps or missing edges._