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
16 lines
623 B
Python
16 lines
623 B
Python
"""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'], [])
|