Browse Source

[FIX] reconcile correct items

pull/201/head
Holger Brunn 8 years ago
committed by George Daramouskas
parent
commit
d6f012ba46
No known key found for this signature in database GPG Key ID: 5B4EF742F8CD859C
  1. 16
      account_bank_statement_import_auto_reconcile/models/account_bank_statement_import_auto_reconcile_exact_amount.py

16
account_bank_statement_import_auto_reconcile/models/account_bank_statement_import_auto_reconcile_exact_amount.py

@ -27,5 +27,19 @@ class AccountBankStatementImportAutoReconcileExactAmount(models.AbstractModel):
precision_digits=digits precision_digits=digits
) == 0 ) == 0
): ):
statement_line.process_reconciliation(matches)
move = self.env['account.move'].create(
self.env['account.bank.statement']._prepare_move(
statement_line,
(
statement_line.statement_id.name or statement_line.name
) + "/" + str(statement_line.sequence or '')
)
)
move_line_dict = self.env['account.bank.statement']\
._prepare_bank_move_line(
statement_line, move.id, -statement_line.amount,
statement_line.statement_id.company_id.currency_id.id,
)
move_line_dict['counterpart_move_line_id'] = matches[0]['id']
statement_line.process_reconciliation([move_line_dict])
return True return True
Loading…
Cancel
Save