fix(fusion_accounting): unified Accounting menu under one root, hide migration when Enterprise gone
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

User reported two UX problems after the Enterprise uninstall:
1. Each Fusion sub-module showed up as its own standalone app in the
   launcher (Bank Reconciliation, Financial Reports, Asset Management,
   Customer Follow-ups, Fusion AI). Should look like ONE Accounting app.
2. Clicking the 'Fusion Accounting' app still opened the migration
   wizard even though Enterprise had been uninstalled and there was
   nothing to migrate.

Fix:
- Move all Fusion sub-module roots under the Community account.menu_finance
  hierarchy:
    * Bank Reconciliation \u2192 Accounting > Bank Reconciliation
    * Asset Management    \u2192 Accounting > Asset Management
    * Financial Reports   \u2192 Reporting > Financial Reports
    * Follow-ups          \u2192 Customers > Follow-ups
    * Fusion AI           \u2192 Configuration > Fusion AI
    * Migrate from Ent.   \u2192 Configuration > Migrate from Enterprise
- Rename Community's 'Invoicing' top-level menu to 'Accounting' (what
  Enterprise's accountant module did). Set the Fusion icon on it. This
  rename lives in the meta-module so it only fires when the full suite
  is installed.
- Add second computed group 'group_fusion_show_when_enterprise_present'
  (inverse of the existing 'absent' group). Migration menus are gated
  by this group, so they auto-hide once Enterprise is uninstalled.
- _fusion_recompute_coexistence_group now maintains both groups in lockstep.
- Meta-module now also depends on l10n_ca, hr_payroll, ocr, documents
  (the Phase 6/7 sub-modules) for one-click full-suite install.
- Fusion AI menu's old parent ('accountant.menu_accounting') was deleted
  with the Enterprise uninstall \u2014 reparented under Configuration.

Result: single 'Accounting' top-level menu containing the standard
V19 Community structure (Dashboard / Customers / Vendors / Accounting /
Reporting / Configuration), with all Fusion features slotted into the
appropriate sub-section. Verified live on westin-v19: 6 separate
Fusion top-level menus collapsed to 1; coexistence groups recomputed
(absent=10 users, present=0 users); 604/604 tests pass.

Version bump: all touched modules \u2192 19.0.1.1.0.

Made-with: Cursor
This commit is contained in:
gsinghpal
2026-04-20 01:04:49 -04:00
parent bee5ba4d3f
commit 867b5f71a1
17 changed files with 139 additions and 57 deletions

View File

@@ -1,26 +1,30 @@
{
'name': 'Fusion Accounting',
'version': '19.0.1.0.4',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'sequence': 25,
'summary': 'Meta-module that installs the full Fusion Accounting suite (core, AI, migration; bank rec, reports, etc. as later sub-modules ship).',
'summary': 'Meta-module that installs the full Fusion Accounting suite as a Community-edition replacement for Odoo Enterprise accounting.',
'description': """
Fusion Accounting (Meta-Module)
===============================
One-click install of the entire Fusion Accounting suite.
One-click install of the entire Fusion Accounting suite \u2014 a Community-edition
replacement for Odoo Enterprise's accounting modules.
Currently installs:
Sub-modules installed:
- fusion_accounting_core Shared schema, security, runtime helpers
- fusion_accounting_ai AI Co-Pilot (Claude/GPT)
- fusion_accounting_ai AI Co-Pilot (Claude/GPT/local LLM)
- fusion_accounting_migration Transitional Enterprise->Fusion data migration
- fusion_accounting_bank_rec AI-assisted bank reconciliation (Phase 1)
- fusion_accounting_reports AI-augmented financial reports (Phase 2)
- fusion_accounting_assets AI-augmented asset management (Phase 3)
- fusion_accounting_followup AI-augmented customer follow-ups (Phase 4)
- fusion_accounting_bank_rec AI-assisted bank reconciliation
- fusion_accounting_reports AI-augmented financial reports
- fusion_accounting_assets AI-augmented asset management
- fusion_accounting_followup AI-augmented customer follow-ups
- fusion_accounting_l10n_ca Canadian reports + tax return tracking
- fusion_accounting_hr_payroll Payroll \u2192 GL bridge (replaces hr_payroll_account)
- fusion_accounting_ocr Tesseract + LLM invoice OCR
- fusion_accounting_documents Documents app \u2194 invoice bridge
Future sub-modules (added per the roadmap as each Phase ships):
- fusion_accounting_dashboard (Phase 5)
- fusion_accounting_budget (Phase 6)
Renames the Community "Invoicing" top-level menu to "Accounting" and slots
all Fusion sub-features as sub-menus, mirroring the Odoo Enterprise UX.
Built by Nexa Systems Inc.
""",
@@ -37,8 +41,14 @@ Built by Nexa Systems Inc.
'fusion_accounting_reports',
'fusion_accounting_assets',
'fusion_accounting_followup',
'fusion_accounting_l10n_ca',
'fusion_accounting_hr_payroll',
'fusion_accounting_ocr',
'fusion_accounting_documents',
],
'data': [
'data/menu_overrides.xml',
],
'data': [],
'installable': True,
'application': True,
'license': 'OPL-1',

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="0">
<!--
Top-level "Invoicing" menu rename + visual rebrand.
V19 Community ships this menu as "Invoicing" with the standard
accounting icon. Odoo Enterprise's `accountant` module renames it
to "Accounting" and swaps the icon. We do the same here so that
once Enterprise is uninstalled, the unified menu still presents
as "Accounting" (not "Invoicing") to users.
This file lives in the meta-module so the rename only takes effect
when the full Fusion suite is installed; sub-modules installed
a-la-carte don't change the menu's name.
-->
<record id="account.menu_finance" model="ir.ui.menu">
<field name="name">Accounting</field>
<field name="web_icon">fusion_accounting,static/description/icon.png</field>
<field name="sequence">25</field>
</record>
</odoo>

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting AI',
'version': '19.0.1.0.1',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'sequence': 26,
'summary': 'AI Co-Pilot for Odoo accounting (Claude/GPT) with conversational interface, dashboard, rules.',

