Commit Graph

16 Commits

Author SHA1 Message Date
gsinghpal
fe003567a9 docs(fusion_accounting): Phase 1 bank reconciliation implementation plan
51 tasks across 17 groups covering the full Phase 1 build:

Group 1 (5 tasks): Foundation — branch, sub-module skeleton, shared
fields on _core, LLMProvider contract for local LLM readiness

Group 2 (8 tasks): Reconcile engine — TDD-layered build of
matching_strategies, exchange_diff, memo_tokenizer, precedent_lookup,
pattern_extractor, confidence_scoring 4-pass pipeline, the AbstractModel
engine with 6-method API, and Hypothesis property-based tests

Group 3 (4 tasks): Models — fusion.reconcile.pattern,
fusion.reconcile.precedent, fusion.reconcile.suggestion, widget transient,
and inherits on Community account.bank.statement.line + account.reconcile.model

Group 4-5 (6 tasks): Integration tests with SQL fixtures from real Westin
reconciles + AI prompts + adapter fill-ins + AI tools refactor

Group 6-7 (3 tasks): Materialized view, cron schedules, and 10-endpoint
JSON-RPC controller with auth guards

Group 8-10 (10 tasks): Frontend — SCSS tokens, service, kanban controllers,
all 18 Enterprise-mirror OWL components, and 5 fusion-only components
(ai_suggestion folder, batch_action_bar, attachment_strip,
partner_history_panel, reconcile_model_picker)

Group 11-13 (5 tasks): Wizards (auto-reconcile + bulk), migration wizard
inheritance with bootstrap of 16,500 historical reconciliations + audit
report PDF + round-trip test, coexistence menu/group + tests

Group 14-16 (3 tasks): 5 OWL tour tests, performance benchmarks against
P95 targets, local LLM compatibility test against LM Studio

Group 17 (4 tasks): Closeout — meta-module manifest update, sub-module
docs, end-to-end smoke test, completion tag

TDD discipline throughout: every code task is red test → impl → green
→ commit. Property-based tests for amount invariants. Migration round-
trip test asserts byte-identical reconciliation state pre/post Enterprise
uninstall. All testing on local OrbStack VM only (environment-safety
rule applies).

Made-with: Cursor
2026-04-19 09:45:25 -04:00
gsinghpal
2d64f7efab docs(fusion_accounting): Phase 1 bank reconciliation design
Drafts the design for fusion_accounting_bank_rec — a native bank
reconciliation widget that replaces Odoo Enterprise account_accountant
in V19 OWL architecture, with a clean-room reconcile engine reading and
writing Community account.partial.reconcile rows.

Key design decisions captured:
- CORE scope (~5.5-6 weeks): manual + auto reconcile, write-offs,
  partial, multi-currency, chatter, model picker
- Strict mirror of all 18 Enterprise OWL units (zero functional loss)
  plus 5 fusion-only additions for AI/history visibility
- Hybrid AI badge layout: inline strip with one-click Accept plus
  expandable ranked-alternatives panel
- Behavioural learning via fusion.reconcile.pattern (per-partner) and
  fusion.reconcile.precedent (per-decision memory) with bootstrap from
  the 16,500 historical reconciliations
- Local LLM ready via OpenAI-compatible adapter base_url config and
  per-feature provider routing — works against LM Studio, Ollama, vLLM
- Statistical-mode-without-API-key as a first-class path
- Coexistence with Enterprise: Enterprise wins by default, fusion
  menu hides until uninstall, then auto-appears
- Migration wizard step bootstraps pattern memory and produces an
  audit report PDF proving every reconciliation preserved
- TDD on engine algorithms with Hypothesis property-based tests for
  amount invariants; migration round-trip integration test

Builds on Phase 0 (commit c450bb2, range pre-phase-0..phase-0-complete).

Made-with: Cursor
2026-04-19 09:27:52 -04:00
gsinghpal
8b20853ac7 feat(fusion_accounting): set module icon from Work in Progress source
Drops the 73KB icon.png into each of the four sub-modules
(fusion_accounting meta, _core, _ai, _migration) so Odoo's Apps page
renders the branded icon for each. Meta-module manifest 'icon' path
now points to its own icon instead of the AI sub-module's.

