From 7a62e60c37912a0db488910fc6a63928c096ad2e Mon Sep 17 00:00:00 2001 From: David Beal Date: Tue, 26 Nov 2019 16:40:32 +0100 Subject: [PATCH] IMP acc_bank_stat_imp_ofx: add checknum in name when required --- .../wizard/account_bank_statement_import.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py b/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py index 8944add..15af6d0 100644 --- a/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py +++ b/account_bank_statement_import_ofx/wizard/account_bank_statement_import.py @@ -53,10 +53,14 @@ class AccountBankStatementImport(models.TransientModel): # If you read odoo10/addons/account_bank_statement_import/ # account_bank_statement_import.py, it's the only 2 keys # we can provide to match a partner. + name = transaction.payee + if transaction.checknum: + name += " " + transaction.checknum + if transaction.memo: + name += " : " + transaction.memo vals = { 'date': transaction.date, - 'name': transaction.payee + ( - transaction.memo and ': ' + transaction.memo or ''), + 'name': name, 'ref': transaction.id, 'amount': float(transaction.amount), 'unique_import_id': transaction.id,