Split 49 modules/suites into independent git repos; untrack from monorepo
Each top-level module/suite folder is now its own private repo on GitHub (gsinghpal/<name>) and gitea (admin/<name>), with a fresh single initial commit. The monorepo no longer tracks them (added to .gitignore + git rm --cached); working-tree files are retained on disk and managed in their own repos. The monorepo keeps shared root files (CLAUDE.md, docs/, scripts/, tools/, AGENTS.md, WIP/obsolete dirs) and full history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
from odoo.exceptions import UserError
|
||||
from odoo.tests.common import TransactionCase, tagged
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install')
|
||||
class TestSafetyGuard(TransactionCase):
|
||||
"""Verify the safety guard blocks Enterprise uninstall when migration hasn't run."""
|
||||
|
||||
def test_uninstall_not_blocked_when_migration_completed(self):
|
||||
"""If the per-module migration flag is set, uninstall is allowed.
|
||||
|
||||
Skip if account_accountant isn't installed -- otherwise the guard's
|
||||
`if not installed: continue` short-circuit would make this test pass
|
||||
vacuously without exercising the flag-check branch.
|
||||
"""
|
||||
Module = self.env['ir.module.module'].sudo()
|
||||
if not Module.search_count([
|
||||
('name', '=', 'account_accountant'),
|
||||
('state', '=', 'installed'),
|
||||
]):
|
||||
self.skipTest("account_accountant not installed in this DB")
|
||||
self.env['ir.config_parameter'].sudo().set_param(
|
||||
'fusion_accounting.migration.account_accountant.completed', 'True'
|
||||
)
|
||||
guard = Module._fusion_check_uninstall_guard(['account_accountant'])
|
||||
self.assertTrue(guard, "Guard should pass when migration flag is set")
|
||||
|
||||
def test_uninstall_blocked_when_migration_pending(self):
|
||||
"""If account_accountant is installed and migration not run, raise."""
|
||||
self.env['ir.config_parameter'].sudo().set_param(
|
||||
'fusion_accounting.migration.account_accountant.completed', 'False'
|
||||
)
|
||||
Module = self.env['ir.module.module'].sudo()
|
||||
installed = Module.search_count([
|
||||
('name', '=', 'account_accountant'),
|
||||
('state', '=', 'installed'),
|
||||
])
|
||||
if not installed:
|
||||
self.skipTest("account_accountant not installed in this DB")
|
||||
with self.assertRaises(UserError) as ctx:
|
||||
Module._fusion_check_uninstall_guard(['account_accountant'])
|
||||
self.assertIn('migration', str(ctx.exception).lower())
|
||||
Reference in New Issue
Block a user