Made-with: Cursor
2026-04-19 08:13:53 -04:00
gsinghpal
5b7ff6f13c docs(fusion_accounting): record Phase 0 empirical uninstall test results
Task 18 — empirical verification of the data-preservation claims in
Section 3 of the Enterprise Takeover Roadmap.

Key empirical findings (verified on westin-v19 live DB + clone):

1. Safety guard blocks Enterprise uninstall (Scenario A, verified on
   throwaway clone) — UserError fires with the correct migration-wizard
   guidance message.

2. Bank reconciliation tables (account.partial.reconcile,
   account.full.reconcile) are owned exclusively by Community account
   module. 30,874 reconciliation rows (16,500 partial + 14,374 full)
   confirmed immune to any Enterprise uninstall.

3. All 5 Enterprise extension fields on account.move (deferred_move_ids,
   deferred_original_move_ids, deferred_entry_type, signing_user,
   payment_state_before_switch) are dual-owned by account_accountant
   AND fusion_accounting_core. Odoo's module-ownership ledger will
   preserve columns/relations when Enterprise uninstalls.

4. account.reconcile.model is triple-owned (account + account_accountant
   + fusion_accounting_core). Reconciliation rules survive.

5. account.move has 36 module owners; table cannot be dropped by any
   realistic uninstall scenario.

A full destructive uninstall cycle on a clone was attempted but blocked
by pre-existing data-integrity issues in westin-v19 (orphan FK references
in payslip_tags_table + account_account_res_company_rel — outside fusion
scope). The schema-ownership verification approach provides stronger
evidence than a point-in-time count comparison — it proves the invariants
hold for any real-world data shape, not just a single fixture.

Test clone westin-v19-phase0-empirical dropped after testing. No live
data was modified.

Phase 0 data-preservation design is empirically validated. Phase 1 can
proceed.

Made-with: Cursor
2026-04-19 07:20:15 -04:00
gsinghpal
d7cc334c98 docs(fusion_accounting): record Phase 0 smoke test results
Some checks failed
fusion_accounting CI / test (fusion_accounting_ai) (push) Has been cancelled
fusion_accounting CI / test (fusion_accounting_core) (push) Has been cancelled
fusion_accounting CI / test (fusion_accounting_migration) (push) Has been cancelled
Made-with: Cursor
2026-04-19 01:29:22 -04:00
gsinghpal
f0577c1788 ci(fusion_accounting): add CI workflow scaffold + Phase 0 deferral note
Workflow structure is complete (path filters, matrix, services).
The 'Install Odoo 19' step is a TODO placeholder — the reproducible
Odoo-19 build environment is deferred to Phase 1 CI hardening.
Current Phase 0 test workflow is manual via ssh odoo-westin.

Made-with: Cursor
2026-04-19 01:18:36 -04:00
gsinghpal
51b26838b9 docs(fusion_accounting): per-sub-module CLAUDE.md, UPGRADE_NOTES.md, README.md
Task 20 of Phase 0: document the sub-module split.

- fusion_accounting_core: foundation doc covering security groups, shared-field
  schema preservation, and the Enterprise-detection helper.
- fusion_accounting_ai: preserves the original module's AI-specific design
  decisions, Odoo 19 gotchas, deployment commands, controllers, models, theme
  rules, and known issues. Adds a new Data-adapter pattern section documenting
  tri-mode routing (fusion / enterprise / community).
- fusion_accounting_migration: doc for the Enterprise uninstall safety guard
  and the wizard shell that future feature sub-modules will extend.
- fusion_accounting (meta): rewritten CLAUDE.md as a pure overview pointing at
  sub-modules, plus a new README.md covering one-click install/uninstall.

Each sub-module now has CLAUDE.md (Cursor/Claude context), UPGRADE_NOTES.md
(version-by-version deltas / reference sources), and README.md (user-facing
install/usage docs). 11 files total.

