ffc029a875247d6b2dfcf51a1686d3b492e38d86
Verifies the bank_rec_bootstrap migration step (a) creates precedents from existing partial.reconcile rows, (b) is idempotent on re-run, and (c) refreshes the MV without erroring. Three TransactionCase tests: - test_bootstrap_creates_precedents_from_existing_reconciles seeds two reconciles via the engine, wipes the auto-recorded precedents, then asserts the bootstrap produces source='backfill' precedents. - test_bootstrap_step_idempotent runs the bootstrap twice and asserts the second pass creates zero new precedents. - test_bootstrap_refreshes_mv_without_error runs the bootstrap on a clean partner and asserts no exception is raised and the result dict reports MV + pattern refresh outcomes. Implementation fixes uncovered by these tests: - precedent_backfill.backfill_precedents now pre-filters account.partial.reconcile to rows that touch a bank statement line on either side. Previously it walked every partial in the DB; on the westin-v19 dev DB that's 16k rows and the default limit=10000 missed the newest test fixtures (highest IDs). - backfill skips the periodic env.cr.commit() when running under a TestCursor, since committing inside a test breaks the rollback. Test count: 139 -> 142. Made-with: Cursor
Description
Odoo 19 custom modules
Languages
Python
55.9%
HTML
26.1%
JavaScript
14.9%
SCSS
1.8%
CSS
0.8%
Other
0.4%