Files
Odoo-Modules/fusion_accounting_migration/wizards/migration_wizard_views.xml
gsinghpal db90b1ad5b feat(fusion_accounting_migration): add Enterprise uninstall safety guard + wizard skeleton
Phase 0 Task 17. Installs a safety guard on ir.module.module that blocks
uninstall of Odoo Enterprise accounting modules (account_accountant,
account_reports, accountant, account_followup, account_asset,
account_budget, account_loans) until the per-module migration flag
fusion_accounting.migration.<name>.completed is set to True. Guard
covers both button_immediate_uninstall (UI) and module_uninstall
(CLI/API) paths, raising UserError with a pointer to the migration
wizard and an escape hatch config parameter.

Also ships a TransientModel fusion.migration.wizard as a shell: it
detects installed Enterprise modules via GUARDED_MODULES and exposes
action_run_migration for sub-modules to extend in later phases. No
per-feature migrations are registered yet -- Phase 1+ sub-modules will
hook in their own steps.

Tests: TestSafetyGuard x2 pass (blocked-when-pending verified with
account_accountant installed; not-blocked-when-completed verified by
setting the flag).

Made-with: Cursor
2026-04-19 00:36:09 -04:00

29 lines
1.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_fusion_migration_wizard_form" model="ir.ui.view">
<field name="name">fusion.migration.wizard.form</field>
<field name="model">fusion.migration.wizard</field>
<field name="arch" type="xml">
<form string="Migrate from Enterprise">
<sheet>
<group>
<field name="enterprise_modules_detected" readonly="1"/>
<field name="notes" readonly="1"/>
</group>
</sheet>
<footer>
<button name="action_run_migration" type="object" string="Run Migration" class="btn-primary"/>
<button special="cancel" string="Close" class="btn-secondary"/>
</footer>
</form>
</field>
</record>
<record id="action_fusion_migration_wizard" model="ir.actions.act_window">
<field name="name">Migrate from Enterprise</field>
<field name="res_model">fusion.migration.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</odoo>