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.
This commit is contained in:
Alexis de Lattre
2022-08-08 00:05:18 +02:00
committed by Miquel Raïch
parent ae38961208
commit eb7c246844
2 changed files with 6 additions and 6 deletions

View File

@@ -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"

View File

@@ -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],
{