After Enterprise's account_accountant is uninstalled,
account.bank.statement.journal_id reverts to its V19 Community definition
\u2014 a read-only computed field derived from line_ids.journal_id. Direct
writes are silently dropped (which is what was happening: 55 tests
errored with 'null value in column journal_id' because the test's
statement had no journal, and the line factory was reading
statement.journal_id (False) and passing that to the line create).
Fix:
- make_bank_statement now bootstraps the statement with one zero-amount
line carrying journal_id, so the computed journal_id resolves correctly.
- make_bank_line no longer routes journal through the statement \u2014
journal_id is set directly on the line (which is V19 Community's
intended path; lines can exist standalone without a statement).
This is a test-only change; runtime behaviour is unchanged. Real users
creating bank lines via the UI already use the correct path.
Made-with: Cursor