diff --git a/account_statement_import_online_paypal/README.rst b/account_statement_import_online_paypal/README.rst index 396ba34c..2a01db0c 100644 --- a/account_statement_import_online_paypal/README.rst +++ b/account_statement_import_online_paypal/README.rst @@ -14,13 +14,13 @@ Online Bank Statements: PayPal.com :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--statement--import-lightgray.png?logo=github - :target: https://github.com/OCA/bank-statement-import/tree/14.0/account_statement_import_online_paypal + :target: https://github.com/OCA/bank-statement-import/tree/15.0/account_statement_import_online_paypal :alt: OCA/bank-statement-import .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/bank-statement-import-14-0/bank-statement-import-14-0-account_statement_import_online_paypal + :target: https://translation.odoo-community.org/projects/bank-statement-import-15-0/bank-statement-import-15-0-account_statement_import_online_paypal :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/174/14.0 + :target: https://runbot.odoo-community.org/runbot/174/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -97,7 +97,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -116,6 +116,7 @@ Contributors * Alexey Pelykh * Omar Castiñeira +* isufi kapasi Maintainers ~~~~~~~~~~~ @@ -138,6 +139,6 @@ Current `maintainer `__: |maintainer-alexey-pelykh| -This module is part of the `OCA/bank-statement-import `_ project on GitHub. +This module is part of the `OCA/bank-statement-import `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_statement_import_online_paypal/__manifest__.py b/account_statement_import_online_paypal/__manifest__.py index 49547705..df2e9a19 100644 --- a/account_statement_import_online_paypal/__manifest__.py +++ b/account_statement_import_online_paypal/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Online Bank Statements: PayPal.com", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "author": "CorporateHub, Odoo Community Association (OCA)", "maintainers": ["alexey-pelykh"], "website": "https://github.com/OCA/bank-statement-import", diff --git a/account_statement_import_online_paypal/i18n/account_statement_import_online_paypal.pot b/account_statement_import_online_paypal/i18n/account_statement_import_online_paypal.pot index c70d6430..2b3f6867 100644 --- a/account_statement_import_online_paypal/i18n/account_statement_import_online_paypal.pot +++ b/account_statement_import_online_paypal/i18n/account_statement_import_online_paypal.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -215,11 +215,6 @@ msgstr "" msgid "Direct payment API" msgstr "" -#. module: account_statement_import_online_paypal -#: model:ir.model.fields,field_description:account_statement_import_online_paypal.field_online_bank_statement_provider__display_name -msgid "Display Name" -msgstr "" - #. module: account_statement_import_online_paypal #: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format @@ -246,9 +241,18 @@ msgstr "" #. module: account_statement_import_online_paypal #: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#, python-format +msgid "" +"Failed to resolve transaction %(first_transaction_id)s " +"(%(first_transaction_date)s)" +msgstr "" + +#. module: account_statement_import_online_paypal #: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format -msgid "Failed to resolve transaction %s (%s)" +msgid "" +"Failed to resolve transaction %(last_transaction_id)s " +"(%(last_transaction_date)s)" msgstr "" #. module: account_statement_import_online_paypal @@ -486,11 +490,6 @@ msgstr "" msgid "Hold for dispute investigation" msgstr "" -#. module: account_statement_import_online_paypal -#: model:ir.model.fields,field_description:account_statement_import_online_paypal.field_online_bank_statement_provider__id -msgid "ID" -msgstr "" - #. module: account_statement_import_online_paypal #: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format @@ -521,11 +520,6 @@ msgstr "" msgid "Invoice %s" msgstr "" -#. module: account_statement_import_online_paypal -#: model:ir.model.fields,field_description:account_statement_import_online_paypal.field_online_bank_statement_provider____last_update -msgid "Last Modified on" -msgstr "" - #. module: account_statement_import_online_paypal #: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format 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 388a167f..8665ac5c 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 @@ -230,8 +230,12 @@ class OnlineBankStatementProviderPayPal(models.Model): ) if not first_transaction: raise UserError( - _("Failed to resolve transaction %s (%s)") - % (first_transaction_id, first_transaction_date) + _( + "Failed to resolve transaction %(first_transaction_id)s " + "(%(first_transaction_date)s)", + first_transaction_id=first_transaction_id, + first_transaction_date=first_transaction_date, + ) ) balance_start = self._paypal_get_transaction_ending_balance(first_transaction) balance_start -= self._paypal_get_transaction_total_amount(first_transaction) @@ -245,8 +249,12 @@ class OnlineBankStatementProviderPayPal(models.Model): ) if not last_transaction: raise UserError( - _("Failed to resolve transaction %s (%s)") - % (last_transaction_id, last_transaction_date) + _( + "Failed to resolve transaction %(last_transaction_id)s " + "(%(last_transaction_date)s)", + last_transaction_id=last_transaction_id, + last_transaction_date=last_transaction_date, + ) ) balance_end = self._paypal_get_transaction_ending_balance(last_transaction) @@ -496,7 +504,7 @@ class OnlineBankStatementProviderPayPal(models.Model): "total_pages": 0, } - raise self._paypal_decode_error(content) or e + raise self._paypal_decode_error(content) or e from None return json.loads(content) @api.model diff --git a/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst b/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst index bbb62dfd..084cff53 100644 --- a/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst +++ b/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst @@ -2,3 +2,4 @@ * Alexey Pelykh * Omar Castiñeira +* isufi kapasi diff --git a/account_statement_import_online_paypal/static/description/index.html b/account_statement_import_online_paypal/static/description/index.html index 00a1f769..7f215bbe 100644 --- a/account_statement_import_online_paypal/static/description/index.html +++ b/account_statement_import_online_paypal/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/bank-statement-import Translate me on Weblate Try me on Runbot

This module provides online bank statements from PayPal.com.

Table of contents

@@ -449,7 +449,7 @@ behaviour in case #06650320 (private).

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -468,6 +468,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Omar Castiñeira <omar@comunitea.com>
  • +
  • isufi kapasi <isufi.kapasi@initos.com>
  • @@ -479,7 +480,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

    Current maintainer:

    alexey-pelykh

    -

    This module is part of the OCA/bank-statement-import project on GitHub.

    +

    This module is part of the OCA/bank-statement-import project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    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 8515cf9e..ac082705 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 @@ -144,7 +144,9 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): _provider_class + "._paypal_retrieve", return_value=mocked_response, ): - with self.assertRaises(Exception): + with self.assertRaisesRegex( + UserError, "PayPal App features are configured incorrectly!" + ): provider._paypal_get_token() def test_bad_token_type(self): @@ -175,7 +177,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): _provider_class + "._paypal_retrieve", return_value=mocked_response, ): - with self.assertRaises(Exception): + with self.assertRaisesRegex(UserError, "Invalid token type!"): provider._paypal_get_token() def test_no_token(self): @@ -205,7 +207,9 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): _provider_class + "._paypal_retrieve", return_value=mocked_response, ): - with self.assertRaises(Exception): + with self.assertRaisesRegex( + UserError, "Failed to acquire token using Client ID and Secret!" + ): provider._paypal_get_token() def test_no_data_on_monday(self): @@ -434,7 +438,11 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): _provider_class + "._paypal_retrieve", return_value=mocked_response, ), self.mock_token(): - with self.assertRaises(Exception): + with self.assertRaisesRegex( + UserError, + "PayPal allows retrieving transactions only up to 3 years in " + "the past. Please import older transactions manually.", + ): provider._obtain_statement_data( self.now - relativedelta(years=5), self.now,