diff --git a/account_bank_statement_import_auto_reconcile/models/account_bank_statement_import_auto_reconcile_exact_amount.py b/account_bank_statement_import_auto_reconcile/models/account_bank_statement_import_auto_reconcile_exact_amount.py index 37799f8..c1918be 100644 --- a/account_bank_statement_import_auto_reconcile/models/account_bank_statement_import_auto_reconcile_exact_amount.py +++ b/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 ) == 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