feat(fusion_accounting_reports): migration wizard bootstrap step verifies report definitions
Inherits fusion.migration.wizard from fusion_accounting_migration and appends a _reports_bootstrap_step that confirms the 4 CORE report definitions (pnl, balance_sheet, trial_balance, general_ledger) exist after migration. Returns a structured result with expected, present, and missing report types. Hooked into action_run_migration via super(); failures are logged (warning) but never raised, so the migration chain remains tolerant of ordering between sub-modules. Adds fusion_accounting_migration to manifest depends. Tests: 1 new (test_migration_round_trip.py). Net 114 -> 115. Made-with: Cursor
This commit is contained in:
@@ -21,3 +21,4 @@ from . import test_cron
|
||||
from . import test_pdf_export
|
||||
from . import test_xlsx_export
|
||||
from . import test_period_picker
|
||||
from . import test_migration_round_trip
|
||||
|
||||
15
fusion_accounting_reports/tests/test_migration_round_trip.py
Normal file
15
fusion_accounting_reports/tests/test_migration_round_trip.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""Tests for the reports-bootstrap migration step."""
|
||||
|
||||
from odoo.tests.common import TransactionCase, tagged
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install')
|
||||
class TestMigrationRoundTrip(TransactionCase):
|
||||
|
||||
def test_bootstrap_finds_all_4_reports(self):
|
||||
wizard = self.env['fusion.migration.wizard'].create({})
|
||||
result = wizard._reports_bootstrap_step()
|
||||
self.assertEqual(result['step'], 'reports_bootstrap')
|
||||
self.assertEqual(set(result['present_reports']),
|
||||
{'pnl', 'balance_sheet', 'trial_balance', 'general_ledger'})
|
||||
self.assertEqual(result['missing_reports'], [])
|
||||
Reference in New Issue
Block a user