View File

@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Root menu under Accounting (account_accountant uses accountant.menu_accounting) -->
<!-- Lives under Community Accounting "Configuration" sub-menu so the
AI co-pilot is reachable regardless of whether Enterprise is
installed. (Was previously parented to `accountant.menu_accounting`
which doesn't exist after the Enterprise uninstall.) -->
<menuitem id="menu_fusion_accounting_root"
name="Fusion AI"
parent="accountant.menu_accounting"
sequence="8"
parent="account.menu_finance_configuration"
sequence="55"
groups="fusion_accounting_core.group_fusion_accounting_user"/>
<!-- Dashboard -->

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting Assets',
'version': '19.0.1.0.36',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'summary': 'AI-augmented asset management with depreciation schedules.',
'description': """

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Top-level menu (visible only when account_asset Enterprise NOT installed) -->
<!-- Lives under Community Accounting "Accounting" sub-menu. Only visible
when Enterprise's account_asset is absent. -->
<menuitem id="menu_fusion_assets_root"
name="Asset Management"
sequence="60"
web_icon="fusion_accounting_assets,static/description/icon.png"
parent="account.menu_finance_entries"
sequence="25"
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
<!-- Asset list/form -->

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting — Bank Reconciliation',
'version': '19.0.1.0.26',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'sequence': 28,
'summary': 'Native V19 bank reconciliation widget with AI confidence scoring + behavioural learning.',

View File

@@ -20,11 +20,14 @@
</field>
</record>
<!-- Top-level menu — only visible when Enterprise's account_accountant is absent -->
<!-- Container menu lives under the Community Accounting "Accounting"
sub-menu (account.menu_finance_entries). Only visible when
Enterprise's account_accountant is absent (Enterprise's reconcile
widget owns the same UI surface). -->
<menuitem id="menu_fusion_bank_rec_root"
name="Bank Reconciliation"
sequence="40"
web_icon="fusion_accounting_bank_rec,static/description/icon.png"
parent="account.menu_finance_entries"
sequence="15"
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
<menuitem id="menu_fusion_bank_rec_main"
@@ -34,9 +37,8 @@
sequence="10"
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
<!-- Sub-menu for the auto-reconcile wizard -->
<menuitem id="menu_fusion_auto_reconcile_wizard"
name="Auto-Reconcile"
name="Auto-Reconcile\u2026"
parent="menu_fusion_bank_rec_root"
action="action_fusion_auto_reconcile_wizard"
sequence="20"

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting Core',
'version': '19.0.1.0.2',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'sequence': 24,
'summary': 'Shared base for the Fusion Accounting sub-module suite (security, shared schema, runtime helpers).',

View File

@@ -8,20 +8,46 @@ class ResUsers(models.Model):
@api.model
def _fusion_recompute_coexistence_group(self):
"""Set group membership = all internal users iff Enterprise absent.
"""Maintain the two coexistence groups based on Enterprise presence.
- ``group_fusion_show_when_enterprise_absent``: members = all internal
users when NO Enterprise accounting module is installed. Used to
unhide Fusion menus that would conflict with Enterprise UIs.
- ``group_fusion_show_when_enterprise_present``: members = all internal
users when AT LEAST ONE Enterprise accounting module IS installed.
Used to hide migration/transitional UIs once Enterprise has been
uninstalled (so the user doesn't see "Migrate from Enterprise" with
nothing to migrate).
The two groups are mutually exclusive at any moment in time, but a
user can transition between them as Enterprise modules are installed
or uninstalled. Idempotent; safe to call multiple times.
Called from ir.module.module.button_immediate_install / uninstall
overrides. Idempotent; safe to call multiple times.
overrides.
"""
group = self.env.ref(
absent_group = self.env.ref(
'fusion_accounting_core.group_fusion_show_when_enterprise_absent',
raise_if_not_found=False,
)
if not group:
present_group = self.env.ref(
'fusion_accounting_core.group_fusion_show_when_enterprise_present',
raise_if_not_found=False,
)
if not absent_group and not present_group:
return
enterprise_installed = self.env['ir.module.module']._fusion_is_enterprise_accounting_installed()
if enterprise_installed:
group.sudo().write({'user_ids': [(5, 0, 0)]})
else:
all_internal = self.sudo().search([('share', '=', False)])
group.sudo().write({'user_ids': [(6, 0, all_internal.ids)]})
if enterprise_installed:
if absent_group:
absent_group.sudo().write({'user_ids': [(5, 0, 0)]})
if present_group:
present_group.sudo().write({'user_ids': [(6, 0, all_internal.ids)]})
else:
if absent_group:
absent_group.sudo().write({'user_ids': [(6, 0, all_internal.ids)]})
if present_group:
present_group.sudo().write({'user_ids': [(5, 0, 0)]})

View File

@@ -49,4 +49,12 @@
<field name="name">Fusion: Show menus when Enterprise absent</field>
<field name="comment">Computed group. Membership: all internal users when no Enterprise accounting module is installed. Used to hide fusion sub-module menus that would conflict with Enterprise UIs.</field>
</record>
<!-- Phase 8: inverse coexistence group \u2014 visible only when Enterprise IS present.
Used to hide migration/transitional UIs once the migration is complete and
Enterprise has been uninstalled. -->
<record id="group_fusion_show_when_enterprise_present" model="res.groups">
<field name="name">Fusion: Show menus when Enterprise present</field>
<field name="comment">Computed group. Membership: all internal users WHEN at least one Enterprise accounting module is installed. Used to hide migration/transitional UIs that are irrelevant once Enterprise has been uninstalled.</field>
</record>
</odoo>

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting Follow-up',
'version': '19.0.1.0.30',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'summary': 'AI-augmented customer follow-ups (dunning) for unpaid invoices.',
'description': """

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Top-level menu (visible only when account_followup Enterprise NOT installed) -->
<!-- Lives under Community Accounting "Customers" sub-menu. Only visible
when Enterprise's account_followup is absent. -->
<menuitem id="menu_fusion_followup_root"
name="Customer Follow-ups"
sequence="70"
web_icon="fusion_accounting_followup,static/description/icon.png"
name="Follow-ups"
parent="account.menu_finance_receivables"
sequence="50"
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
<!-- Partners list (gated to overdue) -->

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting Migration',
'version': '19.0.1.0.0',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'sequence': 27,
'summary': 'Transitional module: migrates Odoo Enterprise accounting data to Fusion Accounting tables before Enterprise uninstall.',

View File

@@ -27,21 +27,29 @@
</record>
<!--
Top-level "Fusion Accounting" menu so the UserError guidance
("Fusion Accounting -> Migrate from Enterprise") is actually reachable.
Placed at top level (no parent) because the migration is a one-time
admin task; making it visible during switchover is the point.
`groups` hides the menu from non-admins (mirroring the ACL on the wizard).
Migration wizard lives under Accounting > Configuration, and is
ONLY visible while at least one Enterprise accounting module is
still installed. Once the operator has uninstalled Enterprise, the
wizard is hidden \u2014 there's nothing left to migrate.
Visibility is gated by the intersection of:
- group_fusion_accounting_admin (admin-only feature)
- group_fusion_show_when_enterprise_present (computed: members
iff at least one Enterprise accounting module is installed)
-->
<!-- Note: gating uses ONLY group_fusion_show_when_enterprise_present.
Admin-restriction is enforced via the model ACL
(ir.model.access.csv only grants access to group_fusion_accounting_admin).
Odoo `groups=` on menuitems uses OR semantics, so listing both groups
would let any admin see the menu even after Enterprise is uninstalled. -->
<menuitem id="menu_fusion_migration_root"
name="Fusion Accounting"
sequence="95"
web_icon="fusion_accounting_migration,static/description/icon.png"
groups="fusion_accounting_core.group_fusion_accounting_admin"/>
<menuitem id="menu_fusion_migration_wizard"
name="Migrate from Enterprise"
parent="account.menu_finance_configuration"
sequence="95"
groups="fusion_accounting_core.group_fusion_show_when_enterprise_present"/>
<menuitem id="menu_fusion_migration_wizard"
name="Run Migration Wizard"
parent="menu_fusion_migration_root"
action="action_fusion_migration_wizard"
sequence="10"
groups="fusion_accounting_core.group_fusion_accounting_admin"/>
groups="fusion_accounting_core.group_fusion_show_when_enterprise_present"/>
</odoo>

View File

@@ -1,6 +1,6 @@
{
'name': 'Fusion Accounting Reports',
'version': '19.0.1.0.38',
'version': '19.0.1.1.0',
'category': 'Accounting/Accounting',
'summary': 'AI-augmented financial reports (P&L, balance sheet, trial balance, GL).',
'description': """

View File

@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Lives under Community Accounting "Reporting" sub-menu. Only visible
when Enterprise's account_reports is absent. -->
<menuitem id="menu_fusion_reports_root"
name="Financial Reports"
sequence="50"
web_icon="fusion_accounting_reports,static/description/icon.png"
parent="account.menu_finance_reports"
sequence="2"
groups="fusion_accounting_core.group_fusion_show_when_enterprise_absent"/>
<menuitem id="menu_fusion_reports_open"