diff --git a/account_statement_import_online/__manifest__.py b/account_statement_import_online/__manifest__.py index 1fcfa9ee..329629fb 100644 --- a/account_statement_import_online/__manifest__.py +++ b/account_statement_import_online/__manifest__.py @@ -20,9 +20,9 @@ "data/account_statement_import_online.xml", "security/ir.model.access.csv", "security/online_bank_statement_provider.xml", + "wizards/online_bank_statement_pull_wizard.xml", "views/account_journal.xml", "views/online_bank_statement_provider.xml", - "wizards/online_bank_statement_pull_wizard.xml", ], "installable": True, } diff --git a/account_statement_import_online/models/account_journal.py b/account_statement_import_online/models/account_journal.py index 53764c25..df89ee1b 100644 --- a/account_statement_import_online/models/account_journal.py +++ b/account_statement_import_online/models/account_journal.py @@ -76,17 +76,3 @@ class AccountJournal(models.Model): if "bank_statements_source" in vals or "online_bank_statement_provider" in vals: self._update_online_bank_statement_provider_id() return res - - def action_online_bank_statements_pull_wizard(self): - provider_ids = self.mapped("online_bank_statement_provider_id").ids - return { - "name": _("Online Bank Statement Pull Wizard"), - "type": "ir.actions.act_window", - "res_model": "online.bank.statement.pull.wizard", - "views": [[False, "form"]], - "target": "new", - "context": { - "default_provider_ids": [(6, False, provider_ids)], - "active_test": False, - }, - } diff --git a/account_statement_import_online/security/online_bank_statement_provider.xml b/account_statement_import_online/security/online_bank_statement_provider.xml index 0b1ae8e0..db8c82d0 100644 --- a/account_statement_import_online/security/online_bank_statement_provider.xml +++ b/account_statement_import_online/security/online_bank_statement_provider.xml @@ -8,7 +8,6 @@ Online Bank Statement Provider multi-company - ['|',('company_id','=',False),('company_id','in',company_ids)] diff --git a/account_statement_import_online/tests/online_bank_statement_provider_dummy.py b/account_statement_import_online/tests/online_bank_statement_provider_dummy.py index f2e7b5fb..e7b88458 100644 --- a/account_statement_import_online/tests/online_bank_statement_provider_dummy.py +++ b/account_statement_import_online/tests/online_bank_statement_provider_dummy.py @@ -56,7 +56,7 @@ class OnlineBankStatementProviderDummy(models.Model): transaction_date = fields.Datetime.to_string(transaction_date) lines.append( { - "name": "payment", + "payment_ref": "payment", "amount": amount, "date": transaction_date, "unique_import_id": str( diff --git a/account_statement_import_online/tests/test_account_bank_statement_import_online.py b/account_statement_import_online/tests/test_account_bank_statement_import_online.py index 335b5f70..e16ce1f3 100644 --- a/account_statement_import_online/tests/test_account_bank_statement_import_online.py +++ b/account_statement_import_online/tests/test_account_bank_statement_import_online.py @@ -383,10 +383,8 @@ class TestAccountBankAccountStatementImportOnline(common.TransactionCase): order="date asc", ) self.assertFalse(statements[0].balance_start) - self.assertFalse(statements[0].balance_end_real) self.assertTrue(statements[0].balance_end) self.assertTrue(statements[1].balance_start) - self.assertFalse(statements[1].balance_end_real) def test_wizard(self): journal = self.AccountJournal.create( @@ -398,11 +396,8 @@ class TestAccountBankAccountStatementImportOnline(common.TransactionCase): "online_bank_statement_provider": "dummy", } ) - action = journal.action_online_bank_statements_pull_wizard() - self.assertTrue(action["context"]["default_provider_ids"][0][2]) - wizard = self.OnlineBankStatementPullWizard.with_context( - action["context"] + active_model="account.journal", active_id=journal.id ).create( {"date_since": self.now - relativedelta(hours=1), "date_until": self.now} ) diff --git a/account_statement_import_online/views/account_journal.xml b/account_statement_import_online/views/account_journal.xml index 53c5ea70..fe319292 100644 --- a/account_statement_import_online/views/account_journal.xml +++ b/account_statement_import_online/views/account_journal.xml @@ -47,17 +47,28 @@ /> + +
+
+
- + Online Bank Statements Pull Wizard - ir.actions.server - + online.bank.statement.pull.wizard + new + form - code - - if records: - action = records.action_online_bank_statements_pull_wizard() - + list + diff --git a/account_statement_import_online/views/online_bank_statement_provider.xml b/account_statement_import_online/views/online_bank_statement_provider.xml index 56d24dfb..de3f26aa 100644 --- a/account_statement_import_online/views/online_bank_statement_provider.xml +++ b/account_statement_import_online/views/online_bank_statement_provider.xml @@ -10,11 +10,19 @@ online.bank.statement.provider + + + + @@ -38,63 +46,41 @@
-
- -
- - - - - - - - - - - - - - - - - - - + + + +