diff --git a/account_bank_statement_import_paypal/__manifest__.py b/account_bank_statement_import_paypal/__manifest__.py
index 16f3edfe..0f346657 100644
--- a/account_bank_statement_import_paypal/__manifest__.py
+++ b/account_bank_statement_import_paypal/__manifest__.py
@@ -20,11 +20,6 @@
'multi_step_wizard',
'web_widget_dropdown_dynamic',
],
- 'external_dependencies': {
- 'python': [
- 'csv',
- ]
- },
'data': [
'security/ir.model.access.csv',
'data/maps.xml',
diff --git a/account_bank_statement_import_paypal/models/__init__.py b/account_bank_statement_import_paypal/models/__init__.py
index 42211d54..7966d780 100644
--- a/account_bank_statement_import_paypal/models/__init__.py
+++ b/account_bank_statement_import_paypal/models/__init__.py
@@ -3,4 +3,3 @@
from . import account_bank_statement_import_paypal_mapping
from . import account_bank_statement_import_paypal_parser
from . import account_bank_statement_import
-from . import account_journal
diff --git a/account_bank_statement_import_paypal/models/account_bank_statement_import.py b/account_bank_statement_import_paypal/models/account_bank_statement_import.py
index 4d3d08cf..ffd6db06 100644
--- a/account_bank_statement_import_paypal/models/account_bank_statement_import.py
+++ b/account_bank_statement_import_paypal/models/account_bank_statement_import.py
@@ -32,4 +32,4 @@ class AccountBankStatementImport(models.TransientModel):
'account_bank_statement_import_paypal_test'):
raise
_logger.warning('PayPal parser error', exc_info=True)
- return super()._parse_file(data_file)
+ return super(AccountBankStatementImport, self)._parse_file(data_file)
diff --git a/account_bank_statement_import_paypal/models/account_journal.py b/account_bank_statement_import_paypal/models/account_journal.py
deleted file mode 100644
index 20fbe50a..00000000
--- a/account_bank_statement_import_paypal/models/account_journal.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2019 Tecnativa - Vicent Cubells
-# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
-# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-
-from odoo import models
-
-
-class AccountJournal(models.Model):
- _inherit = 'account.journal'
-
- def _get_bank_statements_available_import_formats(self):
- res = super()._get_bank_statements_available_import_formats()
- res.append('PayPal Reports')
- return res
diff --git a/account_bank_statement_import_paypal/tests/test_account_bank_statement_import_paypal.py b/account_bank_statement_import_paypal/tests/test_account_bank_statement_import_paypal.py
index 983396d9..13a8d972 100644
--- a/account_bank_statement_import_paypal/tests/test_account_bank_statement_import_paypal.py
+++ b/account_bank_statement_import_paypal/tests/test_account_bank_statement_import_paypal.py
@@ -1,5 +1,5 @@
# Copyright 2019 Tecnativa - Vicent Cubells
-# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
+# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields
@@ -12,7 +12,7 @@ from os import path
class TestAccountBankStatementImportPayPal(common.TransactionCase):
def setUp(self):
- super().setUp()
+ super(TestAccountBankStatementImportPayPal, self).setUp()
self.now = fields.Datetime.now()
self.currency_eur = self.env.ref('base.EUR')
@@ -47,7 +47,6 @@ class TestAccountBankStatementImportPayPal(common.TransactionCase):
'name': 'PayPal',
'type': 'bank',
'code': 'PP',
- 'currency_id': self.currency_usd.id,
})
wizard = self.AccountBankStatementImport.with_context({
'journal_id': journal.id,
@@ -119,7 +118,6 @@ class TestAccountBankStatementImportPayPal(common.TransactionCase):
'name': 'PayPal',
'type': 'bank',
'code': 'PP',
- 'currency_id': self.currency_usd.id,
})
wizard = self.AccountBankStatementImport.with_context({
'journal_id': journal.id,
@@ -143,7 +141,6 @@ class TestAccountBankStatementImportPayPal(common.TransactionCase):
'name': 'PayPal',
'type': 'bank',
'code': 'PP',
- 'currency_id': self.currency_usd.id,
})
wizard = self.AccountBankStatementImport.with_context({
'journal_id': journal.id,
@@ -163,39 +160,27 @@ class TestAccountBankStatementImportPayPal(common.TransactionCase):
self.assertEqual(len(statement), 0)
def test_import_activity_mapping_en(self):
- with common.Form(
- self.AccountBankStatementImportPayPalMappingWizard) as form:
- form.filename = 'fixtures/activity_en.csv'
- form.data_file = self._data_file(
- 'fixtures/activity_en.csv'
- )
- self.assertEqual(
- len(
- self.AccountBankStatementImportPayPalMappingWizard
- .with_context(
- header=form.header,
- ).statement_columns()
- ),
- 22
- )
- wizard = form.save()
+ wizard = self.AccountBankStatementImportPayPalMappingWizard.new({
+ 'filename': 'fixtures/activity_en.csv',
+ 'data_file': self._data_file('fixtures/activity_en.csv'),
+ })
+ wizard._onchange_data_file()
+ self.assertEqual(
+ len(self.AccountBankStatementImportPayPalMappingWizard
+ .with_context(header=wizard.header).statement_columns()),
+ 22
+ )
wizard.import_mapping()
def test_import_statement_mapping_en(self):
- with common.Form(
- self.AccountBankStatementImportPayPalMappingWizard) as form:
- form.filename = 'fixtures/statement_en.csv'
- form.data_file = self._data_file(
- 'fixtures/statement_en.csv'
- )
- self.assertEqual(
- len(
- self.AccountBankStatementImportPayPalMappingWizard
- .with_context(
- header=form.header,
- ).statement_columns()
- ),
- 18
- )
- wizard = form.save()
+ wizard = self.AccountBankStatementImportPayPalMappingWizard.new({
+ 'filename': 'fixtures/statement_en.csv',
+ 'data_file': self._data_file('fixtures/statement_en.csv'),
+ })
+ wizard._onchange_data_file()
+ self.assertEqual(
+ len(self.AccountBankStatementImportPayPalMappingWizard
+ .with_context(header=wizard.header).statement_columns()),
+ 18
+ )
wizard.import_mapping()
diff --git a/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal_mapping_wizard.xml b/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal_mapping_wizard.xml
index 7d98544f..e4991770 100644
--- a/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal_mapping_wizard.xml
+++ b/account_bank_statement_import_paypal/wizards/account_bank_statement_import_paypal_mapping_wizard.xml
@@ -143,12 +143,8 @@
-
- btn-default
- Cancel
-
-
-
+
+
diff --git a/oca_dependencies.txt b/oca_dependencies.txt
index 53b6b1ba..51573bdf 100644
--- a/oca_dependencies.txt
+++ b/oca_dependencies.txt
@@ -1,3 +1,2 @@
web
-server-ux
connector-jira