Made-with: Cursor
2026-04-19 01:10:17 -04:00
gsinghpal
6731260cde feat(fusion_accounting): add check_odoo_diff.sh for cross-version upgrade ritual
Made-with: Cursor
2026-04-19 00:56:49 -04:00
gsinghpal
7ac01991e5 refactor(fusion_accounting): move security groups to _core, add multi-company session rule
Made-with: Cursor
2026-04-19 00:14:36 -04:00
gsinghpal
1c44f458ad refactor(fusion_accounting): convert to meta-module that depends on sub-modules
Made-with: Cursor
2026-04-18 22:10:26 -04:00
gsinghpal
6c72f2ab49 refactor(fusion_accounting): move AI module code into fusion_accounting_ai sub-module
git mv preserves history. fusion_accounting/ retains only __manifest__.py,
__init__.py, CLAUDE.md, and docs/ — the meta-module shell. All Python,
data, views, security, services, static, tests, wizards, report move to
fusion_accounting_ai/. Manifest data list updated; security.xml move to
_core deferred to Task 12.

Made-with: Cursor
2026-04-18 21:45:06 -04:00
gsinghpal
76c898aadf docs(fusion_accounting): Phase 0 foundation implementation plan
Detailed task-by-task plan for executing Phase 0 of the Enterprise
Takeover Roadmap. 22 tasks covering:

- Sub-module skeletons (_core, _ai, _migration) and meta-module conversion
- Move all current AI module code into fusion_accounting_ai with git mv
- ir_model_data ownership reassignment via post-migration script
- Data adapter pattern (base + bank_rec + reports + followup + assets adapters)
- Refactor of every AI tool to route through adapters (pilot in bank_rec, then survey + per-file)
- Strip all hard Enterprise dependencies from manifests
- Enterprise-detection helper and shared-field-ownership models in _core
- Multi-company record rule on fusion.accounting.session (was a Known Issue)
- Migration safety guard that blocks Enterprise uninstall until wizard runs
- Migration wizard skeleton (per-feature migrations added by future phases)
- tools/check_odoo_diff.sh for the annual upgrade ritual
- Per-sub-module CLAUDE.md, UPGRADE_NOTES.md, README.md
- CI pipeline (or deferral note if not yet viable)
- Empirical Enterprise-uninstall verification test on a throwaway instance
- End-to-end smoke test + completion tag

Each task uses TDD where applicable (test fails, implement, test passes,
commit) and concrete validation commands where TDD doesn't fit (file moves,
config changes, manual smoke tests).

Made-with: Cursor
2026-04-18 21:13:07 -04:00
gsinghpal
956678dd27 docs(fusion_accounting): roadmap design for Enterprise takeover
Adds the brainstormed roadmap design that turns fusion_accounting from an
AI-only extension into a full replacement for Odoo 19 Enterprise accounting
(account_accountant, account_reports, accountant, account_followup, plus
selected satellites) for Nexa client deployments.

Covers:
- Sub-module topology (9 modules + meta-module): _core, _bank_rec, _reports,
  _dashboard, _followup, _assets, _budget, _ai, _migration
- Data preservation strategy: bank reconciliations verified preserved
  automatically (live in Community account.partial.reconcile);
  shared-field-ownership pattern for Enterprise extension fields on
  account.move; pre-uninstall migration wizard for Enterprise-only tables
- Phased roadmap: Phase 0 foundation through Phase 7+ optional satellites,
  with Bank Rec as Phase 1 priority and Reports as the largest phase
- Architecture rules: hybrid mirror/abstract zones, fusion.* naming,
  runtime coexistence detection, zero hard Enterprise deps
- Cross-version upgrade workflow: pinned Odoo source snapshots per version,
  annual diff ritual, UPGRADE_NOTES.md per sub-module
- AI integration via adapter pattern (current AI tools route through
  adapters that prefer fusion native, fall back to Enterprise, then to
  pure Community)
- Testing strategy, security, performance, multi-company/currency,
  localization, hosting

Implementation of each phase happens in subsequent sessions, each with
its own writing-plans pass starting with Phase 0 Foundation.

Made-with: Cursor
2026-04-18 20:55:22 -04:00
gsinghpal
3cc93b8783 changes 2026-04-04 15:37:16 -04:00
gsinghpal
c66bdf5089 changes 2026-04-03 15:45:18 -04:00
gsinghpal
4cd7357aa0 changes 2026-04-02 23:40:34 -04:00