From 815fb99f20e456196e1f03a5ade2bc95d2f30212 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 8 Aug 2022 00:05:18 +0200 Subject: [PATCH] Add module account_statement_import_base The 2 modules account_statement_import_online and account_statement_import depend on account_statement_import_base (and not on each other) and share common code, in particular a hook to update the statement line. So we can now have reconciliation modules that use this hook and therefore work both on file import and online import. More details on https://github.com/OCA/bank-statement-import/issues/481. Improve bank statement line form view and journal form view. --- .../models/online_bank_statement_provider_paypal.py | 2 +- .../test_account_statement_import_online_paypal.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index b4e00c67..388a167f 100644 --- a/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -297,7 +297,7 @@ class OnlineBankStatementProviderPayPal(models.Model): "date": date, "payment_ref": note, "unique_import_id": unique_import_id, - "online_raw_data": transaction, + "raw_data": transaction, } payer_full_name = payer_name.get("full_name") or payer_name.get( "alternate_full_name" diff --git a/account_statement_import_online_paypal/tests/test_account_statement_import_online_paypal.py b/account_statement_import_online_paypal/tests/test_account_statement_import_online_paypal.py index c12b9890..8515cf9e 100644 --- a/account_statement_import_online_paypal/tests/test_account_statement_import_online_paypal.py +++ b/account_statement_import_online_paypal/tests/test_account_statement_import_online_paypal.py @@ -569,7 +569,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ) self.assertEqual(len(data[0]), 2) - del data[0][0]["online_raw_data"] + del data[0][0]["raw_data"] self.assertEqual( data[0][0], { @@ -645,7 +645,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ) ) self.assertEqual(len(lines), 1) - del lines[0]["online_raw_data"] + del lines[0]["raw_data"] self.assertEqual( lines[0], { @@ -709,7 +709,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ) ) self.assertEqual(len(lines), 1) - del lines[0]["online_raw_data"] + del lines[0]["raw_data"] self.assertEqual( lines[0], { @@ -773,7 +773,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ) ) self.assertEqual(len(lines), 2) - del lines[0]["online_raw_data"] + del lines[0]["raw_data"] self.assertEqual( lines[0], { @@ -844,7 +844,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ) ) self.assertEqual(len(lines), 1) - del lines[0]["online_raw_data"] + del lines[0]["raw_data"] self.assertEqual( lines[0], {