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
This commit is contained in:
gsinghpal
2026-04-19 01:09:42 -04:00
parent 6731260cde
commit 51b26838b9
11 changed files with 541 additions and 236 deletions

View File

@@ -0,0 +1,25 @@
# fusion_accounting_core — Cursor / Claude Context
## Purpose
Foundation for the Fusion Accounting sub-module suite. Owns:
- Three security groups (User / Manager / Admin) shared across all sub-modules
- Shared-field-ownership declarations on `account.move` and `account.reconcile.model`
- Runtime Enterprise-detection helper: `env['ir.module.module']._fusion_is_enterprise_accounting_installed()`
## What lives here
- `models/account_move.py` — declares Enterprise-extension fields with identical
schemas / relation tables. Pure schema-preservation; no business logic.
- `models/account_reconcile_model.py` — same pattern for `created_automatically`
- `models/ir_module_module.py` — Enterprise-detection helpers
- `security/fusion_accounting_security.xml` — privilege + 3 groups + auto-assignment
## Critical rules
- NEVER add business logic to the shared-field models (account_move.py here).
Logic belongs in the feature sub-module that owns it (e.g. fusion_accounting_bank_rec).
- NEVER rename the relation tables for shared M2Ms. They must match Enterprise verbatim
for the dual-ownership pattern to work.
- Shared fields here have NO defaults beyond what Enterprise sets. The point is preservation.
## Cross-references
- Parent design: `fusion_accounting/docs/superpowers/specs/2026-04-18-fusion-accounting-enterprise-takeover-roadmap-design.md` (Section 3)
- Workspace conventions: `/Users/gurpreet/Github/Odoo-Modules/CLAUDE.md`

View File

@@ -0,0 +1,39 @@
# Fusion Accounting Core
Foundation module for the Fusion Accounting suite.
## What it does
- Defines three security groups: Fusion Accounting User / Manager / Administrator
- Auto-promotes Odoo `account.group_account_user` -> Fusion User and
`account.group_account_manager` -> Fusion Admin
- Declares schema-preservation fields on `account.move` and `account.reconcile.model`
so that Enterprise extension fields (deferred revenue links, signing user, etc.)
survive an Enterprise uninstall
- Exposes the helper `env['ir.module.module']._fusion_is_enterprise_accounting_installed()`
## Install
This module never installs alone. Install `fusion_accounting` (the meta-module)
or any of the feature sub-modules — they all depend on `fusion_accounting_core`.
## Uninstall
Uninstalling `fusion_accounting_core` will remove the security groups and the
schema-preservation fields. If Enterprise is also installed, uninstalling
`fusion_accounting_core` will cause Odoo to consider the deferred / signing
fields owned only by Enterprise — which is the original Enterprise-only state
(no data loss, just back to Enterprise-controlled schema).
## Troubleshooting
If users are missing the "Fusion Accounting" privilege section in user settings
after install, the `implied_ids` mechanism only fires for newly-added users.
Backfill existing users via SQL:
INSERT INTO res_groups_users_rel (gid, uid)
SELECT g.res_id, gu.uid
FROM res_groups_users_rel gu
JOIN ir_model_data g ON g.module = 'fusion_accounting_core' AND g.name = 'group_fusion_accounting_user'
JOIN ir_model_data ag ON ag.module = 'account' AND ag.name = 'group_account_user' AND gu.gid = ag.res_id
ON CONFLICT DO NOTHING;

View File

@@ -0,0 +1,28 @@
# UPGRADE_NOTES — fusion_accounting_core
## V19.0.1.0.0 (initial — Phase 0)
### Reference sources
- `RePackaged-Odoo/accounting/account_accountant/models/account_move.py` (Enterprise extension fields read for schema match)
- `RePackaged-Odoo/accounting/account_accountant/models/account_reconcile_model.py` (same)
### Mirror-zone files (none in _core — _core has no Mirror zone)
### Abstract-zone files (all of _core is abstract)
- `models/account_move.py`
- `models/account_reconcile_model.py`
- `models/ir_module_module.py`
### Intentional deltas from Odoo
- Shared-field declarations have NO compute methods, NO @api decorators beyond
basic field types. Enterprise's account_move.py adds compute methods and
business logic; we deliberately do not duplicate them. When Enterprise is
installed, its compute methods run; when it's not, the fields are simply
unused (until a fusion sub-module decides to own that behavior).
### Migrations
- `migrations/19.0.1.0.0/pre-migration.py` — rehome fusion security xml-ids
from module='fusion_accounting' to module='fusion_accounting_core' BEFORE
data-load (avoids unique-constraint crash on upgrade from pre-Phase-0)
- `migrations/19.0.1.0.0/post-migration.py` — idempotent safety-net for the
same rehome (zero-op if pre-migration already ran)