This commit is contained in:
gsinghpal
2026-04-03 15:45:18 -04:00
parent 4cd7357aa0
commit c66bdf5089
71 changed files with 6721 additions and 118 deletions

27
fix_from_lines.py Normal file
View File

@@ -0,0 +1,27 @@
# Manually reconcile the 4 "from" lines — they're Scotia Current transfers
# with no account number in the ref
AML = env['account.move.line'].sudo()
BSL = env['account.bank.statement.line'].sudo()
line_ids = [16375, 16380, 16383, 16433]
for lid in line_ids:
line = BSL.browse(lid)
if line.is_reconciled:
continue
print(f'Line {lid}: {line.payment_ref}, ${line.amount}, {line.move_id.date}', flush=True)
# These are transfers from Scotia Current — post to Outstanding Receipts (493)
model = env['account.reconcile.model'].search([
('match_label_param', '=', 'PAYMENT FROM'),
('trigger', '=', 'auto_reconcile'),
], limit=1)
if model:
try:
model._trigger_reconciliation_model(line)
env.cr.commit()
line.invalidate_recordset()
print(f' -> Reconciled: {line.is_reconciled}', flush=True)
except Exception as e:
print(f' -> Error: {e}', flush=True)
env.cr.rollback()