From c6d889e0fef3eee8b3cfd04add8b1d9f6a1a8963 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Sat, 2 Nov 2019 06:40:43 +0000 Subject: [PATCH 01/13] [ADD] account_bank_statement_import_online_paypal --- .../README.rst | 129 +++ .../__init__.py | 3 + .../__manifest__.py | 23 + ...nt_bank_statement_import_online_paypal.pot | 925 ++++++++++++++++++ .../models/__init__.py | 3 + .../online_bank_statement_provider_paypal.py | 517 ++++++++++ .../readme/CONFIGURE.rst | 29 + .../readme/CONTRIBUTORS.rst | 1 + .../readme/DESCRIPTION.rst | 2 + .../readme/ROADMAP.rst | 7 + .../readme/USAGE.rst | 6 + .../static/description/index.html | 479 +++++++++ .../tests/__init__.py | 3 + ...unt_bank_statement_import_online_paypal.py | 576 +++++++++++ .../views/online_bank_statement_provider.xml | 40 + 15 files changed, 2743 insertions(+) create mode 100644 account_bank_statement_import_online_paypal/README.rst create mode 100644 account_bank_statement_import_online_paypal/__init__.py create mode 100644 account_bank_statement_import_online_paypal/__manifest__.py create mode 100644 account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot create mode 100644 account_bank_statement_import_online_paypal/models/__init__.py create mode 100644 account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py create mode 100644 account_bank_statement_import_online_paypal/readme/CONFIGURE.rst create mode 100644 account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst create mode 100644 account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst create mode 100644 account_bank_statement_import_online_paypal/readme/ROADMAP.rst create mode 100644 account_bank_statement_import_online_paypal/readme/USAGE.rst create mode 100644 account_bank_statement_import_online_paypal/static/description/index.html create mode 100644 account_bank_statement_import_online_paypal/tests/__init__.py create mode 100644 account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py create mode 100644 account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml diff --git a/account_bank_statement_import_online_paypal/README.rst b/account_bank_statement_import_online_paypal/README.rst new file mode 100644 index 00000000..53666cd0 --- /dev/null +++ b/account_bank_statement_import_online_paypal/README.rst @@ -0,0 +1,129 @@ +================================== +Online Bank Statements: PayPal.com +================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :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/12.0/account_bank_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-12-0/bank-statement-import-12-0-account_bank_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/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module provides online bank statements from +`PayPal.com `_. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure online bank statements provider: + +#. Go to *Invoicing > Configuration > Bank Accounts* +#. Open bank account to configure and edit it +#. Set *Bank Feeds* to *Online* +#. Select *PayPal.com* as online bank statements provider in + *Online Bank Statements (OCA)* section +#. Save the bank account +#. Click on provider and configure provider-specific settings. + +or, alternatively: + +#. Go to *Invoicing > Overview* +#. Open settings of the corresponding journal account +#. Switch to *Bank Account* tab +#. Set *Bank Feeds* to *Online* +#. Select *PayPal.com* as online bank statements provider in + *Online Bank Statements (OCA)* section +#. Save the bank account +#. Click on provider and configure provider-specific settings. + +To obtain *Client ID* and *Secret*: + +#. Open `PayPal Developer `_ +#. Go to *My Apps & Credentials* and switch to *Live* +#. Under *REST API apps*, click *Create App* to create new application (e.g. *Odoo*) +#. Copy *Client ID* and *Secret* to use during provider configuration +#. Under *Live App Settings*, uncheck all features except *Transaction Search* +#. Click Save + +Usage +===== + +To pull historical bank statements: + +#. Go to *Invoicing > Configuration > Bank Accounts* +#. Select specific bank accounts +#. Launch *Actions > Online Bank Statements Pull Wizard* +#. Configure date interval and click *Pull* + +Known issues / Roadmap +====================== + +* Only transactions for the previous three years are retrieved, historical data + can be imported manually, see ``account_bank_statement_import_paypal``. See + `PayPal Help Center article `_ + for details. +* `PayPal Transaction Info `_ + defines extra fields like ``tip_amount``, ``shipping_amount``, etc. that + could be useful to be decomposed from a single transaction. + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Brainbean Apps +* Dataplug + +Contributors +~~~~~~~~~~~~ + +* Alexey Pelykh + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +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_bank_statement_import_online_paypal/__init__.py b/account_bank_statement_import_online_paypal/__init__.py new file mode 100644 index 00000000..31660d6a --- /dev/null +++ b/account_bank_statement_import_online_paypal/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py new file mode 100644 index 00000000..0e9d0506 --- /dev/null +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2019 Brainbean Apps (https://brainbeanapps.com) +# Copyright 2019 Dataplug (https://dataplug.io) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + 'name': 'Online Bank Statements: PayPal.com', + 'version': '12.0.1.0.0', + 'author': + 'Brainbean Apps, ' + 'Dataplug, ' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/bank-statement-import/', + 'license': 'AGPL-3', + 'category': 'Accounting', + 'summary': 'Online bank statements for PayPal.com', + 'depends': [ + 'account_bank_statement_import_online', + ], + 'data': [ + 'views/online_bank_statement_provider.xml', + ], + 'installable': True, +} diff --git a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot new file mode 100644 index 00000000..736ec753 --- /dev/null +++ b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot @@ -0,0 +1,925 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_online_paypal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:63 +#, python-format +msgid "ACH funding for funds recovery from account balance" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online_paypal.online_bank_statement_provider_form +msgid "API base" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:52 +#, python-format +msgid "ATM withdrawal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:129 +#, python-format +msgid "Account hold for ACH deposit" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:128 +#, python-format +msgid "Account hold for open authorization" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:161 +#, python-format +msgid "Account receivable for shipping" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:53 +#, python-format +msgid "Auto-sweep from account" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:66 +#, python-format +msgid "AutoSweep" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:132 +#, python-format +msgid "BML credit, transfer from BML" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:138 +#, python-format +msgid "BML withdrawal, transfer to BML" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:79 +#, python-format +msgid "Balance manager account bonus" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:94 +#, python-format +msgid "Bill pay transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:156 +#, python-format +msgid "Blocked payments" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:85 +#, python-format +msgid "Bonus for first ACH use" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:133 +#, python-format +msgid "Buyer credit payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:134 +#, python-format +msgid "Buyer credit payment withdrawal, transfer to BML" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:106 +#, python-format +msgid "Cancellation of hold for dispute resolution" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:118 +#, python-format +msgid "Charge-off adjustment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:116 +#, python-format +msgid "Chargeback" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:122 +#, python-format +msgid "Chargeback cancellation" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:50 +#, python-format +msgid "Chargeback processing fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:121 +#, python-format +msgid "Chargeback re-presentment rejection" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:117 +#, python-format +msgid "Chargeback reversal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:49 +#, python-format +msgid "Check withdrawal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online_paypal.online_bank_statement_provider_form +msgid "Client ID" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:91 +#, python-format +msgid "Coupon redemption" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:87 +#, python-format +msgid "Credit card cash back bonus" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:75 +#, python-format +msgid "Credit card deposit for negative PayPal account balance" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:86 +#, python-format +msgid "Credit card security charge refund" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:60 +#, python-format +msgid "Currency conversion required to cover negative balance" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:77 +#, python-format +msgid "Debit card cash back bonus" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:159 +#, python-format +msgid "Deferred disbursement, funds collected for disbursement" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:160 +#, python-format +msgid "Delayed disbursement, funds disbursed" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:29 +#, python-format +msgid "Direct payment API" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:166 +#, python-format +msgid "Display only transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:37 +#, python-format +msgid "Donation payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:64 +#, python-format +msgid "Electronic funds transfer (EFT)" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:362 +#, python-format +msgid "Failed to acquire token using Client ID and Secret!" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:240 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:266 +#, python-format +msgid "Failed to resolve transaction %s (%s)" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:336 +#, python-format +msgid "Fee for %s" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:104 +#, python-format +msgid "Fee refund" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:103 +#, python-format +msgid "Fee reversal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:46 +#, python-format +msgid "Foreign bank withdrawal fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:155 +#, python-format +msgid "Funds available" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:154 +#, python-format +msgid "Funds not yet available" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:162 +#, python-format +msgid "Funds payable: PayPal-provided funds that must be paid back" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:163 +#, python-format +msgid "Funds receivable: PayPal-provided funds that are being paid back" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:67 +#, python-format +msgid "General PayPal debit card transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:24 +#, python-format +msgid "General PayPal-to-PayPal payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:115 +#, python-format +msgid "General account adjustment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:139 +#, python-format +msgid "General adjustment without business-related event" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:123 +#, python-format +msgid "General authorization" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:76 +#, python-format +msgid "General bonus" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:137 +#, python-format +msgid "General buyer credit payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:74 +#, python-format +msgid "General credit card deposit" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:73 +#, python-format +msgid "General credit card withdrawal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:58 +#, python-format +msgid "General currency conversion" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:126 +#, python-format +msgid "General dividend" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:61 +#, python-format +msgid "General funding of PayPal account" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:144 +#, python-format +msgid "General hold" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:145 +#, python-format +msgid "General hold release" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:88 +#, python-format +msgid "General incentive or certificate redemption" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:140 +#, python-format +msgid "General intra-account transfer" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:44 +#, python-format +msgid "General non-payment fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:95 +#, python-format +msgid "General reversal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:127 +#, python-format +msgid "General temporary hold" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:65 +#, python-format +msgid "General withdrawal from PayPal account" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:135 +#, python-format +msgid "General withdrawal to non-bank institution" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:43 +#, python-format +msgid "Generic instrument-funded payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:114 +#, python-format +msgid "Generic instrument/Open Wallet reversals (buyer side)" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:113 +#, python-format +msgid "Generic instrument/Open Wallet reversals (seller side)" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:158 +#, python-format +msgid "Generic instrument/Open Wallet transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:56 +#, python-format +msgid "Gift certificate expiration fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:33 +#, python-format +msgid "Gift certificate payment, purchase of gift certificate" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:152 +#, python-format +msgid "Gift certificate purchase" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:89 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:153 +#, python-format +msgid "Gift certificate redemption" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:70 +#, python-format +msgid "Hidden virtual PayPal debit card transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:105 +#, python-format +msgid "Hold for dispute investigation" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:119 +#, python-format +msgid "Incentive adjustment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:111 +#, python-format +msgid "Instant payment review (IPR) reversal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:54 +#, python-format +msgid "International credit card withdrawal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:360 +#, python-format +msgid "Invalid token type!" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:302 +#, python-format +msgid "Invoice %s" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:107 +#, python-format +msgid "MAM reversal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:48 +#, python-format +msgid "Mass payment batch fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:25 +#, python-format +msgid "MassPay payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:110 +#, python-format +msgid "MassPay refund transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:109 +#, python-format +msgid "MassPay reversal transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:78 +#, python-format +msgid "Merchant referral account bonus" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:35 +#, python-format +msgid "Mobile payment, made through a mobile phone" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:500 +#, python-format +msgid "No authentication specified!" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:108 +#, python-format +msgid "Non-reference credit payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:93 +#, python-format +msgid "Offers used as funding source" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: model:ir.model,name:account_bank_statement_import_online_paypal.model_online_bank_statement_provider +msgid "Online Bank Statement Provider" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:167 +#, python-format +msgid "Other" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:57 +#, python-format +msgid "Partner fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:356 +#, python-format +msgid "PayPal App features are configured incorrectly!" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:30 +#, python-format +msgid "PayPal Checkout APIs" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:42 +#, python-format +msgid "PayPal Here payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:199 +#, python-format +msgid "PayPal allows retrieving transactions only up to 3 years in the past. Please import older transactions manually. See https://www.paypal.com/us/smarthelp/article/why-can't-i-access-transaction-history-greater-than-3-years-ts2241" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:62 +#, python-format +msgid "PayPal balance manager funding of PayPal account" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:131 +#, python-format +msgid "PayPal buyer credit payment funding" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:80 +#, python-format +msgid "PayPal buyer warranty bonus" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:72 +#, python-format +msgid "PayPal debit authorization" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:71 +#, python-format +msgid "PayPal debit card cash advance" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:69 +#, python-format +msgid "PayPal debit card withdrawal to ATM" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:81 +#, python-format +msgid "PayPal protection bonus, payout for PayPal buyer protection, payout for full protection with PayPal buyer credit." +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:51 +#, python-format +msgid "Payment fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:150 +#, python-format +msgid "Payment hold" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:151 +#, python-format +msgid "Payment hold release" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:102 +#, python-format +msgid "Payment refund, initiated by merchant" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:101 +#, python-format +msgid "Payment reversal, initiated by PayPal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:148 +#, python-format +msgid "Payment review hold" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:149 +#, python-format +msgid "Payment review release" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:90 +#, python-format +msgid "Points incentive redemption" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:32 +#, python-format +msgid "Postage payment to carrier" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:27 +#, python-format +msgid "Pre-approved payment (BillUser API)" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:124 +#, python-format +msgid "Reauthorization" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:112 +#, python-format +msgid "Rebate or cash back reversal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:38 +#, python-format +msgid "Rebate payments" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:120 +#, python-format +msgid "Reimbursement of chargeback" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:146 +#, python-format +msgid "Reserve hold" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:147 +#, python-format +msgid "Reserve release" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:99 +#, python-format +msgid "Reversal of ACH deposit" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:96 +#, python-format +msgid "Reversal of ACH withdrawal transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:97 +#, python-format +msgid "Reversal of debit card transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:100 +#, python-format +msgid "Reversal of general account hold" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:98 +#, python-format +msgid "Reversal of points usage" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online_paypal.online_bank_statement_provider_form +msgid "Secret" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:141 +#, python-format +msgid "Settlement consolidation" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:41 +#, python-format +msgid "Store-to-store transfers" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:26 +#, python-format +msgid "Subscription payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:130 +#, python-format +msgid "Temporary hold on available balance" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:34 +#, python-format +msgid "Third-party auction payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:39 +#, python-format +msgid "Third-party payout" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:40 +#, python-format +msgid "Third-party recoupment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:341 +#, python-format +msgid "Transaction fee for %s" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:142 +#, python-format +msgid "Transfer of funds from payable" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:157 +#, python-format +msgid "Transfer to and from a credit-card-funded restricted balance" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:143 +#, python-format +msgid "Transfer to external GL entity" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:516 +#, python-format +msgid "Unknown authentication specified!" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:59 +#, python-format +msgid "User-initiated currency conversion" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:68 +#, python-format +msgid "Virtual PayPal debit card transaction" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:36 +#, python-format +msgid "Virtual terminal payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:125 +#, python-format +msgid "Void of authorization" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:55 +#, python-format +msgid "Warranty fee for warranty purchase" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:31 +#, python-format +msgid "Website payments standard payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:45 +#, python-format +msgid "Website payments. Pro account monthly fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:47 +#, python-format +msgid "WorldLink check withdrawal fee" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:136 +#, python-format +msgid "WorldLink withdrawal" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:28 +#, python-format +msgid "eBay auction payment" +msgstr "" + +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:92 +#, python-format +msgid "eBay loyalty incentive" +msgstr "" + diff --git a/account_bank_statement_import_online_paypal/models/__init__.py b/account_bank_statement_import_online_paypal/models/__init__.py new file mode 100644 index 00000000..10e8660a --- /dev/null +++ b/account_bank_statement_import_online_paypal/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import online_bank_statement_provider_paypal diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py new file mode 100644 index 00000000..fed83e05 --- /dev/null +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -0,0 +1,517 @@ +# Copyright 2019 Brainbean Apps (https://brainbeanapps.com) +# Copyright 2019 Dataplug (https://dataplug.io) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from base64 import b64encode +from datetime import datetime +from dateutil.relativedelta import relativedelta +import dateutil.parser +from decimal import Decimal +import itertools +import json +import pytz +from urllib.error import HTTPError +from urllib.parse import urlencode +import urllib.request + +from odoo import models, api, _ +from odoo.exceptions import UserError + + +PAYPAL_API_BASE = 'https://api.paypal.com' +TRANSACTIONS_SCOPE = 'https://uri.paypal.com/services/reporting/search/read' +EVENT_DESCRIPTIONS = { + 'T0000': _('General PayPal-to-PayPal payment'), + 'T0001': _('MassPay payment'), + 'T0002': _('Subscription payment'), + 'T0003': _('Pre-approved payment (BillUser API)'), + 'T0004': _('eBay auction payment'), + 'T0005': _('Direct payment API'), + 'T0006': _('PayPal Checkout APIs'), + 'T0007': _('Website payments standard payment'), + 'T0008': _('Postage payment to carrier'), + 'T0009': _('Gift certificate payment, purchase of gift certificate'), + 'T0010': _('Third-party auction payment'), + 'T0011': _('Mobile payment, made through a mobile phone'), + 'T0012': _('Virtual terminal payment'), + 'T0013': _('Donation payment'), + 'T0014': _('Rebate payments'), + 'T0015': _('Third-party payout'), + 'T0016': _('Third-party recoupment'), + 'T0017': _('Store-to-store transfers'), + 'T0018': _('PayPal Here payment'), + 'T0019': _('Generic instrument-funded payment'), + 'T0100': _('General non-payment fee'), + 'T0101': _('Website payments. Pro account monthly fee'), + 'T0102': _('Foreign bank withdrawal fee'), + 'T0103': _('WorldLink check withdrawal fee'), + 'T0104': _('Mass payment batch fee'), + 'T0105': _('Check withdrawal'), + 'T0106': _('Chargeback processing fee'), + 'T0107': _('Payment fee'), + 'T0108': _('ATM withdrawal'), + 'T0109': _('Auto-sweep from account'), + 'T0110': _('International credit card withdrawal'), + 'T0111': _('Warranty fee for warranty purchase'), + 'T0112': _('Gift certificate expiration fee'), + 'T0113': _('Partner fee'), + 'T0200': _('General currency conversion'), + 'T0201': _('User-initiated currency conversion'), + 'T0202': _('Currency conversion required to cover negative balance'), + 'T0300': _('General funding of PayPal account'), + 'T0301': _('PayPal balance manager funding of PayPal account'), + 'T0302': _('ACH funding for funds recovery from account balance'), + 'T0303': _('Electronic funds transfer (EFT)'), + 'T0400': _('General withdrawal from PayPal account'), + 'T0401': _('AutoSweep'), + 'T0500': _('General PayPal debit card transaction'), + 'T0501': _('Virtual PayPal debit card transaction'), + 'T0502': _('PayPal debit card withdrawal to ATM'), + 'T0503': _('Hidden virtual PayPal debit card transaction'), + 'T0504': _('PayPal debit card cash advance'), + 'T0505': _('PayPal debit authorization'), + 'T0600': _('General credit card withdrawal'), + 'T0700': _('General credit card deposit'), + 'T0701': _('Credit card deposit for negative PayPal account balance'), + 'T0800': _('General bonus'), + 'T0801': _('Debit card cash back bonus'), + 'T0802': _('Merchant referral account bonus'), + 'T0803': _('Balance manager account bonus'), + 'T0804': _('PayPal buyer warranty bonus'), + 'T0805': _( + 'PayPal protection bonus, payout for PayPal buyer protection, payout ' + 'for full protection with PayPal buyer credit.' + ), + 'T0806': _('Bonus for first ACH use'), + 'T0807': _('Credit card security charge refund'), + 'T0808': _('Credit card cash back bonus'), + 'T0900': _('General incentive or certificate redemption'), + 'T0901': _('Gift certificate redemption'), + 'T0902': _('Points incentive redemption'), + 'T0903': _('Coupon redemption'), + 'T0904': _('eBay loyalty incentive'), + 'T0905': _('Offers used as funding source'), + 'T1000': _('Bill pay transaction'), + 'T1100': _('General reversal'), + 'T1101': _('Reversal of ACH withdrawal transaction'), + 'T1102': _('Reversal of debit card transaction'), + 'T1103': _('Reversal of points usage'), + 'T1104': _('Reversal of ACH deposit'), + 'T1105': _('Reversal of general account hold'), + 'T1106': _('Payment reversal, initiated by PayPal'), + 'T1107': _('Payment refund, initiated by merchant'), + 'T1108': _('Fee reversal'), + 'T1109': _('Fee refund'), + 'T1110': _('Hold for dispute investigation'), + 'T1111': _('Cancellation of hold for dispute resolution'), + 'T1112': _('MAM reversal'), + 'T1113': _('Non-reference credit payment'), + 'T1114': _('MassPay reversal transaction'), + 'T1115': _('MassPay refund transaction'), + 'T1116': _('Instant payment review (IPR) reversal'), + 'T1117': _('Rebate or cash back reversal'), + 'T1118': _('Generic instrument/Open Wallet reversals (seller side)'), + 'T1119': _('Generic instrument/Open Wallet reversals (buyer side)'), + 'T1200': _('General account adjustment'), + 'T1201': _('Chargeback'), + 'T1202': _('Chargeback reversal'), + 'T1203': _('Charge-off adjustment'), + 'T1204': _('Incentive adjustment'), + 'T1205': _('Reimbursement of chargeback'), + 'T1207': _('Chargeback re-presentment rejection'), + 'T1208': _('Chargeback cancellation'), + 'T1300': _('General authorization'), + 'T1301': _('Reauthorization'), + 'T1302': _('Void of authorization'), + 'T1400': _('General dividend'), + 'T1500': _('General temporary hold'), + 'T1501': _('Account hold for open authorization'), + 'T1502': _('Account hold for ACH deposit'), + 'T1503': _('Temporary hold on available balance'), + 'T1600': _('PayPal buyer credit payment funding'), + 'T1601': _('BML credit, transfer from BML'), + 'T1602': _('Buyer credit payment'), + 'T1603': _('Buyer credit payment withdrawal, transfer to BML'), + 'T1700': _('General withdrawal to non-bank institution'), + 'T1701': _('WorldLink withdrawal'), + 'T1800': _('General buyer credit payment'), + 'T1801': _('BML withdrawal, transfer to BML'), + 'T1900': _('General adjustment without business-related event'), + 'T2000': _('General intra-account transfer'), + 'T2001': _('Settlement consolidation'), + 'T2002': _('Transfer of funds from payable'), + 'T2003': _('Transfer to external GL entity'), + 'T2101': _('General hold'), + 'T2102': _('General hold release'), + 'T2103': _('Reserve hold'), + 'T2104': _('Reserve release'), + 'T2105': _('Payment review hold'), + 'T2106': _('Payment review release'), + 'T2107': _('Payment hold'), + 'T2108': _('Payment hold release'), + 'T2109': _('Gift certificate purchase'), + 'T2110': _('Gift certificate redemption'), + 'T2111': _('Funds not yet available'), + 'T2112': _('Funds available'), + 'T2113': _('Blocked payments'), + 'T2201': _('Transfer to and from a credit-card-funded restricted balance'), + 'T3000': _('Generic instrument/Open Wallet transaction'), + 'T5000': _('Deferred disbursement, funds collected for disbursement'), + 'T5001': _('Delayed disbursement, funds disbursed'), + 'T9700': _('Account receivable for shipping'), + 'T9701': _('Funds payable: PayPal-provided funds that must be paid back'), + 'T9702': _( + 'Funds receivable: PayPal-provided funds that are being paid back' + ), + 'T9800': _('Display only transaction'), + 'T9900': _('Other'), +} + + +class OnlineBankStatementProviderPayPal(models.Model): + _inherit = 'online.bank.statement.provider' + + @api.model + def _get_available_services(self): + return super()._get_available_services() + [ + ('paypal', 'PayPal.com'), + ] + + @api.multi + def _obtain_statement_data(self, date_since, date_until): + self.ensure_one() + if self.service != 'paypal': + return super()._obtain_statement_data( + date_since, + date_until, + ) # pragma: no cover + + currency = ( + self.currency_id or self.company_id.currency_id + ).name + + if date_since.tzinfo: + date_since = date_since.astimezone(pytz.utc).replace(tzinfo=None) + if date_until.tzinfo: + date_until = date_until.astimezone(pytz.utc).replace(tzinfo=None) + + if date_since < datetime.utcnow() - relativedelta(years=3): + raise UserError(_( + 'PayPal allows retrieving transactions only up to 3 years in ' + 'the past. Please import older transactions manually. See ' + 'https://www.paypal.com/us/smarthelp/article/why-can\'t-i' + '-access-transaction-history-greater-than-3-years-ts2241' + )) + + token = self._paypal_get_token() + transactions = self._paypal_get_transactions( + token, + currency, + date_since, + date_until + ) + if not transactions: + return None + + # Normalize transactions, sort by date, and get lines + transactions = list(sorted( + transactions, + key=lambda transaction: self._paypal_get_transaction_date( + transaction + ) + )) + lines = list(itertools.chain.from_iterable(map( + lambda x: self._paypal_transaction_to_lines(x), + transactions + ))) + + first_transaction = transactions[0] + first_transaction_id = \ + first_transaction['transaction_info']['transaction_id'] + first_transaction_date = self._paypal_get_transaction_date( + first_transaction + ) + first_transaction = self._paypal_get_transaction( + token, + first_transaction_id, + first_transaction_date + ) + if not first_transaction: + raise UserError(_('Failed to resolve transaction %s (%s)') % ( + first_transaction_id, + first_transaction_date + )) + balance_start = self._paypal_get_transaction_ending_balance( + first_transaction + ) + balance_start -= self._paypal_get_transaction_total_amount( + first_transaction + ) + balance_start -= self._paypal_get_transaction_fee_amount( + first_transaction + ) + + last_transaction = transactions[-1] + last_transaction_id = \ + last_transaction['transaction_info']['transaction_id'] + last_transaction_date = self._paypal_get_transaction_date( + last_transaction + ) + last_transaction = self._paypal_get_transaction( + token, + last_transaction_id, + last_transaction_date + ) + if not last_transaction: + raise UserError(_('Failed to resolve transaction %s (%s)') % ( + last_transaction_id, + last_transaction_date + )) + balance_end = self._paypal_get_transaction_ending_balance( + last_transaction + ) + + return lines, { + 'balance_start': balance_start, + 'balance_end_real': balance_end, + } + + @api.model + def _paypal_preparse_transaction(self, transaction): + date = dateutil.parser.parse( + self._paypal_get_transaction_date(transaction) + ).astimezone(pytz.utc).replace(tzinfo=None) + transaction['transaction_info']['transaction_updated_date'] = date + return transaction + + @api.model + def _paypal_transaction_to_lines(self, data): + transaction = data['transaction_info'] + payer = data['payer_info'] + transaction_id = transaction['transaction_id'] + event_code = transaction['transaction_event_code'] + date = self._paypal_get_transaction_date(data) + total_amount = self._paypal_get_transaction_total_amount(data) + fee_amount = self._paypal_get_transaction_fee_amount(data) + transaction_subject = transaction.get('transaction_subject') + transaction_note = transaction.get('transaction_note') + invoice = transaction.get('invoice_id') + payer_name = payer.get('payer_name', {}) + payer_email = payer_name.get('email_address') + if invoice: + invoice = _('Invoice %s') % invoice + note = transaction_id + if transaction_subject or transaction_note: + note = '%s: %s' % ( + note, + transaction_subject or transaction_note + ) + if payer_email: + note += ' (%s)' % payer_email + unique_import_id = '%s-%s' % ( + transaction_id, + int(date.timestamp()), + ) + name = invoice \ + or transaction_subject \ + or transaction_note \ + or EVENT_DESCRIPTIONS.get(event_code) \ + or '' + line = { + 'name': name, + 'amount': str(total_amount), + 'date': date, + 'note': note, + 'unique_import_id': unique_import_id, + } + payer_full_name = payer_name.get('full_name') or \ + payer_name.get('alternate_full_name') + if payer_full_name: + line.update({ + 'partner_name': payer_full_name, + }) + lines = [line] + if fee_amount: + lines += [{ + 'name': _('Fee for %s') % (name or transaction_id), + 'amount': str(fee_amount), + 'date': date, + 'partner_name': 'PayPal', + 'unique_import_id': '%s-FEE' % unique_import_id, + 'note': _('Transaction fee for %s') % note, + }] + return lines + + @api.multi + def _paypal_get_token(self): + self.ensure_one() + data = self._paypal_retrieve( + (self.api_base or PAYPAL_API_BASE) + '/v1/oauth2/token', + (self.username, self.password), + data=urlencode({ + 'grant_type': 'client_credentials', + }).encode('utf-8') + ) + if 'scope' not in data or TRANSACTIONS_SCOPE not in data['scope']: + raise UserError(_( + 'PayPal App features are configured incorrectly!' + )) + if 'token_type' not in data or data['token_type'] != 'Bearer': + raise UserError(_('Invalid token type!')) + if 'access_token' not in data: + raise UserError(_( + 'Failed to acquire token using Client ID and Secret!' + )) + return data['access_token'] + + @api.multi + def _paypal_get_transaction(self, token, transaction_id, timestamp): + self.ensure_one() + transaction_date = timestamp.isoformat() + 'Z' + url = (self.api_base or PAYPAL_API_BASE) \ + + '/v1/reporting/transactions' \ + + ( + '?start_date=%s' + '&end_date=%s' + '&fields=all' + ) % ( + transaction_date, + transaction_date, + ) + data = self._paypal_retrieve(url, token) + transactions = data['transaction_details'] + for transaction in transactions: + if transaction['transaction_info']['transaction_id'] != \ + transaction_id: + continue + return transaction + return None + + @api.multi + def _paypal_get_transactions(self, token, currency, since, until): + self.ensure_one() + # NOTE: Not more than 31 days in a row + # NOTE: start_date <= date <= end_date, thus check every transaction + interval_step = relativedelta(days=31) + interval_start = since + transactions = [] + while interval_start < until: + interval_end = min(interval_start + interval_step, until) + page = 1 + total_pages = None + while total_pages is None or page <= total_pages: + url = (self.api_base or PAYPAL_API_BASE) \ + + '/v1/reporting/transactions' \ + + ( + '?transaction_currency=%s' + '&start_date=%s' + '&end_date=%s' + '&fields=all' + '&balance_affecting_records_only=Y' + '&page_size=500' + '&page=%d' + % ( + currency, + interval_start.isoformat() + 'Z', + interval_end.isoformat() + 'Z', + page, + )) + data = self._paypal_retrieve(url, token) + interval_transactions = map( + lambda transaction: self._paypal_preparse_transaction( + transaction + ), + data['transaction_details'] + ) + transactions += list(filter( + lambda transaction: + interval_start <= self._paypal_get_transaction_date( + transaction + ) < interval_end, + interval_transactions + )) + total_pages = data['total_pages'] + page += 1 + interval_start += interval_step + return transactions + + @api.model + def _paypal_get_transaction_date(self, transaction): + # NOTE: CSV reports from PayPal use this date, search as well + return transaction['transaction_info']['transaction_updated_date'] + + @api.model + def _paypal_get_transaction_total_amount(self, transaction): + transaction_amount = \ + transaction['transaction_info'].get('transaction_amount') + if not transaction_amount: + return Decimal() + return Decimal(transaction_amount['value']) + + @api.model + def _paypal_get_transaction_fee_amount(self, transaction): + fee_amount = transaction['transaction_info'].get('fee_amount') + if not fee_amount: + return Decimal() + return Decimal(fee_amount['value']) + + @api.model + def _paypal_get_transaction_ending_balance(self, transaction): + # NOTE: 'available_balance' instead of 'ending_balance' as per CSV file + transaction_amount = \ + transaction['transaction_info'].get('available_balance') + if not transaction_amount: + return Decimal() + return Decimal(transaction_amount['value']) + + @api.model + def _paypal_validate(self, content): + content = json.loads(content) + if 'error' in content and content['error']: + raise UserError( + content['error_description'] + if 'error_description' in content + else 'Unknown error' + ) + return content + + @api.model + def _paypal_retrieve(self, url, auth, data=None): + try: + with self._paypal_urlopen(url, auth, data) as response: + content = response.read().decode('utf-8') + except HTTPError as e: + content = self._paypal_validate( + e.read().decode('utf-8') + ) + if 'name' in content and content['name']: + raise UserError('%s: %s' % ( + content['name'], + content['error_description'] + if 'error_description' in content + else 'Unknown error', + )) + raise e + return self._paypal_validate(content) + + @api.model + def _paypal_urlopen(self, url, auth, data=None): + if not auth: + raise UserError(_('No authentication specified!')) + request = urllib.request.Request(url, data=data) + if isinstance(auth, tuple): + request.add_header( + 'Authorization', + 'Basic %s' % str( + b64encode(('%s:%s' % (auth[0], auth[1])).encode('utf-8')), + 'utf-8' + ) + ) + elif isinstance(auth, str): + request.add_header( + 'Authorization', + 'Bearer %s' % auth + ) + else: + raise UserError(_('Unknown authentication specified!')) + return urllib.request.urlopen(request) diff --git a/account_bank_statement_import_online_paypal/readme/CONFIGURE.rst b/account_bank_statement_import_online_paypal/readme/CONFIGURE.rst new file mode 100644 index 00000000..67b44183 --- /dev/null +++ b/account_bank_statement_import_online_paypal/readme/CONFIGURE.rst @@ -0,0 +1,29 @@ +To configure online bank statements provider: + +#. Go to *Invoicing > Configuration > Bank Accounts* +#. Open bank account to configure and edit it +#. Set *Bank Feeds* to *Online* +#. Select *PayPal.com* as online bank statements provider in + *Online Bank Statements (OCA)* section +#. Save the bank account +#. Click on provider and configure provider-specific settings. + +or, alternatively: + +#. Go to *Invoicing > Overview* +#. Open settings of the corresponding journal account +#. Switch to *Bank Account* tab +#. Set *Bank Feeds* to *Online* +#. Select *PayPal.com* as online bank statements provider in + *Online Bank Statements (OCA)* section +#. Save the bank account +#. Click on provider and configure provider-specific settings. + +To obtain *Client ID* and *Secret*: + +#. Open `PayPal Developer `_ +#. Go to *My Apps & Credentials* and switch to *Live* +#. Under *REST API apps*, click *Create App* to create new application (e.g. *Odoo*) +#. Copy *Client ID* and *Secret* to use during provider configuration +#. Under *Live App Settings*, uncheck all features except *Transaction Search* +#. Click Save diff --git a/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst b/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..1c6a35a1 --- /dev/null +++ b/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Alexey Pelykh diff --git a/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst b/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst new file mode 100644 index 00000000..a2a7a3e4 --- /dev/null +++ b/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module provides online bank statements from +`PayPal.com `_. diff --git a/account_bank_statement_import_online_paypal/readme/ROADMAP.rst b/account_bank_statement_import_online_paypal/readme/ROADMAP.rst new file mode 100644 index 00000000..d8114209 --- /dev/null +++ b/account_bank_statement_import_online_paypal/readme/ROADMAP.rst @@ -0,0 +1,7 @@ +* Only transactions for the previous three years are retrieved, historical data + can be imported manually, see ``account_bank_statement_import_paypal``. See + `PayPal Help Center article `_ + for details. +* `PayPal Transaction Info `_ + defines extra fields like ``tip_amount``, ``shipping_amount``, etc. that + could be useful to be decomposed from a single transaction. diff --git a/account_bank_statement_import_online_paypal/readme/USAGE.rst b/account_bank_statement_import_online_paypal/readme/USAGE.rst new file mode 100644 index 00000000..03845f13 --- /dev/null +++ b/account_bank_statement_import_online_paypal/readme/USAGE.rst @@ -0,0 +1,6 @@ +To pull historical bank statements: + +#. Go to *Invoicing > Configuration > Bank Accounts* +#. Select specific bank accounts +#. Launch *Actions > Online Bank Statements Pull Wizard* +#. Configure date interval and click *Pull* diff --git a/account_bank_statement_import_online_paypal/static/description/index.html b/account_bank_statement_import_online_paypal/static/description/index.html new file mode 100644 index 00000000..15eafb05 --- /dev/null +++ b/account_bank_statement_import_online_paypal/static/description/index.html @@ -0,0 +1,479 @@ + + + + + + +Online Bank Statements: PayPal.com + + + +
+

Online Bank Statements: PayPal.com

+ + +

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

+ +
+

Configuration

+

To configure online bank statements provider:

+
    +
  1. Go to Invoicing > Configuration > Bank Accounts
  2. +
  3. Open bank account to configure and edit it
  4. +
  5. Set Bank Feeds to Online
  6. +
  7. Select PayPal.com as online bank statements provider in +Online Bank Statements (OCA) section
  8. +
  9. Save the bank account
  10. +
  11. Click on provider and configure provider-specific settings.
  12. +
+

or, alternatively:

+
    +
  1. Go to Invoicing > Overview
  2. +
  3. Open settings of the corresponding journal account
  4. +
  5. Switch to Bank Account tab
  6. +
  7. Set Bank Feeds to Online
  8. +
  9. Select PayPal.com as online bank statements provider in +Online Bank Statements (OCA) section
  10. +
  11. Save the bank account
  12. +
  13. Click on provider and configure provider-specific settings.
  14. +
+

To obtain Client ID and Secret:

+
    +
  1. Open PayPal Developer
  2. +
  3. Go to My Apps & Credentials and switch to Live
  4. +
  5. Under REST API apps, click Create App to create new application (e.g. Odoo)
  6. +
  7. Copy Client ID and Secret to use during provider configuration
  8. +
  9. Under Live App Settings, uncheck all features except Transaction Search
  10. +
  11. Click Save
  12. +
+
+
+

Usage

+

To pull historical bank statements:

+
    +
  1. Go to Invoicing > Configuration > Bank Accounts
  2. +
  3. Select specific bank accounts
  4. +
  5. Launch Actions > Online Bank Statements Pull Wizard
  6. +
  7. Configure date interval and click Pull
  8. +
+
+
+

Known issues / Roadmap

+
    +
  • Only transactions for the previous three years are retrieved, historical data +can be imported manually, see account_bank_statement_import_paypal. See +PayPal Help Center article +for details.
  • +
  • PayPal Transaction Info +defines extra fields like tip_amount, shipping_amount, etc. that +could be useful to be decomposed from a single transaction.
  • +
+
+
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Brainbean Apps
  • +
  • Dataplug
  • +
+
+ +
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

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_bank_statement_import_online_paypal/tests/__init__.py b/account_bank_statement_import_online_paypal/tests/__init__.py new file mode 100644 index 00000000..ca7b0d9c --- /dev/null +++ b/account_bank_statement_import_online_paypal/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_account_bank_statement_import_online_paypal diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py new file mode 100644 index 00000000..fc7e814c --- /dev/null +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -0,0 +1,576 @@ +# Copyright 2019 Brainbean Apps (https://brainbeanapps.com) +# Copyright 2019 Dataplug (https://dataplug.io) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from decimal import Decimal +import json +from unittest import mock + +from odoo.tests import common +from odoo import fields + +_module_ns = 'odoo.addons.account_bank_statement_import_online_paypal' +_provider_class = ( + _module_ns + + '.models.online_bank_statement_provider_paypal' + + '.OnlineBankStatementProviderPayPal' +) + + +class TestAccountBankAccountStatementImportOnlinePayPal( + common.TransactionCase +): + + def setUp(self): + super().setUp() + + self.now = fields.Datetime.now() + self.currency_eur = self.env.ref('base.EUR') + self.currency_usd = self.env.ref('base.USD') + self.AccountJournal = self.env['account.journal'] + self.OnlineBankStatementProvider = self.env[ + 'online.bank.statement.provider' + ] + self.AccountBankStatement = self.env['account.bank.statement'] + self.AccountBankStatementLine = self.env['account.bank.statement.line'] + + Provider = self.OnlineBankStatementProvider + self.paypal_parse_transaction = lambda payload: ( + Provider._paypal_transaction_to_lines( + Provider._paypal_preparse_transaction( + json.loads( + payload, + parse_float=Decimal, + ) + ) + ) + ) + self.mock_token = lambda: mock.patch( + _provider_class + '._paypal_get_token', + return_value='--TOKEN--', + ) + + def test_good_token(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = json.loads("""{ + "scope": "https://uri.paypal.com/services/reporting/search/read", + "access_token": "---TOKEN---", + "token_type": "Bearer", + "app_id": "APP-1234567890", + "expires_in": 32400, + "nonce": "---NONCE---" +}""", parse_float=Decimal) + token = None + with mock.patch( + _provider_class + '._paypal_retrieve', + return_value=mocked_response, + ): + token = provider._paypal_get_token() + self.assertEqual(token, '---TOKEN---') + + def test_bad_token_scope(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = json.loads("""{ + "scope": "openid https://uri.paypal.com/services/applications/webhooks", + "access_token": "---TOKEN---", + "token_type": "Bearer", + "app_id": "APP-1234567890", + "expires_in": 32400, + "nonce": "---NONCE---" +}""", parse_float=Decimal) + with mock.patch( + _provider_class + '._paypal_retrieve', + return_value=mocked_response, + ): + with self.assertRaises(Exception): + provider._paypal_get_token() + + def test_bad_token_type(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = json.loads("""{ + "scope": "https://uri.paypal.com/services/reporting/search/read", + "access_token": "---TOKEN---", + "token_type": "NotBearer", + "app_id": "APP-1234567890", + "expires_in": 32400, + "nonce": "---NONCE---" +}""", parse_float=Decimal) + with mock.patch( + _provider_class + '._paypal_retrieve', + return_value=mocked_response, + ): + with self.assertRaises(Exception): + provider._paypal_get_token() + + def test_no_token(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = json.loads("""{ + "scope": "https://uri.paypal.com/services/reporting/search/read", + "token_type": "Bearer", + "app_id": "APP-1234567890", + "expires_in": 32400, + "nonce": "---NONCE---" + }""", parse_float=Decimal) + with mock.patch( + _provider_class + '._paypal_retrieve', + return_value=mocked_response, + ): + with self.assertRaises(Exception): + provider._paypal_get_token() + + def test_empty_pull(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = json.loads("""{ + "transaction_details": [], + "account_number": "1234567890", + "start_date": "2019-08-01T00:00:00+0000", + "end_date": "2019-08-01T00:00:00+0000", + "last_refreshed_datetime": "2019-09-01T00:00:00+0000", + "page": 1, + "total_items": 0, + "total_pages": 0 +}""", parse_float=Decimal) + with mock.patch( + _provider_class + '._paypal_retrieve', + return_value=mocked_response, + ), self.mock_token(): + data = provider._obtain_statement_data( + self.now - relativedelta(hours=1), + self.now, + ) + + self.assertIsNone(data) + + def test_ancient_pull(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = json.loads("""{ + "transaction_details": [], + "account_number": "1234567890", + "start_date": "2019-08-01T00:00:00+0000", + "end_date": "2019-08-01T00:00:00+0000", + "last_refreshed_datetime": "2019-09-01T00:00:00+0000", + "page": 1, + "total_items": 0, + "total_pages": 0 +}""", parse_float=Decimal) + with mock.patch( + _provider_class + '._paypal_retrieve', + return_value=mocked_response, + ), self.mock_token(): + with self.assertRaises(Exception): + provider._obtain_statement_data( + self.now - relativedelta(years=5), + self.now, + ) + + def test_pull(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = json.loads("""{ + "transaction_details": [{ + "transaction_info": { + "paypal_account_id": "1234567890", + "transaction_id": "1234567890", + "transaction_event_code": "T1234", + "transaction_initiation_date": "2019-08-01T00:00:00+0000", + "transaction_updated_date": "2019-08-01T00:00:00+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "1000.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "-100.00" + }, + "transaction_status": "S", + "transaction_subject": "Payment for Invoice(s) 1", + "ending_balance": { + "currency_code": "USD", + "value": "900.00" + }, + "available_balance": { + "currency_code": "USD", + "value": "900.00" + }, + "invoice_id": "1" + }, + "payer_info": { + "account_id": "1234567890", + "email_address": "partner@example.com", + "address_status": "Y", + "payer_status": "N", + "payer_name": { + "alternate_full_name": "Acme, Inc." + }, + "country_code": "US" + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + }, { + "transaction_info": { + "paypal_account_id": "1234567890", + "transaction_id": "1234567891", + "transaction_event_code": "T1234", + "transaction_initiation_date": "2019-08-02T00:00:00+0000", + "transaction_updated_date": "2019-08-02T00:00:00+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "1000.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "-100.00" + }, + "transaction_status": "S", + "transaction_subject": "Payment for Invoice(s) 1", + "ending_balance": { + "currency_code": "USD", + "value": "900.00" + }, + "available_balance": { + "currency_code": "USD", + "value": "900.00" + }, + "invoice_id": "1" + }, + "payer_info": { + "account_id": "1234567890", + "email_address": "partner@example.com", + "address_status": "Y", + "payer_status": "N", + "payer_name": { + "alternate_full_name": "Acme, Inc." + }, + "country_code": "US" + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} + }], + "account_number": "1234567890", + "start_date": "2019-08-01T00:00:00+0000", + "end_date": "2019-08-02T00:00:00+0000", + "last_refreshed_datetime": "2019-09-01T00:00:00+0000", + "page": 1, + "total_items": 1, + "total_pages": 1 +}""", parse_float=Decimal) + with mock.patch( + _provider_class + '._paypal_retrieve', + return_value=mocked_response, + ), self.mock_token(): + data = provider._obtain_statement_data( + datetime(2019, 8, 1), + datetime(2019, 8, 2), + ) + + self.assertEqual(len(data[0]), 2) + self.assertEqual(data[0][0], { + 'date': datetime(2019, 8, 1), + 'amount': '1000.00', + 'name': 'Invoice 1', + 'note': '1234567890: Payment for Invoice(s) 1', + 'partner_name': 'Acme, Inc.', + 'unique_import_id': '1234567890-1564617600', + }) + self.assertEqual(data[0][1], { + 'date': datetime(2019, 8, 1), + 'amount': '-100.00', + 'name': 'Fee for Invoice 1', + 'note': 'Transaction fee for 1234567890: Payment for Invoice(s) 1', + 'partner_name': 'PayPal', + 'unique_import_id': '1234567890-1564617600-FEE', + }) + self.assertEqual(data[1], { + 'balance_start': 0.0, + 'balance_end_real': 900.0, + }) + + def test_transaction_parse_1(self): + lines = self.paypal_parse_transaction("""{ + "transaction_info": { + "paypal_account_id": "1234567890", + "transaction_id": "1234567890", + "transaction_event_code": "T1234", + "transaction_initiation_date": "2019-08-01T00:00:00+0000", + "transaction_updated_date": "2019-08-01T00:00:00+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "1000.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "0.00" + }, + "transaction_status": "S", + "transaction_subject": "Payment for Invoice(s) 1", + "ending_balance": { + "currency_code": "USD", + "value": "1000.00" + }, + "available_balance": { + "currency_code": "USD", + "value": "1000.00" + }, + "invoice_id": "1" + }, + "payer_info": { + "account_id": "1234567890", + "email_address": "partner@example.com", + "address_status": "Y", + "payer_status": "N", + "payer_name": { + "alternate_full_name": "Acme, Inc." + }, + "country_code": "US" + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} +}""") + self.assertEqual(len(lines), 1) + self.assertEqual(lines[0], { + 'date': datetime(2019, 8, 1), + 'amount': '1000.00', + 'name': 'Invoice 1', + 'note': '1234567890: Payment for Invoice(s) 1', + 'partner_name': 'Acme, Inc.', + 'unique_import_id': '1234567890-1564617600', + }) + + def test_transaction_parse_2(self): + lines = self.paypal_parse_transaction("""{ + "transaction_info": { + "paypal_account_id": "1234567890", + "transaction_id": "1234567890", + "transaction_event_code": "T1234", + "transaction_initiation_date": "2019-08-01T00:00:00+0000", + "transaction_updated_date": "2019-08-01T00:00:00+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "1000.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "0.00" + }, + "transaction_status": "S", + "transaction_subject": "Payment for Invoice(s) 1", + "ending_balance": { + "currency_code": "USD", + "value": "1000.00" + }, + "available_balance": { + "currency_code": "USD", + "value": "1000.00" + }, + "invoice_id": "1" + }, + "payer_info": { + "account_id": "1234567890", + "email_address": "partner@example.com", + "address_status": "Y", + "payer_status": "N", + "payer_name": { + "alternate_full_name": "Acme, Inc." + }, + "country_code": "US" + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} +}""") + self.assertEqual(len(lines), 1) + self.assertEqual(lines[0], { + 'date': datetime(2019, 8, 1), + 'amount': '1000.00', + 'name': 'Invoice 1', + 'note': '1234567890: Payment for Invoice(s) 1', + 'partner_name': 'Acme, Inc.', + 'unique_import_id': '1234567890-1564617600', + }) + + def test_transaction_parse_3(self): + lines = self.paypal_parse_transaction("""{ + "transaction_info": { + "paypal_account_id": "1234567890", + "transaction_id": "1234567890", + "transaction_event_code": "T1234", + "transaction_initiation_date": "2019-08-01T00:00:00+0000", + "transaction_updated_date": "2019-08-01T00:00:00+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "1000.00" + }, + "fee_amount": { + "currency_code": "USD", + "value": "-100.00" + }, + "transaction_status": "S", + "transaction_subject": "Payment for Invoice(s) 1", + "ending_balance": { + "currency_code": "USD", + "value": "900.00" + }, + "available_balance": { + "currency_code": "USD", + "value": "900.00" + }, + "invoice_id": "1" + }, + "payer_info": { + "account_id": "1234567890", + "email_address": "partner@example.com", + "address_status": "Y", + "payer_status": "N", + "payer_name": { + "alternate_full_name": "Acme, Inc." + }, + "country_code": "US" + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} +}""") + self.assertEqual(len(lines), 2) + self.assertEqual(lines[0], { + 'date': datetime(2019, 8, 1), + 'amount': '1000.00', + 'name': 'Invoice 1', + 'note': '1234567890: Payment for Invoice(s) 1', + 'partner_name': 'Acme, Inc.', + 'unique_import_id': '1234567890-1564617600', + }) + self.assertEqual(lines[1], { + 'date': datetime(2019, 8, 1), + 'amount': '-100.00', + 'name': 'Fee for Invoice 1', + 'note': 'Transaction fee for 1234567890: Payment for Invoice(s) 1', + 'partner_name': 'PayPal', + 'unique_import_id': '1234567890-1564617600-FEE', + }) + + def test_transaction_parse_4(self): + lines = self.paypal_parse_transaction("""{ + "transaction_info": { + "paypal_account_id": "1234567890", + "transaction_id": "1234567890", + "transaction_event_code": "T1234", + "transaction_initiation_date": "2019-08-01T00:00:00+0000", + "transaction_updated_date": "2019-08-01T00:00:00+0000", + "transaction_amount": { + "currency_code": "USD", + "value": "1000.00" + }, + "transaction_status": "S", + "transaction_subject": "Payment for Invoice(s) 1", + "ending_balance": { + "currency_code": "USD", + "value": "1000.00" + }, + "available_balance": { + "currency_code": "USD", + "value": "1000.00" + }, + "invoice_id": "1" + }, + "payer_info": { + "account_id": "1234567890", + "email_address": "partner@example.com", + "address_status": "Y", + "payer_status": "N", + "payer_name": { + "alternate_full_name": "Acme, Inc." + }, + "country_code": "US" + }, + "shipping_info": {}, + "cart_info": {}, + "store_info": {}, + "auction_info": {}, + "incentive_info": {} +}""") + self.assertEqual(len(lines), 1) + self.assertEqual(lines[0], { + 'date': datetime(2019, 8, 1), + 'amount': '1000.00', + 'name': 'Invoice 1', + 'note': '1234567890: Payment for Invoice(s) 1', + 'partner_name': 'Acme, Inc.', + 'unique_import_id': '1234567890-1564617600', + }) diff --git a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml new file mode 100644 index 00000000..0ec34e05 --- /dev/null +++ b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml @@ -0,0 +1,40 @@ + + + + + + online.bank.statement.provider.form + online.bank.statement.provider + + + + + + + + + + + + + + + From 69499ba32ab4b0e844439ae28cd8b110a1ecbdfc Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 30 Mar 2020 07:46:16 +0000 Subject: [PATCH 02/13] [ADD] icon.png --- .../static/description/icon.png | Bin 0 -> 9455 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 account_bank_statement_import_online_paypal/static/description/icon.png diff --git a/account_bank_statement_import_online_paypal/static/description/icon.png b/account_bank_statement_import_online_paypal/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From 53c659796daff944364b52c6ff35cde251962eb0 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Mon, 6 Apr 2020 16:58:11 +0200 Subject: [PATCH 03/13] [FIX] account_bank_statement_import_online_paypal: workaround for PayPal issue --- .../README.rst | 4 + .../__manifest__.py | 2 +- ...nt_bank_statement_import_online_paypal.pot | 29 +++-- .../online_bank_statement_provider_paypal.py | 66 +++++++---- .../readme/ROADMAP.rst | 4 + .../static/description/index.html | 4 + ...unt_bank_statement_import_online_paypal.py | 110 +++++++++++++++++- 7 files changed, 184 insertions(+), 35 deletions(-) diff --git a/account_bank_statement_import_online_paypal/README.rst b/account_bank_statement_import_online_paypal/README.rst index 53666cd0..f3808f57 100644 --- a/account_bank_statement_import_online_paypal/README.rst +++ b/account_bank_statement_import_online_paypal/README.rst @@ -86,6 +86,10 @@ Known issues / Roadmap * `PayPal Transaction Info `_ defines extra fields like ``tip_amount``, ``shipping_amount``, etc. that could be useful to be decomposed from a single transaction. +* There's a known issue with PayPal API that on every Monday for couple of + hours after UTC midnight it returns ``INVALID_REQUEST`` incorrectly: their + servers have not inflated the data yet. PayPal tech support confirmed this + behaviour in case #06650320 (private). Bug Tracker =========== diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 0e9d0506..30040ea3 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Online Bank Statements: PayPal.com', - 'version': '12.0.1.0.0', + 'version': '12.0.1.0.1', 'author': 'Brainbean Apps, ' 'Dataplug, ' diff --git a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot index 736ec753..fe712b34 100644 --- a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot +++ b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot @@ -234,20 +234,20 @@ msgid "Electronic funds transfer (EFT)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:362 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:363 #, python-format msgid "Failed to acquire token using Client ID and Secret!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:240 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:266 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:241 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:267 #, python-format msgid "Failed to resolve transaction %s (%s)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:336 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:337 #, python-format msgid "Fee for %s" msgstr "" @@ -500,13 +500,13 @@ msgid "International credit card withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:360 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:361 #, python-format msgid "Invalid token type!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:302 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:303 #, python-format msgid "Invoice %s" msgstr "" @@ -554,7 +554,7 @@ msgid "Mobile payment, made through a mobile phone" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:500 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:522 #, python-format msgid "No authentication specified!" msgstr "" @@ -589,7 +589,7 @@ msgid "Partner fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:356 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:357 #, python-format msgid "PayPal App features are configured incorrectly!" msgstr "" @@ -607,7 +607,7 @@ msgid "PayPal Here payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:199 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:200 #, python-format msgid "PayPal allows retrieving transactions only up to 3 years in the past. Please import older transactions manually. See https://www.paypal.com/us/smarthelp/article/why-can't-i-access-transaction-history-greater-than-3-years-ts2241" msgstr "" @@ -828,7 +828,7 @@ msgid "Third-party recoupment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:341 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:342 #, python-format msgid "Transaction fee for %s" msgstr "" @@ -852,11 +852,18 @@ msgid "Transfer to external GL entity" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:516 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:538 #, python-format msgid "Unknown authentication specified!" msgstr "" +#. module: account_bank_statement_import_online_paypal +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:485 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:492 +#, python-format +msgid "Unknown error" +msgstr "" + #. module: account_bank_statement_import_online_paypal #: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:59 #, python-format diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index fed83e05..b0e27b9c 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -166,6 +166,7 @@ EVENT_DESCRIPTIONS = { 'T9800': _('Display only transaction'), 'T9900': _('Other'), } +NO_DATA_FOR_DATE_AVAIL_MSG = 'Data for the given start date is not available.' class OnlineBankStatementProviderPayPal(models.Model): @@ -416,7 +417,18 @@ class OnlineBankStatementProviderPayPal(models.Model): interval_end.isoformat() + 'Z', page, )) - data = self._paypal_retrieve(url, token) + + # NOTE: Workaround for INVALID_REQUEST (see ROADMAP.rst) + invalid_data_workaround = self.env.context.get( + 'test_account_bank_statement_import_online_paypal_monday', + interval_start.weekday() == 0 and ( + datetime.utcnow() - interval_start + ).total_seconds() < 28800 + ) + + data = self.with_context( + invalid_data_workaround=invalid_data_workaround, + )._paypal_retrieve(url, token) interval_transactions = map( lambda transaction: self._paypal_preparse_transaction( transaction @@ -465,15 +477,22 @@ class OnlineBankStatementProviderPayPal(models.Model): return Decimal(transaction_amount['value']) @api.model - def _paypal_validate(self, content): - content = json.loads(content) - if 'error' in content and content['error']: - raise UserError( - content['error_description'] - if 'error_description' in content - else 'Unknown error' - ) - return content + def _paypal_decode_error(self, content): + generic_error = content.get('name') + if generic_error: + return UserError('%s: %s' % ( + generic_error, + content.get('message') or _('Unknown error'), + )) + + identity_error = content.get('error') + if identity_error: + UserError('%s: %s' % ( + generic_error, + content.get('error_description') or _('Unknown error'), + )) + + return None @api.model def _paypal_retrieve(self, url, auth, data=None): @@ -481,18 +500,21 @@ class OnlineBankStatementProviderPayPal(models.Model): with self._paypal_urlopen(url, auth, data) as response: content = response.read().decode('utf-8') except HTTPError as e: - content = self._paypal_validate( - e.read().decode('utf-8') - ) - if 'name' in content and content['name']: - raise UserError('%s: %s' % ( - content['name'], - content['error_description'] - if 'error_description' in content - else 'Unknown error', - )) - raise e - return self._paypal_validate(content) + content = json.loads(e.read().decode('utf-8')) + + # NOTE: Workaround for INVALID_REQUEST (see ROADMAP.rst) + if self.env.context.get('invalid_data_workaround') \ + and content.get('name') == 'INVALID_REQUEST' \ + and content.get('message') == NO_DATA_FOR_DATE_AVAIL_MSG: + return { + 'transaction_details': [], + 'page': 1, + 'total_items': 0, + 'total_pages': 0, + } + + raise self._paypal_decode_error(content) or e + return json.loads(content) @api.model def _paypal_urlopen(self, url, auth, data=None): diff --git a/account_bank_statement_import_online_paypal/readme/ROADMAP.rst b/account_bank_statement_import_online_paypal/readme/ROADMAP.rst index d8114209..f6968426 100644 --- a/account_bank_statement_import_online_paypal/readme/ROADMAP.rst +++ b/account_bank_statement_import_online_paypal/readme/ROADMAP.rst @@ -5,3 +5,7 @@ * `PayPal Transaction Info `_ defines extra fields like ``tip_amount``, ``shipping_amount``, etc. that could be useful to be decomposed from a single transaction. +* There's a known issue with PayPal API that on every Monday for couple of + hours after UTC midnight it returns ``INVALID_REQUEST`` incorrectly: their + servers have not inflated the data yet. PayPal tech support confirmed this + behaviour in case #06650320 (private). diff --git a/account_bank_statement_import_online_paypal/static/description/index.html b/account_bank_statement_import_online_paypal/static/description/index.html index 15eafb05..91282689 100644 --- a/account_bank_statement_import_online_paypal/static/description/index.html +++ b/account_bank_statement_import_online_paypal/static/description/index.html @@ -438,6 +438,10 @@ for details.
  • PayPal Transaction Info defines extra fields like tip_amount, shipping_amount, etc. that could be useful to be decomposed from a single transaction.
  • +
  • There’s a known issue with PayPal API that on every Monday for couple of +hours after UTC midnight it returns INVALID_REQUEST incorrectly: their +servers have not inflated the data yet. PayPal tech support confirmed this +behaviour in case #06650320 (private).
  • diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index fc7e814c..c600184a 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -7,9 +7,11 @@ from dateutil.relativedelta import relativedelta from decimal import Decimal import json from unittest import mock +from urllib.error import HTTPError -from odoo.tests import common from odoo import fields +from odoo.exceptions import UserError +from odoo.tests import common _module_ns = 'odoo.addons.account_bank_statement_import_online_paypal' _provider_class = ( @@ -19,6 +21,31 @@ _provider_class = ( ) +class FakeHTTPError(HTTPError): + def __init__(self, content): + self.content = content + + def read(self): + return self.content.encode('utf-8') + + +class UrlopenRetValMock: + def __init__(self, content, throw=False): + self.content = content + self.throw = throw + + def __enter__(self): + return self + + def __exit__(self, type, value, tb): + pass + + def read(self): + if self.throw: + raise FakeHTTPError(self.content) + return self.content.encode('utf-8') + + class TestAccountBankAccountStatementImportOnlinePayPal( common.TransactionCase ): @@ -156,6 +183,87 @@ class TestAccountBankAccountStatementImportOnlinePayPal( with self.assertRaises(Exception): provider._paypal_get_token() + def test_no_data_on_monday(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = UrlopenRetValMock("""{ + "debug_id": "eec890ebd5798", + "details": "xxxxxx", + "links": "xxxxxx", + "message": "Data for the given start date is not available.", + "name": "INVALID_REQUEST" +}""", throw=True) + with mock.patch( + _provider_class + '._paypal_urlopen', + return_value=mocked_response, + ), self.mock_token(): + data = provider.with_context( + test_account_bank_statement_import_online_paypal_monday=True, + )._obtain_statement_data( + self.now - relativedelta(hours=1), + self.now, + ) + + self.assertIsNone(data) + + def test_error_handling_1(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = UrlopenRetValMock("""{ + "message": "MSG", + "name": "ERROR" +}""", throw=True) + with mock.patch( + _provider_class + '._paypal_urlopen', + return_value=mocked_response, + ), self.mock_token(): + with self.assertRaises(UserError): + provider._obtain_statement_data( + self.now - relativedelta(years=5), + self.now, + ) + + def test_error_handling_2(self): + journal = self.AccountJournal.create({ + 'name': 'Bank', + 'type': 'bank', + 'code': 'BANK', + 'currency_id': self.currency_eur.id, + 'bank_statements_source': 'online', + 'online_bank_statement_provider': 'paypal', + }) + + provider = journal.online_bank_statement_provider_id + mocked_response = UrlopenRetValMock("""{ + "error_description": "DESC", + "error": "ERROR" +}""", throw=True) + with mock.patch( + _provider_class + '._paypal_urlopen', + return_value=mocked_response, + ), self.mock_token(): + with self.assertRaises(UserError): + provider._obtain_statement_data( + self.now - relativedelta(years=5), + self.now, + ) + def test_empty_pull(self): journal = self.AccountJournal.create({ 'name': 'Bank', From 0ac06309cd5a8884d5f45b7cb40cb96c84a9a904 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Fri, 10 Apr 2020 14:10:00 +0200 Subject: [PATCH 04/13] [IMP] account_bank_statement_import_online_paypal: tests --- .../__manifest__.py | 2 +- ...unt_bank_statement_import_online_paypal.pot | 8 ++++---- .../online_bank_statement_provider_paypal.py | 16 +++++++--------- ...ount_bank_statement_import_online_paypal.py | 18 ++++++------------ 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 30040ea3..777ccd7b 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Online Bank Statements: PayPal.com', - 'version': '12.0.1.0.1', + 'version': '12.0.1.0.2', 'author': 'Brainbean Apps, ' 'Dataplug, ' diff --git a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot index fe712b34..d7cb41e7 100644 --- a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot +++ b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot @@ -554,7 +554,7 @@ msgid "Mobile payment, made through a mobile phone" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:522 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:520 #, python-format msgid "No authentication specified!" msgstr "" @@ -852,14 +852,14 @@ msgid "Transfer to external GL entity" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:538 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:536 #, python-format msgid "Unknown authentication specified!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:485 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:492 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:484 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:490 #, python-format msgid "Unknown error" msgstr "" diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index b0e27b9c..96bb1583 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -478,18 +478,16 @@ class OnlineBankStatementProviderPayPal(models.Model): @api.model def _paypal_decode_error(self, content): - generic_error = content.get('name') - if generic_error: + if 'name' in content: return UserError('%s: %s' % ( - generic_error, - content.get('message') or _('Unknown error'), + content['name'], + content.get('message', _('Unknown error')), )) - identity_error = content.get('error') - if identity_error: - UserError('%s: %s' % ( - generic_error, - content.get('error_description') or _('Unknown error'), + if 'error' in content: + return UserError('%s: %s' % ( + content['error'], + content.get('error_description', _('Unknown error')), )) return None diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index c600184a..792eb25e 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -226,18 +226,15 @@ class TestAccountBankAccountStatementImportOnlinePayPal( provider = journal.online_bank_statement_provider_id mocked_response = UrlopenRetValMock("""{ - "message": "MSG", + "message": "MESSAGE", "name": "ERROR" }""", throw=True) with mock.patch( _provider_class + '._paypal_urlopen', return_value=mocked_response, - ), self.mock_token(): + ): with self.assertRaises(UserError): - provider._obtain_statement_data( - self.now - relativedelta(years=5), - self.now, - ) + provider._paypal_retrieve('https://url', '') def test_error_handling_2(self): journal = self.AccountJournal.create({ @@ -251,18 +248,15 @@ class TestAccountBankAccountStatementImportOnlinePayPal( provider = journal.online_bank_statement_provider_id mocked_response = UrlopenRetValMock("""{ - "error_description": "DESC", + "error_description": "ERROR DESCRIPTION", "error": "ERROR" }""", throw=True) with mock.patch( _provider_class + '._paypal_urlopen', return_value=mocked_response, - ), self.mock_token(): + ): with self.assertRaises(UserError): - provider._obtain_statement_data( - self.now - relativedelta(years=5), - self.now, - ) + provider._paypal_retrieve('https://url', '') def test_empty_pull(self): journal = self.AccountJournal.create({ From ff11f3a3b605ee88599b6df0bce090e809ea5899 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Sat, 25 Apr 2020 11:58:10 +0200 Subject: [PATCH 05/13] [IMP] account_bank_statement_import_online_paypal: maintainers --- account_bank_statement_import_online_paypal/README.rst | 8 ++++++++ .../__manifest__.py | 1 + .../static/description/index.html | 2 ++ 3 files changed, 11 insertions(+) diff --git a/account_bank_statement_import_online_paypal/README.rst b/account_bank_statement_import_online_paypal/README.rst index f3808f57..b15739a8 100644 --- a/account_bank_statement_import_online_paypal/README.rst +++ b/account_bank_statement_import_online_paypal/README.rst @@ -128,6 +128,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. +.. |maintainer-alexey-pelykh| image:: https://github.com/alexey-pelykh.png?size=40px + :target: https://github.com/alexey-pelykh + :alt: alexey-pelykh + +Current `maintainer `__: + +|maintainer-alexey-pelykh| + 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_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 777ccd7b..060aca0b 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -9,6 +9,7 @@ 'Brainbean Apps, ' 'Dataplug, ' 'Odoo Community Association (OCA)', + 'maintainers': ['alexey-pelykh'], 'website': 'https://github.com/OCA/bank-statement-import/', 'license': 'AGPL-3', 'category': 'Accounting', diff --git a/account_bank_statement_import_online_paypal/static/description/index.html b/account_bank_statement_import_online_paypal/static/description/index.html index 91282689..8683438b 100644 --- a/account_bank_statement_import_online_paypal/static/description/index.html +++ b/account_bank_statement_import_online_paypal/static/description/index.html @@ -474,6 +474,8 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    OCA, or the Odoo Community Association, is a nonprofit organization whose 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.

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

    From 5ca0b49483d1e359e997fd893e0bfd8a25a4c15e Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Sat, 20 Jun 2020 14:13:04 +0200 Subject: [PATCH 06/13] [IMP] account_bank_statement_import_online_paypal: query empty statements balance --- .../__manifest__.py | 2 +- ...nt_bank_statement_import_online_paypal.pot | 24 +++---- .../online_bank_statement_provider_paypal.py | 28 +++++++- ...unt_bank_statement_import_online_paypal.py | 64 +++++++++++++++++-- 4 files changed, 96 insertions(+), 22 deletions(-) diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 060aca0b..436a5466 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Online Bank Statements: PayPal.com', - 'version': '12.0.1.0.2', + 'version': '12.0.1.1.0', 'author': 'Brainbean Apps, ' 'Dataplug, ' diff --git a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot index d7cb41e7..6be0529d 100644 --- a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot +++ b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot @@ -234,20 +234,20 @@ msgid "Electronic funds transfer (EFT)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:363 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:371 #, python-format msgid "Failed to acquire token using Client ID and Secret!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:241 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:267 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:249 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:275 #, python-format msgid "Failed to resolve transaction %s (%s)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:337 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:345 #, python-format msgid "Fee for %s" msgstr "" @@ -500,13 +500,13 @@ msgid "International credit card withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:361 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:369 #, python-format msgid "Invalid token type!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:303 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:311 #, python-format msgid "Invoice %s" msgstr "" @@ -554,7 +554,7 @@ msgid "Mobile payment, made through a mobile phone" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:520 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:542 #, python-format msgid "No authentication specified!" msgstr "" @@ -589,7 +589,7 @@ msgid "Partner fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:357 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:365 #, python-format msgid "PayPal App features are configured incorrectly!" msgstr "" @@ -828,7 +828,7 @@ msgid "Third-party recoupment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:342 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:350 #, python-format msgid "Transaction fee for %s" msgstr "" @@ -852,14 +852,14 @@ msgid "Transfer to external GL entity" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:536 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:558 #, python-format msgid "Unknown authentication specified!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:484 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:490 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:506 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:512 #, python-format msgid "Unknown error" msgstr "" diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index 96bb1583..d4e10f9b 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -1,5 +1,5 @@ -# Copyright 2019 Brainbean Apps (https://brainbeanapps.com) -# Copyright 2019 Dataplug (https://dataplug.io) +# Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com) +# Copyright 2019-2020 Dataplug (https://dataplug.io) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from base64 import b64encode @@ -212,7 +212,15 @@ class OnlineBankStatementProviderPayPal(models.Model): date_until ) if not transactions: - return None + balance = self._paypal_get_balance( + token, + currency, + date_since + ) + return [], { + 'balance_start': balance, + 'balance_end_real': balance, + } # Normalize transactions, sort by date, and get lines transactions = list(sorted( @@ -365,6 +373,20 @@ class OnlineBankStatementProviderPayPal(models.Model): )) return data['access_token'] + @api.multi + def _paypal_get_balance(self, token, currency, as_of_timestamp): + self.ensure_one() + url = (self.api_base or PAYPAL_API_BASE) \ + + '/v1/reporting/balances?currency_code=%s&as_of_time=%s' % ( + currency, + as_of_timestamp.isoformat() + 'Z', + ) + data = self._paypal_retrieve(url, token) + available_balance = data['balances'][0].get('available_balance') + if not available_balance: + return Decimal() + return Decimal(available_balance['value']) + @api.multi def _paypal_get_transaction(self, token, transaction_id, timestamp): self.ensure_one() diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index 792eb25e..30f5092b 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -194,16 +194,39 @@ class TestAccountBankAccountStatementImportOnlinePayPal( }) provider = journal.online_bank_statement_provider_id - mocked_response = UrlopenRetValMock("""{ + mocked_response_1 = UrlopenRetValMock("""{ "debug_id": "eec890ebd5798", "details": "xxxxxx", "links": "xxxxxx", "message": "Data for the given start date is not available.", "name": "INVALID_REQUEST" }""", throw=True) + mocked_response_2 = UrlopenRetValMock("""{ + "balances": [ + { + "currency": "EUR", + "primary": true, + "total_balance": { + "currency_code": "EUR", + "value": "0.75" + }, + "available_balance": { + "currency_code": "EUR", + "value": "0.75" + }, + "withheld_balance": { + "currency_code": "EUR", + "value": "0.00" + } + } + ], + "account_id": "1234567890", + "as_of_time": "2019-08-01T00:00:00+0000", + "last_refresh_time": "2019-08-01T00:00:00+0000" +}""") with mock.patch( _provider_class + '._paypal_urlopen', - return_value=mocked_response, + side_effect=[mocked_response_1, mocked_response_2], ), self.mock_token(): data = provider.with_context( test_account_bank_statement_import_online_paypal_monday=True, @@ -212,7 +235,10 @@ class TestAccountBankAccountStatementImportOnlinePayPal( self.now, ) - self.assertIsNone(data) + self.assertEqual(data, ([], { + 'balance_start': 0.75, + 'balance_end_real': 0.75, + })) def test_error_handling_1(self): journal = self.AccountJournal.create({ @@ -269,7 +295,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal( }) provider = journal.online_bank_statement_provider_id - mocked_response = json.loads("""{ + mocked_response_1 = json.loads("""{ "transaction_details": [], "account_number": "1234567890", "start_date": "2019-08-01T00:00:00+0000", @@ -278,17 +304,43 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "page": 1, "total_items": 0, "total_pages": 0 +}""", parse_float=Decimal) + mocked_response_2 = json.loads("""{ + "balances": [ + { + "currency": "EUR", + "primary": true, + "total_balance": { + "currency_code": "EUR", + "value": "0.75" + }, + "available_balance": { + "currency_code": "EUR", + "value": "0.75" + }, + "withheld_balance": { + "currency_code": "EUR", + "value": "0.00" + } + } + ], + "account_id": "1234567890", + "as_of_time": "2019-08-01T00:00:00+0000", + "last_refresh_time": "2019-08-01T00:00:00+0000" }""", parse_float=Decimal) with mock.patch( _provider_class + '._paypal_retrieve', - return_value=mocked_response, + side_effect=[mocked_response_1, mocked_response_2], ), self.mock_token(): data = provider._obtain_statement_data( self.now - relativedelta(hours=1), self.now, ) - self.assertIsNone(data) + self.assertEqual(data, ([], { + 'balance_start': 0.75, + 'balance_end_real': 0.75, + })) def test_ancient_pull(self): journal = self.AccountJournal.create({ From b72e470717565371eb4d75a1d38f6e73dd43b2b0 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Sat, 26 Sep 2020 10:55:21 +0300 Subject: [PATCH 07/13] [REBRAND] account_bank_statement_import_online_paypal --- account_bank_statement_import_online_paypal/README.rst | 5 +++-- account_bank_statement_import_online_paypal/__manifest__.py | 5 ++--- .../models/online_bank_statement_provider_paypal.py | 2 +- .../readme/DESCRIPTION.rst | 2 ++ .../static/description/index.html | 4 ++-- .../test_account_bank_statement_import_online_paypal.py | 2 +- .../views/online_bank_statement_provider.xml | 2 +- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/account_bank_statement_import_online_paypal/README.rst b/account_bank_statement_import_online_paypal/README.rst index b15739a8..b2e26e41 100644 --- a/account_bank_statement_import_online_paypal/README.rst +++ b/account_bank_statement_import_online_paypal/README.rst @@ -28,6 +28,8 @@ Online Bank Statements: PayPal.com This module provides online bank statements from `PayPal.com `_. +For support please contact `CorporateHub `_. + **Table of contents** .. contents:: @@ -107,8 +109,7 @@ Credits Authors ~~~~~~~ -* Brainbean Apps -* Dataplug +* CorporateHub Contributors ~~~~~~~~~~~~ diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 436a5466..7cbda544 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -1,13 +1,12 @@ # Copyright 2019 Brainbean Apps (https://brainbeanapps.com) -# Copyright 2019 Dataplug (https://dataplug.io) +# Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { 'name': 'Online Bank Statements: PayPal.com', 'version': '12.0.1.1.0', 'author': - 'Brainbean Apps, ' - 'Dataplug, ' + 'CorporateHub, ' 'Odoo Community Association (OCA)', 'maintainers': ['alexey-pelykh'], 'website': 'https://github.com/OCA/bank-statement-import/', diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index d4e10f9b..d5af63e0 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -1,5 +1,5 @@ # Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com) -# Copyright 2019-2020 Dataplug (https://dataplug.io) +# Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from base64 import b64encode diff --git a/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst b/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst index a2a7a3e4..4dd8f985 100644 --- a/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst +++ b/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst @@ -1,2 +1,4 @@ This module provides online bank statements from `PayPal.com `_. + +For support please contact `CorporateHub `_. diff --git a/account_bank_statement_import_online_paypal/static/description/index.html b/account_bank_statement_import_online_paypal/static/description/index.html index 8683438b..b4899a72 100644 --- a/account_bank_statement_import_online_paypal/static/description/index.html +++ b/account_bank_statement_import_online_paypal/static/description/index.html @@ -370,6 +370,7 @@ ul.auto-toc {

    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.

    +

    For support please contact CorporateHub.

    Table of contents

      @@ -457,8 +458,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

      Authors

        -
      • Brainbean Apps
      • -
      • Dataplug
      • +
      • CorporateHub
      diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index 30f5092b..9253b043 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -1,5 +1,5 @@ # Copyright 2019 Brainbean Apps (https://brainbeanapps.com) -# Copyright 2019 Dataplug (https://dataplug.io) +# Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from datetime import datetime diff --git a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml index 0ec34e05..204b4a1c 100644 --- a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml +++ b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml @@ -1,7 +1,7 @@ From 1078564f354cce4d31255a605e66abda4da1dcf3 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Fri, 2 Oct 2020 09:43:28 +0300 Subject: [PATCH 08/13] [UPD] Brainbean Apps => CorporateHub --- .../README.rst | 8 +- ...nt_bank_statement_import_online_paypal.pot | 304 +++++++++--------- .../online_bank_statement_provider_paypal.py | 1 - .../readme/CONTRIBUTORS.rst | 4 +- .../readme/DESCRIPTION.rst | 4 +- .../static/description/index.html | 6 +- ...unt_bank_statement_import_online_paypal.py | 1 - .../views/online_bank_statement_provider.xml | 1 - 8 files changed, 164 insertions(+), 165 deletions(-) diff --git a/account_bank_statement_import_online_paypal/README.rst b/account_bank_statement_import_online_paypal/README.rst index b2e26e41..2a6c9adf 100644 --- a/account_bank_statement_import_online_paypal/README.rst +++ b/account_bank_statement_import_online_paypal/README.rst @@ -26,9 +26,7 @@ Online Bank Statements: PayPal.com |badge1| |badge2| |badge3| |badge4| |badge5| This module provides online bank statements from -`PayPal.com `_. - -For support please contact `CorporateHub `_. +`PayPal.com `__. **Table of contents** @@ -114,7 +112,9 @@ Authors Contributors ~~~~~~~~~~~~ -* Alexey Pelykh +* `CorporateHub `__ + + * Alexey Pelykh Maintainers ~~~~~~~~~~~ diff --git a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot index 6be0529d..2fbba2b7 100644 --- a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot +++ b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:63 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:62 #, python-format msgid "ACH funding for funds recovery from account balance" msgstr "" @@ -25,133 +25,133 @@ msgid "API base" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:52 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:51 #, python-format msgid "ATM withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:129 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:128 #, python-format msgid "Account hold for ACH deposit" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:128 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:127 #, python-format msgid "Account hold for open authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:161 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:160 #, python-format msgid "Account receivable for shipping" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:53 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:52 #, python-format msgid "Auto-sweep from account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:66 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:65 #, python-format msgid "AutoSweep" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:132 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:131 #, python-format msgid "BML credit, transfer from BML" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:138 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:137 #, python-format msgid "BML withdrawal, transfer to BML" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:79 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:78 #, python-format msgid "Balance manager account bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:94 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:93 #, python-format msgid "Bill pay transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:156 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:155 #, python-format msgid "Blocked payments" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:85 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:84 #, python-format msgid "Bonus for first ACH use" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:133 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:132 #, python-format msgid "Buyer credit payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:134 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:133 #, python-format msgid "Buyer credit payment withdrawal, transfer to BML" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:106 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:105 #, python-format msgid "Cancellation of hold for dispute resolution" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:118 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:117 #, python-format msgid "Charge-off adjustment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:116 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:115 #, python-format msgid "Chargeback" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:122 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:121 #, python-format msgid "Chargeback cancellation" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:50 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:49 #, python-format msgid "Chargeback processing fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:121 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:120 #, python-format msgid "Chargeback re-presentment rejection" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:117 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:116 #, python-format msgid "Chargeback reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:49 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:48 #, python-format msgid "Check withdrawal" msgstr "" @@ -162,411 +162,411 @@ msgid "Client ID" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:91 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:90 #, python-format msgid "Coupon redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:87 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:86 #, python-format msgid "Credit card cash back bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:75 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:74 #, python-format msgid "Credit card deposit for negative PayPal account balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:86 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:85 #, python-format msgid "Credit card security charge refund" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:60 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:59 #, python-format msgid "Currency conversion required to cover negative balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:77 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:76 #, python-format msgid "Debit card cash back bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:159 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:158 #, python-format msgid "Deferred disbursement, funds collected for disbursement" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:160 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:159 #, python-format msgid "Delayed disbursement, funds disbursed" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:29 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:28 #, python-format msgid "Direct payment API" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:166 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:165 #, python-format msgid "Display only transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:37 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:36 #, python-format msgid "Donation payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:64 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:63 #, python-format msgid "Electronic funds transfer (EFT)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:371 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:370 #, python-format msgid "Failed to acquire token using Client ID and Secret!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:249 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:275 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:248 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:274 #, python-format msgid "Failed to resolve transaction %s (%s)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:345 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:344 #, python-format msgid "Fee for %s" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:104 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:103 #, python-format msgid "Fee refund" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:103 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:102 #, python-format msgid "Fee reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:46 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:45 #, python-format msgid "Foreign bank withdrawal fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:155 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:154 #, python-format msgid "Funds available" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:154 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:153 #, python-format msgid "Funds not yet available" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:162 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:161 #, python-format msgid "Funds payable: PayPal-provided funds that must be paid back" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:163 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:162 #, python-format msgid "Funds receivable: PayPal-provided funds that are being paid back" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:67 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:66 #, python-format msgid "General PayPal debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:24 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:23 #, python-format msgid "General PayPal-to-PayPal payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:115 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:114 #, python-format msgid "General account adjustment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:139 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:138 #, python-format msgid "General adjustment without business-related event" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:123 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:122 #, python-format msgid "General authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:76 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:75 #, python-format msgid "General bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:137 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:136 #, python-format msgid "General buyer credit payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:74 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:73 #, python-format msgid "General credit card deposit" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:73 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:72 #, python-format msgid "General credit card withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:58 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:57 #, python-format msgid "General currency conversion" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:126 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:125 #, python-format msgid "General dividend" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:61 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:60 #, python-format msgid "General funding of PayPal account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:144 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:143 #, python-format msgid "General hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:145 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:144 #, python-format msgid "General hold release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:88 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:87 #, python-format msgid "General incentive or certificate redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:140 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:139 #, python-format msgid "General intra-account transfer" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:44 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:43 #, python-format msgid "General non-payment fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:95 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:94 #, python-format msgid "General reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:127 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:126 #, python-format msgid "General temporary hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:65 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:64 #, python-format msgid "General withdrawal from PayPal account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:135 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:134 #, python-format msgid "General withdrawal to non-bank institution" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:43 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:42 #, python-format msgid "Generic instrument-funded payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:114 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:113 #, python-format msgid "Generic instrument/Open Wallet reversals (buyer side)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:113 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:112 #, python-format msgid "Generic instrument/Open Wallet reversals (seller side)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:158 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:157 #, python-format msgid "Generic instrument/Open Wallet transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:56 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:55 #, python-format msgid "Gift certificate expiration fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:33 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:32 #, python-format msgid "Gift certificate payment, purchase of gift certificate" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:152 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:151 #, python-format msgid "Gift certificate purchase" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:89 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:153 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:88 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:152 #, python-format msgid "Gift certificate redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:70 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:69 #, python-format msgid "Hidden virtual PayPal debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:105 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:104 #, python-format msgid "Hold for dispute investigation" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:119 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:118 #, python-format msgid "Incentive adjustment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:111 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:110 #, python-format msgid "Instant payment review (IPR) reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:54 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:53 #, python-format msgid "International credit card withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:369 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:368 #, python-format msgid "Invalid token type!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:311 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:310 #, python-format msgid "Invoice %s" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:107 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:106 #, python-format msgid "MAM reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:48 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:47 #, python-format msgid "Mass payment batch fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:25 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:24 #, python-format msgid "MassPay payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:110 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:109 #, python-format msgid "MassPay refund transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:109 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:108 #, python-format msgid "MassPay reversal transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:78 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:77 #, python-format msgid "Merchant referral account bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:35 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:34 #, python-format msgid "Mobile payment, made through a mobile phone" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:542 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:541 #, python-format msgid "No authentication specified!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:108 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:107 #, python-format msgid "Non-reference credit payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:93 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:92 #, python-format msgid "Offers used as funding source" msgstr "" @@ -577,205 +577,205 @@ msgid "Online Bank Statement Provider" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:167 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:166 #, python-format msgid "Other" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:57 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:56 #, python-format msgid "Partner fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:365 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:364 #, python-format msgid "PayPal App features are configured incorrectly!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:30 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:29 #, python-format msgid "PayPal Checkout APIs" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:42 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:41 #, python-format msgid "PayPal Here payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:200 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:199 #, python-format msgid "PayPal allows retrieving transactions only up to 3 years in the past. Please import older transactions manually. See https://www.paypal.com/us/smarthelp/article/why-can't-i-access-transaction-history-greater-than-3-years-ts2241" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:62 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:61 #, python-format msgid "PayPal balance manager funding of PayPal account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:131 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:130 #, python-format msgid "PayPal buyer credit payment funding" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:80 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:79 #, python-format msgid "PayPal buyer warranty bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:72 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:71 #, python-format msgid "PayPal debit authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:71 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:70 #, python-format msgid "PayPal debit card cash advance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:69 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:68 #, python-format msgid "PayPal debit card withdrawal to ATM" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:81 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:80 #, python-format msgid "PayPal protection bonus, payout for PayPal buyer protection, payout for full protection with PayPal buyer credit." msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:51 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:50 #, python-format msgid "Payment fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:150 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:149 #, python-format msgid "Payment hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:151 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:150 #, python-format msgid "Payment hold release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:102 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:101 #, python-format msgid "Payment refund, initiated by merchant" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:101 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:100 #, python-format msgid "Payment reversal, initiated by PayPal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:148 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:147 #, python-format msgid "Payment review hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:149 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:148 #, python-format msgid "Payment review release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:90 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:89 #, python-format msgid "Points incentive redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:32 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:31 #, python-format msgid "Postage payment to carrier" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:27 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:26 #, python-format msgid "Pre-approved payment (BillUser API)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:124 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:123 #, python-format msgid "Reauthorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:112 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:111 #, python-format msgid "Rebate or cash back reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:38 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:37 #, python-format msgid "Rebate payments" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:120 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:119 #, python-format msgid "Reimbursement of chargeback" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:146 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:145 #, python-format msgid "Reserve hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:147 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:146 #, python-format msgid "Reserve release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:99 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:98 #, python-format msgid "Reversal of ACH deposit" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:96 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:95 #, python-format msgid "Reversal of ACH withdrawal transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:97 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:96 #, python-format msgid "Reversal of debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:100 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:99 #, python-format msgid "Reversal of general account hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:98 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:97 #, python-format msgid "Reversal of points usage" msgstr "" @@ -786,146 +786,146 @@ msgid "Secret" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:141 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:140 #, python-format msgid "Settlement consolidation" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:41 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:40 #, python-format msgid "Store-to-store transfers" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:26 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:25 #, python-format msgid "Subscription payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:130 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:129 #, python-format msgid "Temporary hold on available balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:34 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:33 #, python-format msgid "Third-party auction payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:39 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:38 #, python-format msgid "Third-party payout" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:40 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:39 #, python-format msgid "Third-party recoupment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:350 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:349 #, python-format msgid "Transaction fee for %s" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:142 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:141 #, python-format msgid "Transfer of funds from payable" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:157 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:156 #, python-format msgid "Transfer to and from a credit-card-funded restricted balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:143 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:142 #, python-format msgid "Transfer to external GL entity" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:558 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:557 #, python-format msgid "Unknown authentication specified!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:506 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:512 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:505 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:511 #, python-format msgid "Unknown error" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:59 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:58 #, python-format msgid "User-initiated currency conversion" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:68 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:67 #, python-format msgid "Virtual PayPal debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:36 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:35 #, python-format msgid "Virtual terminal payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:125 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:124 #, python-format msgid "Void of authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:55 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:54 #, python-format msgid "Warranty fee for warranty purchase" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:31 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:30 #, python-format msgid "Website payments standard payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:45 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:44 #, python-format msgid "Website payments. Pro account monthly fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:47 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:46 #, python-format msgid "WorldLink check withdrawal fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:136 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:135 #, python-format msgid "WorldLink withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:28 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:27 #, python-format msgid "eBay auction payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:92 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:91 #, python-format msgid "eBay loyalty incentive" msgstr "" diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index d5af63e0..0cbd4b0f 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -1,5 +1,4 @@ # Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com) -# Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from base64 import b64encode diff --git a/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst b/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst index 1c6a35a1..724bc1d0 100644 --- a/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst +++ b/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst @@ -1 +1,3 @@ -* Alexey Pelykh +* `CorporateHub `__ + + * Alexey Pelykh diff --git a/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst b/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst index 4dd8f985..be38c967 100644 --- a/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst +++ b/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst @@ -1,4 +1,2 @@ This module provides online bank statements from -`PayPal.com `_. - -For support please contact `CorporateHub `_. +`PayPal.com `__. diff --git a/account_bank_statement_import_online_paypal/static/description/index.html b/account_bank_statement_import_online_paypal/static/description/index.html index b4899a72..da0d7be3 100644 --- a/account_bank_statement_import_online_paypal/static/description/index.html +++ b/account_bank_statement_import_online_paypal/static/description/index.html @@ -370,7 +370,6 @@ ul.auto-toc {

      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.

      -

      For support please contact CorporateHub.

      Table of contents

        @@ -464,7 +463,10 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
        diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index 9253b043..93c8e1c1 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -1,5 +1,4 @@ # Copyright 2019 Brainbean Apps (https://brainbeanapps.com) -# Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from datetime import datetime diff --git a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml index 204b4a1c..62d0ba99 100644 --- a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml +++ b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml @@ -1,7 +1,6 @@ From 15c36bd914f99088414dd49cbfa59dc6335a0693 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Thu, 23 Sep 2021 09:10:02 +0200 Subject: [PATCH 09/13] [IMP] account_bank_statement_import_online_paypal: black, isort, prettier --- .../__manifest__.py | 28 +- .../online_bank_statement_provider_paypal.py | 721 +++++++++--------- ...unt_bank_statement_import_online_paypal.py | 527 +++++++------ .../views/online_bank_statement_provider.xml | 9 +- 4 files changed, 646 insertions(+), 639 deletions(-) diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 7cbda544..5e6d41fc 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -3,21 +3,15 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { - 'name': 'Online Bank Statements: PayPal.com', - 'version': '12.0.1.1.0', - 'author': - 'CorporateHub, ' - 'Odoo Community Association (OCA)', - 'maintainers': ['alexey-pelykh'], - 'website': 'https://github.com/OCA/bank-statement-import/', - 'license': 'AGPL-3', - 'category': 'Accounting', - 'summary': 'Online bank statements for PayPal.com', - 'depends': [ - 'account_bank_statement_import_online', - ], - 'data': [ - 'views/online_bank_statement_provider.xml', - ], - 'installable': True, + "name": "Online Bank Statements: PayPal.com", + "version": "12.0.1.1.0", + "author": "CorporateHub, " "Odoo Community Association (OCA)", + "maintainers": ["alexey-pelykh"], + "website": "https://github.com/OCA/bank-statement-import/", + "license": "AGPL-3", + "category": "Accounting", + "summary": "Online bank statements for PayPal.com", + "depends": ["account_bank_statement_import_online",], + "data": ["views/online_bank_statement_provider.xml",], + "installable": True, } diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index 0cbd4b0f..6d25016a 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -1,194 +1,189 @@ # Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from base64 import b64encode -from datetime import datetime -from dateutil.relativedelta import relativedelta -import dateutil.parser -from decimal import Decimal import itertools import json -import pytz +import urllib.request +from base64 import b64encode +from datetime import datetime +from decimal import Decimal from urllib.error import HTTPError from urllib.parse import urlencode -import urllib.request -from odoo import models, api, _ +import dateutil.parser +import pytz +from dateutil.relativedelta import relativedelta + +from odoo import _, api, models from odoo.exceptions import UserError - -PAYPAL_API_BASE = 'https://api.paypal.com' -TRANSACTIONS_SCOPE = 'https://uri.paypal.com/services/reporting/search/read' +PAYPAL_API_BASE = "https://api.paypal.com" +TRANSACTIONS_SCOPE = "https://uri.paypal.com/services/reporting/search/read" EVENT_DESCRIPTIONS = { - 'T0000': _('General PayPal-to-PayPal payment'), - 'T0001': _('MassPay payment'), - 'T0002': _('Subscription payment'), - 'T0003': _('Pre-approved payment (BillUser API)'), - 'T0004': _('eBay auction payment'), - 'T0005': _('Direct payment API'), - 'T0006': _('PayPal Checkout APIs'), - 'T0007': _('Website payments standard payment'), - 'T0008': _('Postage payment to carrier'), - 'T0009': _('Gift certificate payment, purchase of gift certificate'), - 'T0010': _('Third-party auction payment'), - 'T0011': _('Mobile payment, made through a mobile phone'), - 'T0012': _('Virtual terminal payment'), - 'T0013': _('Donation payment'), - 'T0014': _('Rebate payments'), - 'T0015': _('Third-party payout'), - 'T0016': _('Third-party recoupment'), - 'T0017': _('Store-to-store transfers'), - 'T0018': _('PayPal Here payment'), - 'T0019': _('Generic instrument-funded payment'), - 'T0100': _('General non-payment fee'), - 'T0101': _('Website payments. Pro account monthly fee'), - 'T0102': _('Foreign bank withdrawal fee'), - 'T0103': _('WorldLink check withdrawal fee'), - 'T0104': _('Mass payment batch fee'), - 'T0105': _('Check withdrawal'), - 'T0106': _('Chargeback processing fee'), - 'T0107': _('Payment fee'), - 'T0108': _('ATM withdrawal'), - 'T0109': _('Auto-sweep from account'), - 'T0110': _('International credit card withdrawal'), - 'T0111': _('Warranty fee for warranty purchase'), - 'T0112': _('Gift certificate expiration fee'), - 'T0113': _('Partner fee'), - 'T0200': _('General currency conversion'), - 'T0201': _('User-initiated currency conversion'), - 'T0202': _('Currency conversion required to cover negative balance'), - 'T0300': _('General funding of PayPal account'), - 'T0301': _('PayPal balance manager funding of PayPal account'), - 'T0302': _('ACH funding for funds recovery from account balance'), - 'T0303': _('Electronic funds transfer (EFT)'), - 'T0400': _('General withdrawal from PayPal account'), - 'T0401': _('AutoSweep'), - 'T0500': _('General PayPal debit card transaction'), - 'T0501': _('Virtual PayPal debit card transaction'), - 'T0502': _('PayPal debit card withdrawal to ATM'), - 'T0503': _('Hidden virtual PayPal debit card transaction'), - 'T0504': _('PayPal debit card cash advance'), - 'T0505': _('PayPal debit authorization'), - 'T0600': _('General credit card withdrawal'), - 'T0700': _('General credit card deposit'), - 'T0701': _('Credit card deposit for negative PayPal account balance'), - 'T0800': _('General bonus'), - 'T0801': _('Debit card cash back bonus'), - 'T0802': _('Merchant referral account bonus'), - 'T0803': _('Balance manager account bonus'), - 'T0804': _('PayPal buyer warranty bonus'), - 'T0805': _( - 'PayPal protection bonus, payout for PayPal buyer protection, payout ' - 'for full protection with PayPal buyer credit.' + "T0000": _("General PayPal-to-PayPal payment"), + "T0001": _("MassPay payment"), + "T0002": _("Subscription payment"), + "T0003": _("Pre-approved payment (BillUser API)"), + "T0004": _("eBay auction payment"), + "T0005": _("Direct payment API"), + "T0006": _("PayPal Checkout APIs"), + "T0007": _("Website payments standard payment"), + "T0008": _("Postage payment to carrier"), + "T0009": _("Gift certificate payment, purchase of gift certificate"), + "T0010": _("Third-party auction payment"), + "T0011": _("Mobile payment, made through a mobile phone"), + "T0012": _("Virtual terminal payment"), + "T0013": _("Donation payment"), + "T0014": _("Rebate payments"), + "T0015": _("Third-party payout"), + "T0016": _("Third-party recoupment"), + "T0017": _("Store-to-store transfers"), + "T0018": _("PayPal Here payment"), + "T0019": _("Generic instrument-funded payment"), + "T0100": _("General non-payment fee"), + "T0101": _("Website payments. Pro account monthly fee"), + "T0102": _("Foreign bank withdrawal fee"), + "T0103": _("WorldLink check withdrawal fee"), + "T0104": _("Mass payment batch fee"), + "T0105": _("Check withdrawal"), + "T0106": _("Chargeback processing fee"), + "T0107": _("Payment fee"), + "T0108": _("ATM withdrawal"), + "T0109": _("Auto-sweep from account"), + "T0110": _("International credit card withdrawal"), + "T0111": _("Warranty fee for warranty purchase"), + "T0112": _("Gift certificate expiration fee"), + "T0113": _("Partner fee"), + "T0200": _("General currency conversion"), + "T0201": _("User-initiated currency conversion"), + "T0202": _("Currency conversion required to cover negative balance"), + "T0300": _("General funding of PayPal account"), + "T0301": _("PayPal balance manager funding of PayPal account"), + "T0302": _("ACH funding for funds recovery from account balance"), + "T0303": _("Electronic funds transfer (EFT)"), + "T0400": _("General withdrawal from PayPal account"), + "T0401": _("AutoSweep"), + "T0500": _("General PayPal debit card transaction"), + "T0501": _("Virtual PayPal debit card transaction"), + "T0502": _("PayPal debit card withdrawal to ATM"), + "T0503": _("Hidden virtual PayPal debit card transaction"), + "T0504": _("PayPal debit card cash advance"), + "T0505": _("PayPal debit authorization"), + "T0600": _("General credit card withdrawal"), + "T0700": _("General credit card deposit"), + "T0701": _("Credit card deposit for negative PayPal account balance"), + "T0800": _("General bonus"), + "T0801": _("Debit card cash back bonus"), + "T0802": _("Merchant referral account bonus"), + "T0803": _("Balance manager account bonus"), + "T0804": _("PayPal buyer warranty bonus"), + "T0805": _( + "PayPal protection bonus, payout for PayPal buyer protection, payout " + "for full protection with PayPal buyer credit." ), - 'T0806': _('Bonus for first ACH use'), - 'T0807': _('Credit card security charge refund'), - 'T0808': _('Credit card cash back bonus'), - 'T0900': _('General incentive or certificate redemption'), - 'T0901': _('Gift certificate redemption'), - 'T0902': _('Points incentive redemption'), - 'T0903': _('Coupon redemption'), - 'T0904': _('eBay loyalty incentive'), - 'T0905': _('Offers used as funding source'), - 'T1000': _('Bill pay transaction'), - 'T1100': _('General reversal'), - 'T1101': _('Reversal of ACH withdrawal transaction'), - 'T1102': _('Reversal of debit card transaction'), - 'T1103': _('Reversal of points usage'), - 'T1104': _('Reversal of ACH deposit'), - 'T1105': _('Reversal of general account hold'), - 'T1106': _('Payment reversal, initiated by PayPal'), - 'T1107': _('Payment refund, initiated by merchant'), - 'T1108': _('Fee reversal'), - 'T1109': _('Fee refund'), - 'T1110': _('Hold for dispute investigation'), - 'T1111': _('Cancellation of hold for dispute resolution'), - 'T1112': _('MAM reversal'), - 'T1113': _('Non-reference credit payment'), - 'T1114': _('MassPay reversal transaction'), - 'T1115': _('MassPay refund transaction'), - 'T1116': _('Instant payment review (IPR) reversal'), - 'T1117': _('Rebate or cash back reversal'), - 'T1118': _('Generic instrument/Open Wallet reversals (seller side)'), - 'T1119': _('Generic instrument/Open Wallet reversals (buyer side)'), - 'T1200': _('General account adjustment'), - 'T1201': _('Chargeback'), - 'T1202': _('Chargeback reversal'), - 'T1203': _('Charge-off adjustment'), - 'T1204': _('Incentive adjustment'), - 'T1205': _('Reimbursement of chargeback'), - 'T1207': _('Chargeback re-presentment rejection'), - 'T1208': _('Chargeback cancellation'), - 'T1300': _('General authorization'), - 'T1301': _('Reauthorization'), - 'T1302': _('Void of authorization'), - 'T1400': _('General dividend'), - 'T1500': _('General temporary hold'), - 'T1501': _('Account hold for open authorization'), - 'T1502': _('Account hold for ACH deposit'), - 'T1503': _('Temporary hold on available balance'), - 'T1600': _('PayPal buyer credit payment funding'), - 'T1601': _('BML credit, transfer from BML'), - 'T1602': _('Buyer credit payment'), - 'T1603': _('Buyer credit payment withdrawal, transfer to BML'), - 'T1700': _('General withdrawal to non-bank institution'), - 'T1701': _('WorldLink withdrawal'), - 'T1800': _('General buyer credit payment'), - 'T1801': _('BML withdrawal, transfer to BML'), - 'T1900': _('General adjustment without business-related event'), - 'T2000': _('General intra-account transfer'), - 'T2001': _('Settlement consolidation'), - 'T2002': _('Transfer of funds from payable'), - 'T2003': _('Transfer to external GL entity'), - 'T2101': _('General hold'), - 'T2102': _('General hold release'), - 'T2103': _('Reserve hold'), - 'T2104': _('Reserve release'), - 'T2105': _('Payment review hold'), - 'T2106': _('Payment review release'), - 'T2107': _('Payment hold'), - 'T2108': _('Payment hold release'), - 'T2109': _('Gift certificate purchase'), - 'T2110': _('Gift certificate redemption'), - 'T2111': _('Funds not yet available'), - 'T2112': _('Funds available'), - 'T2113': _('Blocked payments'), - 'T2201': _('Transfer to and from a credit-card-funded restricted balance'), - 'T3000': _('Generic instrument/Open Wallet transaction'), - 'T5000': _('Deferred disbursement, funds collected for disbursement'), - 'T5001': _('Delayed disbursement, funds disbursed'), - 'T9700': _('Account receivable for shipping'), - 'T9701': _('Funds payable: PayPal-provided funds that must be paid back'), - 'T9702': _( - 'Funds receivable: PayPal-provided funds that are being paid back' - ), - 'T9800': _('Display only transaction'), - 'T9900': _('Other'), + "T0806": _("Bonus for first ACH use"), + "T0807": _("Credit card security charge refund"), + "T0808": _("Credit card cash back bonus"), + "T0900": _("General incentive or certificate redemption"), + "T0901": _("Gift certificate redemption"), + "T0902": _("Points incentive redemption"), + "T0903": _("Coupon redemption"), + "T0904": _("eBay loyalty incentive"), + "T0905": _("Offers used as funding source"), + "T1000": _("Bill pay transaction"), + "T1100": _("General reversal"), + "T1101": _("Reversal of ACH withdrawal transaction"), + "T1102": _("Reversal of debit card transaction"), + "T1103": _("Reversal of points usage"), + "T1104": _("Reversal of ACH deposit"), + "T1105": _("Reversal of general account hold"), + "T1106": _("Payment reversal, initiated by PayPal"), + "T1107": _("Payment refund, initiated by merchant"), + "T1108": _("Fee reversal"), + "T1109": _("Fee refund"), + "T1110": _("Hold for dispute investigation"), + "T1111": _("Cancellation of hold for dispute resolution"), + "T1112": _("MAM reversal"), + "T1113": _("Non-reference credit payment"), + "T1114": _("MassPay reversal transaction"), + "T1115": _("MassPay refund transaction"), + "T1116": _("Instant payment review (IPR) reversal"), + "T1117": _("Rebate or cash back reversal"), + "T1118": _("Generic instrument/Open Wallet reversals (seller side)"), + "T1119": _("Generic instrument/Open Wallet reversals (buyer side)"), + "T1200": _("General account adjustment"), + "T1201": _("Chargeback"), + "T1202": _("Chargeback reversal"), + "T1203": _("Charge-off adjustment"), + "T1204": _("Incentive adjustment"), + "T1205": _("Reimbursement of chargeback"), + "T1207": _("Chargeback re-presentment rejection"), + "T1208": _("Chargeback cancellation"), + "T1300": _("General authorization"), + "T1301": _("Reauthorization"), + "T1302": _("Void of authorization"), + "T1400": _("General dividend"), + "T1500": _("General temporary hold"), + "T1501": _("Account hold for open authorization"), + "T1502": _("Account hold for ACH deposit"), + "T1503": _("Temporary hold on available balance"), + "T1600": _("PayPal buyer credit payment funding"), + "T1601": _("BML credit, transfer from BML"), + "T1602": _("Buyer credit payment"), + "T1603": _("Buyer credit payment withdrawal, transfer to BML"), + "T1700": _("General withdrawal to non-bank institution"), + "T1701": _("WorldLink withdrawal"), + "T1800": _("General buyer credit payment"), + "T1801": _("BML withdrawal, transfer to BML"), + "T1900": _("General adjustment without business-related event"), + "T2000": _("General intra-account transfer"), + "T2001": _("Settlement consolidation"), + "T2002": _("Transfer of funds from payable"), + "T2003": _("Transfer to external GL entity"), + "T2101": _("General hold"), + "T2102": _("General hold release"), + "T2103": _("Reserve hold"), + "T2104": _("Reserve release"), + "T2105": _("Payment review hold"), + "T2106": _("Payment review release"), + "T2107": _("Payment hold"), + "T2108": _("Payment hold release"), + "T2109": _("Gift certificate purchase"), + "T2110": _("Gift certificate redemption"), + "T2111": _("Funds not yet available"), + "T2112": _("Funds available"), + "T2113": _("Blocked payments"), + "T2201": _("Transfer to and from a credit-card-funded restricted balance"), + "T3000": _("Generic instrument/Open Wallet transaction"), + "T5000": _("Deferred disbursement, funds collected for disbursement"), + "T5001": _("Delayed disbursement, funds disbursed"), + "T9700": _("Account receivable for shipping"), + "T9701": _("Funds payable: PayPal-provided funds that must be paid back"), + "T9702": _("Funds receivable: PayPal-provided funds that are being paid back"), + "T9800": _("Display only transaction"), + "T9900": _("Other"), } -NO_DATA_FOR_DATE_AVAIL_MSG = 'Data for the given start date is not available.' +NO_DATA_FOR_DATE_AVAIL_MSG = "Data for the given start date is not available." class OnlineBankStatementProviderPayPal(models.Model): - _inherit = 'online.bank.statement.provider' + _inherit = "online.bank.statement.provider" @api.model def _get_available_services(self): return super()._get_available_services() + [ - ('paypal', 'PayPal.com'), + ("paypal", "PayPal.com"), ] @api.multi def _obtain_statement_data(self, date_since, date_until): self.ensure_one() - if self.service != 'paypal': + if self.service != "paypal": return super()._obtain_statement_data( - date_since, - date_until, + date_since, date_until, ) # pragma: no cover - currency = ( - self.currency_id or self.company_id.currency_id - ).name + currency = (self.currency_id or self.company_id.currency_id).name if date_since.tzinfo: date_since = date_since.astimezone(pytz.utc).replace(tzinfo=None) @@ -196,215 +191,178 @@ class OnlineBankStatementProviderPayPal(models.Model): date_until = date_until.astimezone(pytz.utc).replace(tzinfo=None) if date_since < datetime.utcnow() - relativedelta(years=3): - raise UserError(_( - 'PayPal allows retrieving transactions only up to 3 years in ' - 'the past. Please import older transactions manually. See ' - 'https://www.paypal.com/us/smarthelp/article/why-can\'t-i' - '-access-transaction-history-greater-than-3-years-ts2241' - )) + raise UserError( + _( + "PayPal allows retrieving transactions only up to 3 years in " + "the past. Please import older transactions manually. See " + "https://www.paypal.com/us/smarthelp/article/why-can't-i" + "-access-transaction-history-greater-than-3-years-ts2241" + ) + ) token = self._paypal_get_token() transactions = self._paypal_get_transactions( - token, - currency, - date_since, - date_until + token, currency, date_since, date_until ) if not transactions: - balance = self._paypal_get_balance( - token, - currency, - date_since - ) - return [], { - 'balance_start': balance, - 'balance_end_real': balance, - } + balance = self._paypal_get_balance(token, currency, date_since) + return [], {"balance_start": balance, "balance_end_real": balance,} # Normalize transactions, sort by date, and get lines - transactions = list(sorted( - transactions, - key=lambda transaction: self._paypal_get_transaction_date( - transaction + transactions = list( + sorted( + transactions, + key=lambda transaction: self._paypal_get_transaction_date(transaction), ) - )) - lines = list(itertools.chain.from_iterable(map( - lambda x: self._paypal_transaction_to_lines(x), - transactions - ))) + ) + lines = list( + itertools.chain.from_iterable( + map(lambda x: self._paypal_transaction_to_lines(x), transactions) + ) + ) first_transaction = transactions[0] - first_transaction_id = \ - first_transaction['transaction_info']['transaction_id'] - first_transaction_date = self._paypal_get_transaction_date( - first_transaction - ) + first_transaction_id = first_transaction["transaction_info"]["transaction_id"] + first_transaction_date = self._paypal_get_transaction_date(first_transaction) first_transaction = self._paypal_get_transaction( - token, - first_transaction_id, - first_transaction_date + token, first_transaction_id, first_transaction_date ) if not first_transaction: - raise UserError(_('Failed to resolve transaction %s (%s)') % ( - first_transaction_id, - first_transaction_date - )) - balance_start = self._paypal_get_transaction_ending_balance( - first_transaction - ) - balance_start -= self._paypal_get_transaction_total_amount( - first_transaction - ) - balance_start -= self._paypal_get_transaction_fee_amount( - first_transaction - ) + raise UserError( + _("Failed to resolve transaction %s (%s)") + % (first_transaction_id, first_transaction_date) + ) + balance_start = self._paypal_get_transaction_ending_balance(first_transaction) + balance_start -= self._paypal_get_transaction_total_amount(first_transaction) + balance_start -= self._paypal_get_transaction_fee_amount(first_transaction) last_transaction = transactions[-1] - last_transaction_id = \ - last_transaction['transaction_info']['transaction_id'] - last_transaction_date = self._paypal_get_transaction_date( - last_transaction - ) + last_transaction_id = last_transaction["transaction_info"]["transaction_id"] + last_transaction_date = self._paypal_get_transaction_date(last_transaction) last_transaction = self._paypal_get_transaction( - token, - last_transaction_id, - last_transaction_date + token, last_transaction_id, last_transaction_date ) if not last_transaction: - raise UserError(_('Failed to resolve transaction %s (%s)') % ( - last_transaction_id, - last_transaction_date - )) - balance_end = self._paypal_get_transaction_ending_balance( - last_transaction - ) + raise UserError( + _("Failed to resolve transaction %s (%s)") + % (last_transaction_id, last_transaction_date) + ) + balance_end = self._paypal_get_transaction_ending_balance(last_transaction) - return lines, { - 'balance_start': balance_start, - 'balance_end_real': balance_end, - } + return lines, {"balance_start": balance_start, "balance_end_real": balance_end,} @api.model def _paypal_preparse_transaction(self, transaction): - date = dateutil.parser.parse( - self._paypal_get_transaction_date(transaction) - ).astimezone(pytz.utc).replace(tzinfo=None) - transaction['transaction_info']['transaction_updated_date'] = date + date = ( + dateutil.parser.parse(self._paypal_get_transaction_date(transaction)) + .astimezone(pytz.utc) + .replace(tzinfo=None) + ) + transaction["transaction_info"]["transaction_updated_date"] = date return transaction @api.model def _paypal_transaction_to_lines(self, data): - transaction = data['transaction_info'] - payer = data['payer_info'] - transaction_id = transaction['transaction_id'] - event_code = transaction['transaction_event_code'] + transaction = data["transaction_info"] + payer = data["payer_info"] + transaction_id = transaction["transaction_id"] + event_code = transaction["transaction_event_code"] date = self._paypal_get_transaction_date(data) total_amount = self._paypal_get_transaction_total_amount(data) fee_amount = self._paypal_get_transaction_fee_amount(data) - transaction_subject = transaction.get('transaction_subject') - transaction_note = transaction.get('transaction_note') - invoice = transaction.get('invoice_id') - payer_name = payer.get('payer_name', {}) - payer_email = payer_name.get('email_address') + transaction_subject = transaction.get("transaction_subject") + transaction_note = transaction.get("transaction_note") + invoice = transaction.get("invoice_id") + payer_name = payer.get("payer_name", {}) + payer_email = payer_name.get("email_address") if invoice: - invoice = _('Invoice %s') % invoice + invoice = _("Invoice %s") % invoice note = transaction_id if transaction_subject or transaction_note: - note = '%s: %s' % ( - note, - transaction_subject or transaction_note - ) + note = "{}: {}".format(note, transaction_subject or transaction_note) if payer_email: - note += ' (%s)' % payer_email - unique_import_id = '%s-%s' % ( - transaction_id, - int(date.timestamp()), + note += " (%s)" % payer_email + unique_import_id = "{}-{}".format(transaction_id, int(date.timestamp())) + name = ( + invoice + or transaction_subject + or transaction_note + or EVENT_DESCRIPTIONS.get(event_code) + or "" ) - name = invoice \ - or transaction_subject \ - or transaction_note \ - or EVENT_DESCRIPTIONS.get(event_code) \ - or '' line = { - 'name': name, - 'amount': str(total_amount), - 'date': date, - 'note': note, - 'unique_import_id': unique_import_id, + "name": name, + "amount": str(total_amount), + "date": date, + "note": note, + "unique_import_id": unique_import_id, } - payer_full_name = payer_name.get('full_name') or \ - payer_name.get('alternate_full_name') + payer_full_name = payer_name.get("full_name") or payer_name.get( + "alternate_full_name" + ) if payer_full_name: - line.update({ - 'partner_name': payer_full_name, - }) + line.update( + {"partner_name": payer_full_name,} + ) lines = [line] if fee_amount: - lines += [{ - 'name': _('Fee for %s') % (name or transaction_id), - 'amount': str(fee_amount), - 'date': date, - 'partner_name': 'PayPal', - 'unique_import_id': '%s-FEE' % unique_import_id, - 'note': _('Transaction fee for %s') % note, - }] + lines += [ + { + "name": _("Fee for %s") % (name or transaction_id), + "amount": str(fee_amount), + "date": date, + "partner_name": "PayPal", + "unique_import_id": "%s-FEE" % unique_import_id, + "note": _("Transaction fee for %s") % note, + } + ] return lines @api.multi def _paypal_get_token(self): self.ensure_one() data = self._paypal_retrieve( - (self.api_base or PAYPAL_API_BASE) + '/v1/oauth2/token', + (self.api_base or PAYPAL_API_BASE) + "/v1/oauth2/token", (self.username, self.password), - data=urlencode({ - 'grant_type': 'client_credentials', - }).encode('utf-8') + data=urlencode({"grant_type": "client_credentials",}).encode("utf-8"), ) - if 'scope' not in data or TRANSACTIONS_SCOPE not in data['scope']: - raise UserError(_( - 'PayPal App features are configured incorrectly!' - )) - if 'token_type' not in data or data['token_type'] != 'Bearer': - raise UserError(_('Invalid token type!')) - if 'access_token' not in data: - raise UserError(_( - 'Failed to acquire token using Client ID and Secret!' - )) - return data['access_token'] + if "scope" not in data or TRANSACTIONS_SCOPE not in data["scope"]: + raise UserError(_("PayPal App features are configured incorrectly!")) + if "token_type" not in data or data["token_type"] != "Bearer": + raise UserError(_("Invalid token type!")) + if "access_token" not in data: + raise UserError(_("Failed to acquire token using Client ID and Secret!")) + return data["access_token"] @api.multi def _paypal_get_balance(self, token, currency, as_of_timestamp): self.ensure_one() - url = (self.api_base or PAYPAL_API_BASE) \ - + '/v1/reporting/balances?currency_code=%s&as_of_time=%s' % ( - currency, - as_of_timestamp.isoformat() + 'Z', - ) + url = ( + self.api_base or PAYPAL_API_BASE + ) + "/v1/reporting/balances?currency_code={}&as_of_time={}".format( + currency, + as_of_timestamp.isoformat() + "Z", + ) data = self._paypal_retrieve(url, token) - available_balance = data['balances'][0].get('available_balance') + available_balance = data["balances"][0].get("available_balance") if not available_balance: return Decimal() - return Decimal(available_balance['value']) + return Decimal(available_balance["value"]) @api.multi def _paypal_get_transaction(self, token, transaction_id, timestamp): self.ensure_one() - transaction_date = timestamp.isoformat() + 'Z' - url = (self.api_base or PAYPAL_API_BASE) \ - + '/v1/reporting/transactions' \ - + ( - '?start_date=%s' - '&end_date=%s' - '&fields=all' - ) % ( - transaction_date, - transaction_date, + transaction_date = timestamp.isoformat() + "Z" + url = ( + (self.api_base or PAYPAL_API_BASE) + + "/v1/reporting/transactions" + + ("?start_date=%s" "&end_date=%s" "&fields=all") + % (transaction_date, transaction_date,) ) data = self._paypal_retrieve(url, token) - transactions = data['transaction_details'] + transactions = data["transaction_details"] for transaction in transactions: - if transaction['transaction_info']['transaction_id'] != \ - transaction_id: + if transaction["transaction_info"]["transaction_id"] != transaction_id: continue return transaction return None @@ -422,48 +380,49 @@ class OnlineBankStatementProviderPayPal(models.Model): page = 1 total_pages = None while total_pages is None or page <= total_pages: - url = (self.api_base or PAYPAL_API_BASE) \ - + '/v1/reporting/transactions' \ + url = ( + (self.api_base or PAYPAL_API_BASE) + + "/v1/reporting/transactions" + ( - '?transaction_currency=%s' - '&start_date=%s' - '&end_date=%s' - '&fields=all' - '&balance_affecting_records_only=Y' - '&page_size=500' - '&page=%d' - % ( - currency, - interval_start.isoformat() + 'Z', - interval_end.isoformat() + 'Z', - page, - )) + "?transaction_currency=%s" + "&start_date=%s" + "&end_date=%s" + "&fields=all" + "&balance_affecting_records_only=Y" + "&page_size=500" + "&page=%d" + % ( + currency, + interval_start.isoformat() + "Z", + interval_end.isoformat() + "Z", + page, + ) + ) + ) # NOTE: Workaround for INVALID_REQUEST (see ROADMAP.rst) invalid_data_workaround = self.env.context.get( - 'test_account_bank_statement_import_online_paypal_monday', - interval_start.weekday() == 0 and ( - datetime.utcnow() - interval_start - ).total_seconds() < 28800 + "test_account_bank_statement_import_online_paypal_monday", + interval_start.weekday() == 0 + and (datetime.utcnow() - interval_start).total_seconds() < 28800, ) data = self.with_context( invalid_data_workaround=invalid_data_workaround, )._paypal_retrieve(url, token) interval_transactions = map( - lambda transaction: self._paypal_preparse_transaction( - transaction - ), - data['transaction_details'] + lambda transaction: self._paypal_preparse_transaction(transaction), + data["transaction_details"], ) - transactions += list(filter( - lambda transaction: - interval_start <= self._paypal_get_transaction_date( - transaction - ) < interval_end, - interval_transactions - )) - total_pages = data['total_pages'] + transactions += list( + filter( + lambda transaction: interval_start + <= self._paypal_get_transaction_date(transaction) + < interval_end, + interval_transactions, + ) + ) + total_pages = data["total_pages"] page += 1 interval_start += interval_step return transactions @@ -471,45 +430,46 @@ class OnlineBankStatementProviderPayPal(models.Model): @api.model def _paypal_get_transaction_date(self, transaction): # NOTE: CSV reports from PayPal use this date, search as well - return transaction['transaction_info']['transaction_updated_date'] + return transaction["transaction_info"]["transaction_updated_date"] @api.model def _paypal_get_transaction_total_amount(self, transaction): - transaction_amount = \ - transaction['transaction_info'].get('transaction_amount') + transaction_amount = transaction["transaction_info"].get("transaction_amount") if not transaction_amount: return Decimal() - return Decimal(transaction_amount['value']) + return Decimal(transaction_amount["value"]) @api.model def _paypal_get_transaction_fee_amount(self, transaction): - fee_amount = transaction['transaction_info'].get('fee_amount') + fee_amount = transaction["transaction_info"].get("fee_amount") if not fee_amount: return Decimal() - return Decimal(fee_amount['value']) + return Decimal(fee_amount["value"]) @api.model def _paypal_get_transaction_ending_balance(self, transaction): # NOTE: 'available_balance' instead of 'ending_balance' as per CSV file - transaction_amount = \ - transaction['transaction_info'].get('available_balance') + transaction_amount = transaction["transaction_info"].get("available_balance") if not transaction_amount: return Decimal() - return Decimal(transaction_amount['value']) + return Decimal(transaction_amount["value"]) @api.model def _paypal_decode_error(self, content): - if 'name' in content: - return UserError('%s: %s' % ( - content['name'], - content.get('message', _('Unknown error')), - )) + if "name" in content: + return UserError( + "%s: %s" + % (content["name"], content.get("message", _("Unknown error")),) + ) - if 'error' in content: - return UserError('%s: %s' % ( - content['error'], - content.get('error_description', _('Unknown error')), - )) + if "error" in content: + return UserError( + "%s: %s" + % ( + content["error"], + content.get("error_description", _("Unknown error")), + ) + ) return None @@ -517,19 +477,21 @@ class OnlineBankStatementProviderPayPal(models.Model): def _paypal_retrieve(self, url, auth, data=None): try: with self._paypal_urlopen(url, auth, data) as response: - content = response.read().decode('utf-8') + content = response.read().decode("utf-8") except HTTPError as e: - content = json.loads(e.read().decode('utf-8')) + content = json.loads(e.read().decode("utf-8")) # NOTE: Workaround for INVALID_REQUEST (see ROADMAP.rst) - if self.env.context.get('invalid_data_workaround') \ - and content.get('name') == 'INVALID_REQUEST' \ - and content.get('message') == NO_DATA_FOR_DATE_AVAIL_MSG: + if ( + self.env.context.get("invalid_data_workaround") + and content.get("name") == "INVALID_REQUEST" + and content.get("message") == NO_DATA_FOR_DATE_AVAIL_MSG + ): return { - 'transaction_details': [], - 'page': 1, - 'total_items': 0, - 'total_pages': 0, + "transaction_details": [], + "page": 1, + "total_items": 0, + "total_pages": 0, } raise self._paypal_decode_error(content) or e @@ -538,21 +500,18 @@ class OnlineBankStatementProviderPayPal(models.Model): @api.model def _paypal_urlopen(self, url, auth, data=None): if not auth: - raise UserError(_('No authentication specified!')) + raise UserError(_("No authentication specified!")) request = urllib.request.Request(url, data=data) if isinstance(auth, tuple): request.add_header( - 'Authorization', - 'Basic %s' % str( - b64encode(('%s:%s' % (auth[0], auth[1])).encode('utf-8')), - 'utf-8' - ) + "Authorization", + "Basic %s" + % str( + b64encode(("{}:{}".format(auth[0], auth[1])).encode("utf-8")), "utf-8" + ), ) elif isinstance(auth, str): - request.add_header( - 'Authorization', - 'Bearer %s' % auth - ) + request.add_header("Authorization", "Bearer %s" % auth) else: - raise UserError(_('Unknown authentication specified!')) + raise UserError(_("Unknown authentication specified!")) return urllib.request.urlopen(request) diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index 93c8e1c1..8f5b692d 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -1,22 +1,23 @@ # Copyright 2019 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from datetime import datetime -from dateutil.relativedelta import relativedelta -from decimal import Decimal import json +from datetime import datetime +from decimal import Decimal from unittest import mock from urllib.error import HTTPError +from dateutil.relativedelta import relativedelta + from odoo import fields from odoo.exceptions import UserError from odoo.tests import common -_module_ns = 'odoo.addons.account_bank_statement_import_online_paypal' +_module_ns = "odoo.addons.account_bank_statement_import_online_paypal" _provider_class = ( _module_ns - + '.models.online_bank_statement_provider_paypal' - + '.OnlineBankStatementProviderPayPal' + + ".models.online_bank_statement_provider_paypal" + + ".OnlineBankStatementProviderPayPal" ) @@ -25,7 +26,7 @@ class FakeHTTPError(HTTPError): self.content = content def read(self): - return self.content.encode('utf-8') + return self.content.encode("utf-8") class UrlopenRetValMock: @@ -42,165 +43,178 @@ class UrlopenRetValMock: def read(self): if self.throw: raise FakeHTTPError(self.content) - return self.content.encode('utf-8') + return self.content.encode("utf-8") -class TestAccountBankAccountStatementImportOnlinePayPal( - common.TransactionCase -): - +class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): def setUp(self): super().setUp() self.now = fields.Datetime.now() - self.currency_eur = self.env.ref('base.EUR') - self.currency_usd = self.env.ref('base.USD') - self.AccountJournal = self.env['account.journal'] - self.OnlineBankStatementProvider = self.env[ - 'online.bank.statement.provider' - ] - self.AccountBankStatement = self.env['account.bank.statement'] - self.AccountBankStatementLine = self.env['account.bank.statement.line'] + self.currency_eur = self.env.ref("base.EUR") + self.currency_usd = self.env.ref("base.USD") + self.AccountJournal = self.env["account.journal"] + self.OnlineBankStatementProvider = self.env["online.bank.statement.provider"] + self.AccountBankStatement = self.env["account.bank.statement"] + self.AccountBankStatementLine = self.env["account.bank.statement.line"] Provider = self.OnlineBankStatementProvider self.paypal_parse_transaction = lambda payload: ( Provider._paypal_transaction_to_lines( Provider._paypal_preparse_transaction( - json.loads( - payload, - parse_float=Decimal, - ) + json.loads(payload, parse_float=Decimal,) ) ) ) self.mock_token = lambda: mock.patch( - _provider_class + '._paypal_get_token', - return_value='--TOKEN--', + _provider_class + "._paypal_get_token", return_value="--TOKEN--", ) def test_good_token(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = json.loads("""{ + mocked_response = json.loads( + """{ "scope": "https://uri.paypal.com/services/reporting/search/read", "access_token": "---TOKEN---", "token_type": "Bearer", "app_id": "APP-1234567890", "expires_in": 32400, "nonce": "---NONCE---" -}""", parse_float=Decimal) +}""", + parse_float=Decimal, + ) token = None with mock.patch( - _provider_class + '._paypal_retrieve', - return_value=mocked_response, + _provider_class + "._paypal_retrieve", return_value=mocked_response, ): token = provider._paypal_get_token() - self.assertEqual(token, '---TOKEN---') + self.assertEqual(token, "---TOKEN---") def test_bad_token_scope(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = json.loads("""{ + mocked_response = json.loads( + """{ "scope": "openid https://uri.paypal.com/services/applications/webhooks", "access_token": "---TOKEN---", "token_type": "Bearer", "app_id": "APP-1234567890", "expires_in": 32400, "nonce": "---NONCE---" -}""", parse_float=Decimal) +}""", + parse_float=Decimal, + ) with mock.patch( - _provider_class + '._paypal_retrieve', - return_value=mocked_response, + _provider_class + "._paypal_retrieve", return_value=mocked_response, ): with self.assertRaises(Exception): provider._paypal_get_token() def test_bad_token_type(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = json.loads("""{ + mocked_response = json.loads( + """{ "scope": "https://uri.paypal.com/services/reporting/search/read", "access_token": "---TOKEN---", "token_type": "NotBearer", "app_id": "APP-1234567890", "expires_in": 32400, "nonce": "---NONCE---" -}""", parse_float=Decimal) +}""", + parse_float=Decimal, + ) with mock.patch( - _provider_class + '._paypal_retrieve', - return_value=mocked_response, + _provider_class + "._paypal_retrieve", return_value=mocked_response, ): with self.assertRaises(Exception): provider._paypal_get_token() def test_no_token(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = json.loads("""{ + mocked_response = json.loads( + """{ "scope": "https://uri.paypal.com/services/reporting/search/read", "token_type": "Bearer", "app_id": "APP-1234567890", "expires_in": 32400, "nonce": "---NONCE---" - }""", parse_float=Decimal) + }""", + parse_float=Decimal, + ) with mock.patch( - _provider_class + '._paypal_retrieve', - return_value=mocked_response, + _provider_class + "._paypal_retrieve", return_value=mocked_response, ): with self.assertRaises(Exception): provider._paypal_get_token() def test_no_data_on_monday(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response_1 = UrlopenRetValMock("""{ + mocked_response_1 = UrlopenRetValMock( + """{ "debug_id": "eec890ebd5798", "details": "xxxxxx", "links": "xxxxxx", "message": "Data for the given start date is not available.", "name": "INVALID_REQUEST" -}""", throw=True) - mocked_response_2 = UrlopenRetValMock("""{ +}""", + throw=True, + ) + mocked_response_2 = UrlopenRetValMock( + """{ "balances": [ { "currency": "EUR", @@ -222,79 +236,85 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "account_id": "1234567890", "as_of_time": "2019-08-01T00:00:00+0000", "last_refresh_time": "2019-08-01T00:00:00+0000" -}""") +}""" + ) with mock.patch( - _provider_class + '._paypal_urlopen', + _provider_class + "._paypal_urlopen", side_effect=[mocked_response_1, mocked_response_2], ), self.mock_token(): data = provider.with_context( test_account_bank_statement_import_online_paypal_monday=True, - )._obtain_statement_data( - self.now - relativedelta(hours=1), - self.now, - ) + )._obtain_statement_data(self.now - relativedelta(hours=1), self.now,) - self.assertEqual(data, ([], { - 'balance_start': 0.75, - 'balance_end_real': 0.75, - })) + self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75,})) def test_error_handling_1(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = UrlopenRetValMock("""{ + mocked_response = UrlopenRetValMock( + """{ "message": "MESSAGE", "name": "ERROR" -}""", throw=True) +}""", + throw=True, + ) with mock.patch( - _provider_class + '._paypal_urlopen', - return_value=mocked_response, + _provider_class + "._paypal_urlopen", return_value=mocked_response, ): with self.assertRaises(UserError): - provider._paypal_retrieve('https://url', '') + provider._paypal_retrieve("https://url", "") def test_error_handling_2(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = UrlopenRetValMock("""{ + mocked_response = UrlopenRetValMock( + """{ "error_description": "ERROR DESCRIPTION", "error": "ERROR" -}""", throw=True) +}""", + throw=True, + ) with mock.patch( - _provider_class + '._paypal_urlopen', - return_value=mocked_response, + _provider_class + "._paypal_urlopen", return_value=mocked_response, ): with self.assertRaises(UserError): - provider._paypal_retrieve('https://url', '') + provider._paypal_retrieve("https://url", "") def test_empty_pull(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response_1 = json.loads("""{ + mocked_response_1 = json.loads( + """{ "transaction_details": [], "account_number": "1234567890", "start_date": "2019-08-01T00:00:00+0000", @@ -303,8 +323,11 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "page": 1, "total_items": 0, "total_pages": 0 -}""", parse_float=Decimal) - mocked_response_2 = json.loads("""{ +}""", + parse_float=Decimal, + ) + mocked_response_2 = json.loads( + """{ "balances": [ { "currency": "EUR", @@ -326,33 +349,34 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "account_id": "1234567890", "as_of_time": "2019-08-01T00:00:00+0000", "last_refresh_time": "2019-08-01T00:00:00+0000" -}""", parse_float=Decimal) +}""", + parse_float=Decimal, + ) with mock.patch( - _provider_class + '._paypal_retrieve', + _provider_class + "._paypal_retrieve", side_effect=[mocked_response_1, mocked_response_2], ), self.mock_token(): data = provider._obtain_statement_data( - self.now - relativedelta(hours=1), - self.now, + self.now - relativedelta(hours=1), self.now, ) - self.assertEqual(data, ([], { - 'balance_start': 0.75, - 'balance_end_real': 0.75, - })) + self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75,})) def test_ancient_pull(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = json.loads("""{ + mocked_response = json.loads( + """{ "transaction_details": [], "account_number": "1234567890", "start_date": "2019-08-01T00:00:00+0000", @@ -361,29 +385,32 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "page": 1, "total_items": 0, "total_pages": 0 -}""", parse_float=Decimal) +}""", + parse_float=Decimal, + ) with mock.patch( - _provider_class + '._paypal_retrieve', - return_value=mocked_response, + _provider_class + "._paypal_retrieve", return_value=mocked_response, ), self.mock_token(): with self.assertRaises(Exception): provider._obtain_statement_data( - self.now - relativedelta(years=5), - self.now, + self.now - relativedelta(years=5), self.now, ) def test_pull(self): - journal = self.AccountJournal.create({ - 'name': 'Bank', - 'type': 'bank', - 'code': 'BANK', - 'currency_id': self.currency_eur.id, - 'bank_statements_source': 'online', - 'online_bank_statement_provider': 'paypal', - }) + journal = self.AccountJournal.create( + { + "name": "Bank", + "type": "bank", + "code": "BANK", + "currency_id": self.currency_eur.id, + "bank_statements_source": "online", + "online_bank_statement_provider": "paypal", + } + ) provider = journal.online_bank_statement_provider_id - mocked_response = json.loads("""{ + mocked_response = json.loads( + """{ "transaction_details": [{ "transaction_info": { "paypal_account_id": "1234567890", @@ -476,40 +503,44 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "page": 1, "total_items": 1, "total_pages": 1 -}""", parse_float=Decimal) +}""", + parse_float=Decimal, + ) with mock.patch( - _provider_class + '._paypal_retrieve', - return_value=mocked_response, + _provider_class + "._paypal_retrieve", return_value=mocked_response, ), self.mock_token(): data = provider._obtain_statement_data( - datetime(2019, 8, 1), - datetime(2019, 8, 2), + datetime(2019, 8, 1), datetime(2019, 8, 2), ) self.assertEqual(len(data[0]), 2) - self.assertEqual(data[0][0], { - 'date': datetime(2019, 8, 1), - 'amount': '1000.00', - 'name': 'Invoice 1', - 'note': '1234567890: Payment for Invoice(s) 1', - 'partner_name': 'Acme, Inc.', - 'unique_import_id': '1234567890-1564617600', - }) - self.assertEqual(data[0][1], { - 'date': datetime(2019, 8, 1), - 'amount': '-100.00', - 'name': 'Fee for Invoice 1', - 'note': 'Transaction fee for 1234567890: Payment for Invoice(s) 1', - 'partner_name': 'PayPal', - 'unique_import_id': '1234567890-1564617600-FEE', - }) - self.assertEqual(data[1], { - 'balance_start': 0.0, - 'balance_end_real': 900.0, - }) + self.assertEqual( + data[0][0], + { + "date": datetime(2019, 8, 1), + "amount": "1000.00", + "name": "Invoice 1", + "note": "1234567890: Payment for Invoice(s) 1", + "partner_name": "Acme, Inc.", + "unique_import_id": "1234567890-1564617600", + }, + ) + self.assertEqual( + data[0][1], + { + "date": datetime(2019, 8, 1), + "amount": "-100.00", + "name": "Fee for Invoice 1", + "note": "Transaction fee for 1234567890: Payment for Invoice(s) 1", + "partner_name": "PayPal", + "unique_import_id": "1234567890-1564617600-FEE", + }, + ) + self.assertEqual(data[1], {"balance_start": 0.0, "balance_end_real": 900.0,}) def test_transaction_parse_1(self): - lines = self.paypal_parse_transaction("""{ + lines = self.paypal_parse_transaction( + """{ "transaction_info": { "paypal_account_id": "1234567890", "transaction_id": "1234567890", @@ -551,19 +582,24 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "store_info": {}, "auction_info": {}, "incentive_info": {} -}""") +}""" + ) self.assertEqual(len(lines), 1) - self.assertEqual(lines[0], { - 'date': datetime(2019, 8, 1), - 'amount': '1000.00', - 'name': 'Invoice 1', - 'note': '1234567890: Payment for Invoice(s) 1', - 'partner_name': 'Acme, Inc.', - 'unique_import_id': '1234567890-1564617600', - }) + self.assertEqual( + lines[0], + { + "date": datetime(2019, 8, 1), + "amount": "1000.00", + "name": "Invoice 1", + "note": "1234567890: Payment for Invoice(s) 1", + "partner_name": "Acme, Inc.", + "unique_import_id": "1234567890-1564617600", + }, + ) def test_transaction_parse_2(self): - lines = self.paypal_parse_transaction("""{ + lines = self.paypal_parse_transaction( + """{ "transaction_info": { "paypal_account_id": "1234567890", "transaction_id": "1234567890", @@ -605,19 +641,24 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "store_info": {}, "auction_info": {}, "incentive_info": {} -}""") +}""" + ) self.assertEqual(len(lines), 1) - self.assertEqual(lines[0], { - 'date': datetime(2019, 8, 1), - 'amount': '1000.00', - 'name': 'Invoice 1', - 'note': '1234567890: Payment for Invoice(s) 1', - 'partner_name': 'Acme, Inc.', - 'unique_import_id': '1234567890-1564617600', - }) + self.assertEqual( + lines[0], + { + "date": datetime(2019, 8, 1), + "amount": "1000.00", + "name": "Invoice 1", + "note": "1234567890: Payment for Invoice(s) 1", + "partner_name": "Acme, Inc.", + "unique_import_id": "1234567890-1564617600", + }, + ) def test_transaction_parse_3(self): - lines = self.paypal_parse_transaction("""{ + lines = self.paypal_parse_transaction( + """{ "transaction_info": { "paypal_account_id": "1234567890", "transaction_id": "1234567890", @@ -659,27 +700,35 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "store_info": {}, "auction_info": {}, "incentive_info": {} -}""") +}""" + ) self.assertEqual(len(lines), 2) - self.assertEqual(lines[0], { - 'date': datetime(2019, 8, 1), - 'amount': '1000.00', - 'name': 'Invoice 1', - 'note': '1234567890: Payment for Invoice(s) 1', - 'partner_name': 'Acme, Inc.', - 'unique_import_id': '1234567890-1564617600', - }) - self.assertEqual(lines[1], { - 'date': datetime(2019, 8, 1), - 'amount': '-100.00', - 'name': 'Fee for Invoice 1', - 'note': 'Transaction fee for 1234567890: Payment for Invoice(s) 1', - 'partner_name': 'PayPal', - 'unique_import_id': '1234567890-1564617600-FEE', - }) + self.assertEqual( + lines[0], + { + "date": datetime(2019, 8, 1), + "amount": "1000.00", + "name": "Invoice 1", + "note": "1234567890: Payment for Invoice(s) 1", + "partner_name": "Acme, Inc.", + "unique_import_id": "1234567890-1564617600", + }, + ) + self.assertEqual( + lines[1], + { + "date": datetime(2019, 8, 1), + "amount": "-100.00", + "name": "Fee for Invoice 1", + "note": "Transaction fee for 1234567890: Payment for Invoice(s) 1", + "partner_name": "PayPal", + "unique_import_id": "1234567890-1564617600-FEE", + }, + ) def test_transaction_parse_4(self): - lines = self.paypal_parse_transaction("""{ + lines = self.paypal_parse_transaction( + """{ "transaction_info": { "paypal_account_id": "1234567890", "transaction_id": "1234567890", @@ -717,13 +766,17 @@ class TestAccountBankAccountStatementImportOnlinePayPal( "store_info": {}, "auction_info": {}, "incentive_info": {} -}""") +}""" + ) self.assertEqual(len(lines), 1) - self.assertEqual(lines[0], { - 'date': datetime(2019, 8, 1), - 'amount': '1000.00', - 'name': 'Invoice 1', - 'note': '1234567890: Payment for Invoice(s) 1', - 'partner_name': 'Acme, Inc.', - 'unique_import_id': '1234567890-1564617600', - }) + self.assertEqual( + lines[0], + { + "date": datetime(2019, 8, 1), + "amount": "1000.00", + "name": "Invoice 1", + "note": "1234567890: Payment for Invoice(s) 1", + "partner_name": "Acme, Inc.", + "unique_import_id": "1234567890-1564617600", + }, + ) diff --git a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml index 62d0ba99..7d416cc0 100644 --- a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml +++ b/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml @@ -1,14 +1,16 @@ - + - online.bank.statement.provider.form online.bank.statement.provider - + @@ -35,5 +37,4 @@ - From e1c4d85077904b13cc4d5be1dd6ed9b5938fb90e Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Thu, 23 Sep 2021 09:18:01 +0200 Subject: [PATCH 10/13] [MIG] account_bank_statement_import_online_paypal: Migration to 13.0 --- .../README.rst | 10 +- .../__manifest__.py | 10 +- ...nt_bank_statement_import_online_paypal.pot | 321 +++++++++--------- .../online_bank_statement_provider_paypal.py | 22 +- .../static/description/index.html | 6 +- ...unt_bank_statement_import_online_paypal.py | 11 +- 6 files changed, 191 insertions(+), 189 deletions(-) diff --git a/account_bank_statement_import_online_paypal/README.rst b/account_bank_statement_import_online_paypal/README.rst index 2a6c9adf..669ed545 100644 --- a/account_bank_statement_import_online_paypal/README.rst +++ b/account_bank_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/12.0/account_bank_statement_import_online_paypal + :target: https://github.com/OCA/bank-statement-import/tree/13.0/account_bank_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-12-0/bank-statement-import-12-0-account_bank_statement_import_online_paypal + :target: https://translation.odoo-community.org/projects/bank-statement-import-13-0/bank-statement-import-13-0-account_bank_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/12.0 + :target: https://runbot.odoo-community.org/runbot/174/13.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. @@ -137,6 +137,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_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 5e6d41fc..1ddf646f 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -1,17 +1,17 @@ # Copyright 2019 Brainbean Apps (https://brainbeanapps.com) -# Copyright 2020 CorporateHub (https://corporatehub.eu) +# Copyright 2020-2021 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Online Bank Statements: PayPal.com", - "version": "12.0.1.1.0", - "author": "CorporateHub, " "Odoo Community Association (OCA)", + "version": "13.0.1.0.0", + "author": "CorporateHub, Odoo Community Association (OCA)", "maintainers": ["alexey-pelykh"], "website": "https://github.com/OCA/bank-statement-import/", "license": "AGPL-3", "category": "Accounting", "summary": "Online bank statements for PayPal.com", - "depends": ["account_bank_statement_import_online",], - "data": ["views/online_bank_statement_provider.xml",], + "depends": ["account_bank_statement_import_online"], + "data": ["views/online_bank_statement_provider.xml"], "installable": True, } diff --git a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot index 2fbba2b7..1cb15a7b 100644 --- a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot +++ b/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_bank_statement_import_online_paypal +# * account_bank_statement_import_online_paypal # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:62 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "ACH funding for funds recovery from account balance" msgstr "" @@ -25,133 +25,133 @@ msgid "API base" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:51 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "ATM withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:128 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Account hold for ACH deposit" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:127 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Account hold for open authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:160 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Account receivable for shipping" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:52 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Auto-sweep from account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:65 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "AutoSweep" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:131 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "BML credit, transfer from BML" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:137 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "BML withdrawal, transfer to BML" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:78 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Balance manager account bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:93 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Bill pay transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:155 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Blocked payments" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:84 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Bonus for first ACH use" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:132 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Buyer credit payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:133 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Buyer credit payment withdrawal, transfer to BML" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:105 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Cancellation of hold for dispute resolution" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:117 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Charge-off adjustment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:115 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Chargeback" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:121 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Chargeback cancellation" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:49 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Chargeback processing fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:120 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Chargeback re-presentment rejection" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:116 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Chargeback reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:48 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Check withdrawal" msgstr "" @@ -162,411 +162,411 @@ msgid "Client ID" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:90 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Coupon redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:86 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Credit card cash back bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:74 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Credit card deposit for negative PayPal account balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:85 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Credit card security charge refund" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:59 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Currency conversion required to cover negative balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:76 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Debit card cash back bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:158 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Deferred disbursement, funds collected for disbursement" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:159 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Delayed disbursement, funds disbursed" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:28 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Direct payment API" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:165 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Display only transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:36 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Donation payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:63 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Electronic funds transfer (EFT)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:370 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Failed to acquire token using Client ID and Secret!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:248 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:274 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Failed to resolve transaction %s (%s)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:344 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Fee for %s" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:103 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Fee refund" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:102 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Fee reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:45 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Foreign bank withdrawal fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:154 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Funds available" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:153 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Funds not yet available" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:161 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Funds payable: PayPal-provided funds that must be paid back" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:162 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Funds receivable: PayPal-provided funds that are being paid back" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:66 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General PayPal debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:23 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General PayPal-to-PayPal payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:114 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General account adjustment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:138 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General adjustment without business-related event" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:122 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:75 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:136 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General buyer credit payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:73 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General credit card deposit" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:72 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General credit card withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:57 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General currency conversion" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:125 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General dividend" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:60 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General funding of PayPal account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:143 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:144 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General hold release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:87 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General incentive or certificate redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:139 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General intra-account transfer" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:43 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General non-payment fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:94 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:126 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General temporary hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:64 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General withdrawal from PayPal account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:134 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "General withdrawal to non-bank institution" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:42 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Generic instrument-funded payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:113 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Generic instrument/Open Wallet reversals (buyer side)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:112 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Generic instrument/Open Wallet reversals (seller side)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:157 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Generic instrument/Open Wallet transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:55 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Gift certificate expiration fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:32 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Gift certificate payment, purchase of gift certificate" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:151 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Gift certificate purchase" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:88 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:152 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Gift certificate redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:69 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Hidden virtual PayPal debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:104 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Hold for dispute investigation" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:118 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Incentive adjustment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:110 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Instant payment review (IPR) reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:53 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "International credit card withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:368 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Invalid token type!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:310 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Invoice %s" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:106 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "MAM reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:47 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Mass payment batch fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:24 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "MassPay payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:109 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "MassPay refund transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:108 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "MassPay reversal transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:77 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Merchant referral account bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:34 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Mobile payment, made through a mobile phone" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:541 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "No authentication specified!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:107 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Non-reference credit payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:92 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Offers used as funding source" msgstr "" @@ -577,205 +577,211 @@ msgid "Online Bank Statement Provider" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:166 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Other" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:56 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Partner fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:364 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal App features are configured incorrectly!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:29 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal Checkout APIs" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:41 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal Here payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:199 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format -msgid "PayPal allows retrieving transactions only up to 3 years in the past. Please import older transactions manually. See https://www.paypal.com/us/smarthelp/article/why-can't-i-access-transaction-history-greater-than-3-years-ts2241" +msgid "" +"PayPal allows retrieving transactions only up to 3 years in the past. Please" +" import older transactions manually. See " +"https://www.paypal.com/us/smarthelp/article/why-can't-i-access-transaction-" +"history-greater-than-3-years-ts2241" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:61 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal balance manager funding of PayPal account" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:130 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal buyer credit payment funding" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:79 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal buyer warranty bonus" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:71 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal debit authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:70 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal debit card cash advance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:68 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "PayPal debit card withdrawal to ATM" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:80 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format -msgid "PayPal protection bonus, payout for PayPal buyer protection, payout for full protection with PayPal buyer credit." +msgid "" +"PayPal protection bonus, payout for PayPal buyer protection, payout for full" +" protection with PayPal buyer credit." msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:50 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Payment fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:149 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Payment hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:150 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Payment hold release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:101 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Payment refund, initiated by merchant" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:100 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Payment reversal, initiated by PayPal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:147 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Payment review hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:148 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Payment review release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:89 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Points incentive redemption" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:31 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Postage payment to carrier" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:26 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Pre-approved payment (BillUser API)" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:123 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reauthorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:111 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Rebate or cash back reversal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:37 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Rebate payments" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:119 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reimbursement of chargeback" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:145 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reserve hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:146 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reserve release" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:98 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reversal of ACH deposit" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:95 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reversal of ACH withdrawal transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:96 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reversal of debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:99 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reversal of general account hold" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:97 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Reversal of points usage" msgstr "" @@ -786,147 +792,146 @@ msgid "Secret" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:140 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Settlement consolidation" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:40 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Store-to-store transfers" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:25 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Subscription payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:129 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Temporary hold on available balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:33 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Third-party auction payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:38 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Third-party payout" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:39 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Third-party recoupment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:349 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Transaction fee for %s" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:141 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Transfer of funds from payable" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:156 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Transfer to and from a credit-card-funded restricted balance" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:142 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Transfer to external GL entity" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:557 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Unknown authentication specified!" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:505 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:511 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Unknown error" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:58 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "User-initiated currency conversion" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:67 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Virtual PayPal debit card transaction" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:35 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Virtual terminal payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:124 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Void of authorization" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:54 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Warranty fee for warranty purchase" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:30 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Website payments standard payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:44 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "Website payments. Pro account monthly fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:46 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "WorldLink check withdrawal fee" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:135 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "WorldLink withdrawal" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:27 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "eBay auction payment" msgstr "" #. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:91 +#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 #, python-format msgid "eBay loyalty incentive" msgstr "" - diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index 6d25016a..892c8e1c 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -1,4 +1,5 @@ # Copyright 2019-2020 Brainbean Apps (https://brainbeanapps.com) +# Copyright 2021 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import itertools @@ -175,7 +176,6 @@ class OnlineBankStatementProviderPayPal(models.Model): ("paypal", "PayPal.com"), ] - @api.multi def _obtain_statement_data(self, date_since, date_until): self.ensure_one() if self.service != "paypal": @@ -206,7 +206,7 @@ class OnlineBankStatementProviderPayPal(models.Model): ) if not transactions: balance = self._paypal_get_balance(token, currency, date_since) - return [], {"balance_start": balance, "balance_end_real": balance,} + return [], {"balance_start": balance, "balance_end_real": balance} # Normalize transactions, sort by date, and get lines transactions = list( @@ -249,7 +249,7 @@ class OnlineBankStatementProviderPayPal(models.Model): ) balance_end = self._paypal_get_transaction_ending_balance(last_transaction) - return lines, {"balance_start": balance_start, "balance_end_real": balance_end,} + return lines, {"balance_start": balance_start, "balance_end_real": balance_end} @api.model def _paypal_preparse_transaction(self, transaction): @@ -301,9 +301,7 @@ class OnlineBankStatementProviderPayPal(models.Model): "alternate_full_name" ) if payer_full_name: - line.update( - {"partner_name": payer_full_name,} - ) + line.update({"partner_name": payer_full_name}) lines = [line] if fee_amount: lines += [ @@ -318,13 +316,12 @@ class OnlineBankStatementProviderPayPal(models.Model): ] return lines - @api.multi def _paypal_get_token(self): self.ensure_one() data = self._paypal_retrieve( (self.api_base or PAYPAL_API_BASE) + "/v1/oauth2/token", (self.username, self.password), - data=urlencode({"grant_type": "client_credentials",}).encode("utf-8"), + data=urlencode({"grant_type": "client_credentials"}).encode("utf-8"), ) if "scope" not in data or TRANSACTIONS_SCOPE not in data["scope"]: raise UserError(_("PayPal App features are configured incorrectly!")) @@ -334,14 +331,12 @@ class OnlineBankStatementProviderPayPal(models.Model): raise UserError(_("Failed to acquire token using Client ID and Secret!")) return data["access_token"] - @api.multi def _paypal_get_balance(self, token, currency, as_of_timestamp): self.ensure_one() url = ( self.api_base or PAYPAL_API_BASE ) + "/v1/reporting/balances?currency_code={}&as_of_time={}".format( - currency, - as_of_timestamp.isoformat() + "Z", + currency, as_of_timestamp.isoformat() + "Z", ) data = self._paypal_retrieve(url, token) available_balance = data["balances"][0].get("available_balance") @@ -349,7 +344,6 @@ class OnlineBankStatementProviderPayPal(models.Model): return Decimal() return Decimal(available_balance["value"]) - @api.multi def _paypal_get_transaction(self, token, transaction_id, timestamp): self.ensure_one() transaction_date = timestamp.isoformat() + "Z" @@ -367,7 +361,6 @@ class OnlineBankStatementProviderPayPal(models.Model): return transaction return None - @api.multi def _paypal_get_transactions(self, token, currency, since, until): self.ensure_one() # NOTE: Not more than 31 days in a row @@ -507,7 +500,8 @@ class OnlineBankStatementProviderPayPal(models.Model): "Authorization", "Basic %s" % str( - b64encode(("{}:{}".format(auth[0], auth[1])).encode("utf-8")), "utf-8" + b64encode(("{}:{}".format(auth[0], auth[1])).encode("utf-8")), + "utf-8", ), ) elif isinstance(auth, str): diff --git a/account_bank_statement_import_online_paypal/static/description/index.html b/account_bank_statement_import_online_paypal/static/description/index.html index da0d7be3..5a152d47 100644 --- a/account_bank_statement_import_online_paypal/static/description/index.html +++ b/account_bank_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.

        @@ -478,7 +478,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_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index 8f5b692d..87c92e2c 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -1,4 +1,5 @@ # Copyright 2019 Brainbean Apps (https://brainbeanapps.com) +# Copyright 2021 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). import json @@ -25,6 +26,7 @@ class FakeHTTPError(HTTPError): def __init__(self, content): self.content = content + # pylint: disable=method-required-super def read(self): return self.content.encode("utf-8") @@ -37,9 +39,10 @@ class UrlopenRetValMock: def __enter__(self): return self - def __exit__(self, type, value, tb): + def __exit__(self, exc_type, exc_value, traceback): pass + # pylint: disable=method-required-super def read(self): if self.throw: raise FakeHTTPError(self.content) @@ -246,7 +249,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): test_account_bank_statement_import_online_paypal_monday=True, )._obtain_statement_data(self.now - relativedelta(hours=1), self.now,) - self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75,})) + self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75})) def test_error_handling_1(self): journal = self.AccountJournal.create( @@ -360,7 +363,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): self.now - relativedelta(hours=1), self.now, ) - self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75,})) + self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75})) def test_ancient_pull(self): journal = self.AccountJournal.create( @@ -536,7 +539,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): "unique_import_id": "1234567890-1564617600-FEE", }, ) - self.assertEqual(data[1], {"balance_start": 0.0, "balance_end_real": 900.0,}) + self.assertEqual(data[1], {"balance_start": 0.0, "balance_end_real": 900.0}) def test_transaction_parse_1(self): lines = self.paypal_parse_transaction( From 4df3fcb1d67edccfb5fdffcc01868eaa718c72a3 Mon Sep 17 00:00:00 2001 From: "Omar (Comunitea)" Date: Fri, 25 Feb 2022 11:56:14 +0100 Subject: [PATCH 11/13] [IMP] account_bank_statement_import_online_paypal: black, isort, prettier --- .../__manifest__.py | 2 +- .../online_bank_statement_provider_paypal.py | 16 +++++-- ...unt_bank_statement_import_online_paypal.py | 46 +++++++++++++------ ...ccount_bank_statement_import_online_paypal | 1 + .../setup.py | 6 +++ 5 files changed, 52 insertions(+), 19 deletions(-) create mode 120000 setup/account_bank_statement_import_online_paypal/odoo/addons/account_bank_statement_import_online_paypal create mode 100644 setup/account_bank_statement_import_online_paypal/setup.py diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_bank_statement_import_online_paypal/__manifest__.py index 1ddf646f..82bab800 100644 --- a/account_bank_statement_import_online_paypal/__manifest__.py +++ b/account_bank_statement_import_online_paypal/__manifest__.py @@ -7,7 +7,7 @@ "version": "13.0.1.0.0", "author": "CorporateHub, Odoo Community Association (OCA)", "maintainers": ["alexey-pelykh"], - "website": "https://github.com/OCA/bank-statement-import/", + "website": "https://github.com/OCA/bank-statement-import", "license": "AGPL-3", "category": "Accounting", "summary": "Online bank statements for PayPal.com", diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py index 892c8e1c..0d6d9816 100644 --- a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py +++ b/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py @@ -180,7 +180,8 @@ class OnlineBankStatementProviderPayPal(models.Model): self.ensure_one() if self.service != "paypal": return super()._obtain_statement_data( - date_since, date_until, + date_since, + date_until, ) # pragma: no cover currency = (self.currency_id or self.company_id.currency_id).name @@ -336,7 +337,8 @@ class OnlineBankStatementProviderPayPal(models.Model): url = ( self.api_base or PAYPAL_API_BASE ) + "/v1/reporting/balances?currency_code={}&as_of_time={}".format( - currency, as_of_timestamp.isoformat() + "Z", + currency, + as_of_timestamp.isoformat() + "Z", ) data = self._paypal_retrieve(url, token) available_balance = data["balances"][0].get("available_balance") @@ -351,7 +353,10 @@ class OnlineBankStatementProviderPayPal(models.Model): (self.api_base or PAYPAL_API_BASE) + "/v1/reporting/transactions" + ("?start_date=%s" "&end_date=%s" "&fields=all") - % (transaction_date, transaction_date,) + % ( + transaction_date, + transaction_date, + ) ) data = self._paypal_retrieve(url, token) transactions = data["transaction_details"] @@ -452,7 +457,10 @@ class OnlineBankStatementProviderPayPal(models.Model): if "name" in content: return UserError( "%s: %s" - % (content["name"], content.get("message", _("Unknown error")),) + % ( + content["name"], + content.get("message", _("Unknown error")), + ) ) if "error" in content: diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py index 87c92e2c..b2842d06 100644 --- a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py @@ -65,12 +65,16 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): self.paypal_parse_transaction = lambda payload: ( Provider._paypal_transaction_to_lines( Provider._paypal_preparse_transaction( - json.loads(payload, parse_float=Decimal,) + json.loads( + payload, + parse_float=Decimal, + ) ) ) ) self.mock_token = lambda: mock.patch( - _provider_class + "._paypal_get_token", return_value="--TOKEN--", + _provider_class + "._paypal_get_token", + return_value="--TOKEN--", ) def test_good_token(self): @@ -99,7 +103,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ) token = None with mock.patch( - _provider_class + "._paypal_retrieve", return_value=mocked_response, + _provider_class + "._paypal_retrieve", + return_value=mocked_response, ): token = provider._paypal_get_token() self.assertEqual(token, "---TOKEN---") @@ -129,7 +134,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): parse_float=Decimal, ) with mock.patch( - _provider_class + "._paypal_retrieve", return_value=mocked_response, + _provider_class + "._paypal_retrieve", + return_value=mocked_response, ): with self.assertRaises(Exception): provider._paypal_get_token() @@ -159,7 +165,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): parse_float=Decimal, ) with mock.patch( - _provider_class + "._paypal_retrieve", return_value=mocked_response, + _provider_class + "._paypal_retrieve", + return_value=mocked_response, ): with self.assertRaises(Exception): provider._paypal_get_token() @@ -188,7 +195,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): parse_float=Decimal, ) with mock.patch( - _provider_class + "._paypal_retrieve", return_value=mocked_response, + _provider_class + "._paypal_retrieve", + return_value=mocked_response, ): with self.assertRaises(Exception): provider._paypal_get_token() @@ -247,7 +255,10 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ), self.mock_token(): data = provider.with_context( test_account_bank_statement_import_online_paypal_monday=True, - )._obtain_statement_data(self.now - relativedelta(hours=1), self.now,) + )._obtain_statement_data( + self.now - relativedelta(hours=1), + self.now, + ) self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75})) @@ -272,7 +283,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): throw=True, ) with mock.patch( - _provider_class + "._paypal_urlopen", return_value=mocked_response, + _provider_class + "._paypal_urlopen", + return_value=mocked_response, ): with self.assertRaises(UserError): provider._paypal_retrieve("https://url", "") @@ -298,7 +310,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): throw=True, ) with mock.patch( - _provider_class + "._paypal_urlopen", return_value=mocked_response, + _provider_class + "._paypal_urlopen", + return_value=mocked_response, ): with self.assertRaises(UserError): provider._paypal_retrieve("https://url", "") @@ -360,7 +373,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): side_effect=[mocked_response_1, mocked_response_2], ), self.mock_token(): data = provider._obtain_statement_data( - self.now - relativedelta(hours=1), self.now, + self.now - relativedelta(hours=1), + self.now, ) self.assertEqual(data, ([], {"balance_start": 0.75, "balance_end_real": 0.75})) @@ -392,11 +406,13 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): parse_float=Decimal, ) with mock.patch( - _provider_class + "._paypal_retrieve", return_value=mocked_response, + _provider_class + "._paypal_retrieve", + return_value=mocked_response, ), self.mock_token(): with self.assertRaises(Exception): provider._obtain_statement_data( - self.now - relativedelta(years=5), self.now, + self.now - relativedelta(years=5), + self.now, ) def test_pull(self): @@ -510,10 +526,12 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): parse_float=Decimal, ) with mock.patch( - _provider_class + "._paypal_retrieve", return_value=mocked_response, + _provider_class + "._paypal_retrieve", + return_value=mocked_response, ), self.mock_token(): data = provider._obtain_statement_data( - datetime(2019, 8, 1), datetime(2019, 8, 2), + datetime(2019, 8, 1), + datetime(2019, 8, 2), ) self.assertEqual(len(data[0]), 2) diff --git a/setup/account_bank_statement_import_online_paypal/odoo/addons/account_bank_statement_import_online_paypal b/setup/account_bank_statement_import_online_paypal/odoo/addons/account_bank_statement_import_online_paypal new file mode 120000 index 00000000..10d27dd0 --- /dev/null +++ b/setup/account_bank_statement_import_online_paypal/odoo/addons/account_bank_statement_import_online_paypal @@ -0,0 +1 @@ +../../../../account_bank_statement_import_online_paypal \ No newline at end of file diff --git a/setup/account_bank_statement_import_online_paypal/setup.py b/setup/account_bank_statement_import_online_paypal/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/account_bank_statement_import_online_paypal/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 8759307abf8a6eca803179707c974f9780d5ceb8 Mon Sep 17 00:00:00 2001 From: "Omar (Comunitea)" Date: Fri, 25 Feb 2022 11:57:28 +0100 Subject: [PATCH 12/13] [REN] account_bank_statement_import_online_paypal: Renamed to account_statement_import_online_paypal --- .../README.rst | 0 .../__init__.py | 0 .../__manifest__.py | 0 .../account_bank_statement_import_online_paypal.pot | 0 .../models/__init__.py | 0 .../models/online_bank_statement_provider_paypal.py | 0 .../readme/CONFIGURE.rst | 0 .../readme/CONTRIBUTORS.rst | 0 .../readme/DESCRIPTION.rst | 0 .../readme/ROADMAP.rst | 0 .../readme/USAGE.rst | 0 .../static/description/icon.png | Bin .../static/description/index.html | 0 .../tests/__init__.py | 0 ...t_account_bank_statement_import_online_paypal.py | 0 .../views/online_bank_statement_provider.xml | 0 16 files changed, 0 insertions(+), 0 deletions(-) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/README.rst (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/__init__.py (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/__manifest__.py (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/i18n/account_bank_statement_import_online_paypal.pot (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/models/__init__.py (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/models/online_bank_statement_provider_paypal.py (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/readme/CONFIGURE.rst (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/readme/CONTRIBUTORS.rst (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/readme/DESCRIPTION.rst (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/readme/ROADMAP.rst (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/readme/USAGE.rst (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/static/description/icon.png (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/static/description/index.html (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/tests/__init__.py (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/tests/test_account_bank_statement_import_online_paypal.py (100%) rename {account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/views/online_bank_statement_provider.xml (100%) diff --git a/account_bank_statement_import_online_paypal/README.rst b/account_statement_import_online_paypal/README.rst similarity index 100% rename from account_bank_statement_import_online_paypal/README.rst rename to account_statement_import_online_paypal/README.rst diff --git a/account_bank_statement_import_online_paypal/__init__.py b/account_statement_import_online_paypal/__init__.py similarity index 100% rename from account_bank_statement_import_online_paypal/__init__.py rename to account_statement_import_online_paypal/__init__.py diff --git a/account_bank_statement_import_online_paypal/__manifest__.py b/account_statement_import_online_paypal/__manifest__.py similarity index 100% rename from account_bank_statement_import_online_paypal/__manifest__.py rename to account_statement_import_online_paypal/__manifest__.py diff --git a/account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot similarity index 100% rename from account_bank_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot rename to account_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot diff --git a/account_bank_statement_import_online_paypal/models/__init__.py b/account_statement_import_online_paypal/models/__init__.py similarity index 100% rename from account_bank_statement_import_online_paypal/models/__init__.py rename to account_statement_import_online_paypal/models/__init__.py diff --git a/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py b/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py similarity index 100% rename from account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py rename to account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py diff --git a/account_bank_statement_import_online_paypal/readme/CONFIGURE.rst b/account_statement_import_online_paypal/readme/CONFIGURE.rst similarity index 100% rename from account_bank_statement_import_online_paypal/readme/CONFIGURE.rst rename to account_statement_import_online_paypal/readme/CONFIGURE.rst diff --git a/account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst b/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst similarity index 100% rename from account_bank_statement_import_online_paypal/readme/CONTRIBUTORS.rst rename to account_statement_import_online_paypal/readme/CONTRIBUTORS.rst diff --git a/account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst b/account_statement_import_online_paypal/readme/DESCRIPTION.rst similarity index 100% rename from account_bank_statement_import_online_paypal/readme/DESCRIPTION.rst rename to account_statement_import_online_paypal/readme/DESCRIPTION.rst diff --git a/account_bank_statement_import_online_paypal/readme/ROADMAP.rst b/account_statement_import_online_paypal/readme/ROADMAP.rst similarity index 100% rename from account_bank_statement_import_online_paypal/readme/ROADMAP.rst rename to account_statement_import_online_paypal/readme/ROADMAP.rst diff --git a/account_bank_statement_import_online_paypal/readme/USAGE.rst b/account_statement_import_online_paypal/readme/USAGE.rst similarity index 100% rename from account_bank_statement_import_online_paypal/readme/USAGE.rst rename to account_statement_import_online_paypal/readme/USAGE.rst diff --git a/account_bank_statement_import_online_paypal/static/description/icon.png b/account_statement_import_online_paypal/static/description/icon.png similarity index 100% rename from account_bank_statement_import_online_paypal/static/description/icon.png rename to account_statement_import_online_paypal/static/description/icon.png diff --git a/account_bank_statement_import_online_paypal/static/description/index.html b/account_statement_import_online_paypal/static/description/index.html similarity index 100% rename from account_bank_statement_import_online_paypal/static/description/index.html rename to account_statement_import_online_paypal/static/description/index.html diff --git a/account_bank_statement_import_online_paypal/tests/__init__.py b/account_statement_import_online_paypal/tests/__init__.py similarity index 100% rename from account_bank_statement_import_online_paypal/tests/__init__.py rename to account_statement_import_online_paypal/tests/__init__.py diff --git a/account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py similarity index 100% rename from account_bank_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py rename to account_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py diff --git a/account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml b/account_statement_import_online_paypal/views/online_bank_statement_provider.xml similarity index 100% rename from account_bank_statement_import_online_paypal/views/online_bank_statement_provider.xml rename to account_statement_import_online_paypal/views/online_bank_statement_provider.xml From 12b7bfa128ac6d1fb313e529478b5e78a4393cf3 Mon Sep 17 00:00:00 2001 From: "Omar (Comunitea)" Date: Fri, 25 Feb 2022 14:44:54 +0100 Subject: [PATCH 13/13] [MIG] account_statement_import_online_paypal: Migrated to 14.0 --- .../__manifest__.py | 4 +- ...nt_bank_statement_import_online_paypal.pot | 937 ------------------ ...account_statement_import_online_paypal.pot | 937 ++++++++++++++++++ .../online_bank_statement_provider_paypal.py | 11 +- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 6 +- .../tests/__init__.py | 2 +- ...account_statement_import_online_paypal.py} | 37 +- .../views/online_bank_statement_provider.xml | 9 +- ...ccount_bank_statement_import_online_paypal | 1 - .../account_statement_import_online_paypal | 1 + .../setup.py | 0 12 files changed, 978 insertions(+), 968 deletions(-) delete mode 100644 account_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot create mode 100644 account_statement_import_online_paypal/i18n/account_statement_import_online_paypal.pot rename account_statement_import_online_paypal/tests/{test_account_bank_statement_import_online_paypal.py => test_account_statement_import_online_paypal.py} (95%) delete mode 120000 setup/account_bank_statement_import_online_paypal/odoo/addons/account_bank_statement_import_online_paypal create mode 120000 setup/account_statement_import_online_paypal/odoo/addons/account_statement_import_online_paypal rename setup/{account_bank_statement_import_online_paypal => account_statement_import_online_paypal}/setup.py (100%) diff --git a/account_statement_import_online_paypal/__manifest__.py b/account_statement_import_online_paypal/__manifest__.py index 82bab800..49547705 100644 --- a/account_statement_import_online_paypal/__manifest__.py +++ b/account_statement_import_online_paypal/__manifest__.py @@ -4,14 +4,14 @@ { "name": "Online Bank Statements: PayPal.com", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "author": "CorporateHub, Odoo Community Association (OCA)", "maintainers": ["alexey-pelykh"], "website": "https://github.com/OCA/bank-statement-import", "license": "AGPL-3", "category": "Accounting", "summary": "Online bank statements for PayPal.com", - "depends": ["account_bank_statement_import_online"], + "depends": ["account_statement_import_online"], "data": ["views/online_bank_statement_provider.xml"], "installable": True, } diff --git a/account_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot b/account_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot deleted file mode 100644 index 1cb15a7b..00000000 --- a/account_statement_import_online_paypal/i18n/account_bank_statement_import_online_paypal.pot +++ /dev/null @@ -1,937 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_bank_statement_import_online_paypal -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" -"Report-Msgid-Bugs-To: \n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "ACH funding for funds recovery from account balance" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online_paypal.online_bank_statement_provider_form -msgid "API base" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "ATM withdrawal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Account hold for ACH deposit" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Account hold for open authorization" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Account receivable for shipping" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Auto-sweep from account" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "AutoSweep" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "BML credit, transfer from BML" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "BML withdrawal, transfer to BML" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Balance manager account bonus" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Bill pay transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Blocked payments" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Bonus for first ACH use" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Buyer credit payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Buyer credit payment withdrawal, transfer to BML" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Cancellation of hold for dispute resolution" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Charge-off adjustment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Chargeback" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Chargeback cancellation" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Chargeback processing fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Chargeback re-presentment rejection" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Chargeback reversal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Check withdrawal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online_paypal.online_bank_statement_provider_form -msgid "Client ID" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Coupon redemption" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Credit card cash back bonus" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Credit card deposit for negative PayPal account balance" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Credit card security charge refund" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Currency conversion required to cover negative balance" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Debit card cash back bonus" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Deferred disbursement, funds collected for disbursement" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Delayed disbursement, funds disbursed" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Direct payment API" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Display only transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Donation payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Electronic funds transfer (EFT)" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Failed to acquire token using Client ID and Secret!" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Failed to resolve transaction %s (%s)" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Fee for %s" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Fee refund" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Fee reversal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Foreign bank withdrawal fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Funds available" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Funds not yet available" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Funds payable: PayPal-provided funds that must be paid back" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Funds receivable: PayPal-provided funds that are being paid back" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General PayPal debit card transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General PayPal-to-PayPal payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General account adjustment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General adjustment without business-related event" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General authorization" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General bonus" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General buyer credit payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General credit card deposit" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General credit card withdrawal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General currency conversion" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General dividend" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General funding of PayPal account" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General hold" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General hold release" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General incentive or certificate redemption" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General intra-account transfer" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General non-payment fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General reversal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General temporary hold" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General withdrawal from PayPal account" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "General withdrawal to non-bank institution" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Generic instrument-funded payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Generic instrument/Open Wallet reversals (buyer side)" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Generic instrument/Open Wallet reversals (seller side)" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Generic instrument/Open Wallet transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Gift certificate expiration fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Gift certificate payment, purchase of gift certificate" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Gift certificate purchase" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Gift certificate redemption" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Hidden virtual PayPal debit card transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Hold for dispute investigation" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Incentive adjustment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Instant payment review (IPR) reversal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "International credit card withdrawal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Invalid token type!" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Invoice %s" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "MAM reversal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Mass payment batch fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "MassPay payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "MassPay refund transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "MassPay reversal transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Merchant referral account bonus" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Mobile payment, made through a mobile phone" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "No authentication specified!" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Non-reference credit payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Offers used as funding source" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: model:ir.model,name:account_bank_statement_import_online_paypal.model_online_bank_statement_provider -msgid "Online Bank Statement Provider" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Other" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Partner fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal App features are configured incorrectly!" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal Checkout APIs" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal Here payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "" -"PayPal allows retrieving transactions only up to 3 years in the past. Please" -" import older transactions manually. See " -"https://www.paypal.com/us/smarthelp/article/why-can't-i-access-transaction-" -"history-greater-than-3-years-ts2241" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal balance manager funding of PayPal account" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal buyer credit payment funding" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal buyer warranty bonus" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal debit authorization" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal debit card cash advance" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "PayPal debit card withdrawal to ATM" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "" -"PayPal protection bonus, payout for PayPal buyer protection, payout for full" -" protection with PayPal buyer credit." -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Payment fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Payment hold" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Payment hold release" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Payment refund, initiated by merchant" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Payment reversal, initiated by PayPal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Payment review hold" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Payment review release" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Points incentive redemption" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Postage payment to carrier" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Pre-approved payment (BillUser API)" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reauthorization" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Rebate or cash back reversal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Rebate payments" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reimbursement of chargeback" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reserve hold" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reserve release" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reversal of ACH deposit" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reversal of ACH withdrawal transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reversal of debit card transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reversal of general account hold" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Reversal of points usage" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online_paypal.online_bank_statement_provider_form -msgid "Secret" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Settlement consolidation" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Store-to-store transfers" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Subscription payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Temporary hold on available balance" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Third-party auction payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Third-party payout" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Third-party recoupment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Transaction fee for %s" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Transfer of funds from payable" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Transfer to and from a credit-card-funded restricted balance" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Transfer to external GL entity" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Unknown authentication specified!" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Unknown error" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "User-initiated currency conversion" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Virtual PayPal debit card transaction" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Virtual terminal payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Void of authorization" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Warranty fee for warranty purchase" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Website payments standard payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "Website payments. Pro account monthly fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "WorldLink check withdrawal fee" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "WorldLink withdrawal" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "eBay auction payment" -msgstr "" - -#. module: account_bank_statement_import_online_paypal -#: code:addons/account_bank_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 -#, python-format -msgid "eBay loyalty incentive" -msgstr "" 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 new file mode 100644 index 00000000..e84df5b9 --- /dev/null +++ b/account_statement_import_online_paypal/i18n/account_statement_import_online_paypal.pot @@ -0,0 +1,937 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_statement_import_online_paypal +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_statement_import_online_paypal +#: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#, python-format +msgid "ACH funding for funds recovery from account balance" +msgstr "" + +#. module: account_statement_import_online_paypal +#: model_terms:ir.ui.view,arch_db:account_statement_import_online_paypal.online_bank_statement_provider_form +msgid "API base" +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 "ATM withdrawal" +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 "Account hold for ACH deposit" +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 "Account hold for open authorization" +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 "Account receivable for shipping" +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 "Auto-sweep from account" +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 "AutoSweep" +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 "BML credit, transfer from BML" +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 "BML withdrawal, transfer to BML" +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 "Balance manager account bonus" +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 "Bill pay transaction" +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 "Blocked payments" +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 "Bonus for first ACH use" +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 "Buyer credit payment" +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 "Buyer credit payment withdrawal, transfer to BML" +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 "Cancellation of hold for dispute resolution" +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 "Charge-off adjustment" +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 "Chargeback" +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 "Chargeback cancellation" +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 "Chargeback processing fee" +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 "Chargeback re-presentment rejection" +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 "Chargeback reversal" +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 "Check withdrawal" +msgstr "" + +#. module: account_statement_import_online_paypal +#: model_terms:ir.ui.view,arch_db:account_statement_import_online_paypal.online_bank_statement_provider_form +msgid "Client 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 +msgid "Coupon redemption" +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 "Credit card cash back bonus" +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 "Credit card deposit for negative PayPal account balance" +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 "Credit card security charge refund" +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 "Currency conversion required to cover negative balance" +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 "Debit card cash back bonus" +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 "Deferred disbursement, funds collected for disbursement" +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 "Delayed disbursement, funds disbursed" +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 "Direct payment API" +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 "Display only transaction" +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 "Donation payment" +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 "Electronic funds transfer (EFT)" +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 acquire token using Client ID and Secret!" +msgstr "" + +#. module: account_statement_import_online_paypal +#: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#, python-format +msgid "Failed to resolve transaction %s (%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 "Fee for %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 "Fee refund" +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 "Fee reversal" +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 "Foreign bank withdrawal fee" +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 "Funds available" +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 "Funds not yet available" +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 "Funds payable: PayPal-provided funds that must be paid back" +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 "Funds receivable: PayPal-provided funds that are being paid back" +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 "General PayPal debit card transaction" +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 "General PayPal-to-PayPal payment" +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 "General account adjustment" +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 "General adjustment without business-related event" +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 "General authorization" +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 "General bonus" +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 "General buyer credit payment" +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 "General credit card deposit" +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 "General credit card withdrawal" +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 "General currency conversion" +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 "General dividend" +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 "General funding of PayPal account" +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 "General hold" +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 "General hold release" +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 "General incentive or certificate redemption" +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 "General intra-account transfer" +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 "General non-payment fee" +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 "General reversal" +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 "General temporary hold" +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 "General withdrawal from PayPal account" +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 "General withdrawal to non-bank institution" +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 "Generic instrument-funded payment" +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 "Generic instrument/Open Wallet reversals (buyer side)" +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 "Generic instrument/Open Wallet reversals (seller side)" +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 "Generic instrument/Open Wallet transaction" +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 "Gift certificate expiration fee" +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 "Gift certificate payment, purchase of gift certificate" +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 "Gift certificate purchase" +msgstr "" + +#. module: account_statement_import_online_paypal +#: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#, python-format +msgid "Gift certificate redemption" +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 "Hidden virtual PayPal debit card transaction" +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 "Hold for dispute investigation" +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 "Incentive adjustment" +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 "Instant payment review (IPR) reversal" +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 "International credit card withdrawal" +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 "Invalid token type!" +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 "Invoice %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 "MAM reversal" +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 "Mass payment batch fee" +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 "MassPay payment" +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 "MassPay refund transaction" +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 "MassPay reversal transaction" +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 "Merchant referral account bonus" +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 "Mobile payment, made through a mobile phone" +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 "No authentication specified!" +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 "Non-reference credit payment" +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 "Offers used as funding source" +msgstr "" + +#. module: account_statement_import_online_paypal +#: model:ir.model,name:account_statement_import_online_paypal.model_online_bank_statement_provider +msgid "Online Bank Statement Provider" +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 "Other" +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 "Partner fee" +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 "PayPal App features are configured incorrectly!" +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 "PayPal Checkout APIs" +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 "PayPal Here payment" +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 "" +"PayPal allows retrieving transactions only up to 3 years in the past. Please" +" import older transactions manually. See " +"https://www.paypal.com/us/smarthelp/article/why-can't-i-access-transaction-" +"history-greater-than-3-years-ts2241" +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 "PayPal balance manager funding of PayPal account" +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 "PayPal buyer credit payment funding" +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 "PayPal buyer warranty bonus" +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 "PayPal debit authorization" +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 "PayPal debit card cash advance" +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 "PayPal debit card withdrawal to ATM" +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 "" +"PayPal protection bonus, payout for PayPal buyer protection, payout for full" +" protection with PayPal buyer credit." +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 "Payment fee" +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 "Payment hold" +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 "Payment hold release" +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 "Payment refund, initiated by merchant" +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 "Payment reversal, initiated by PayPal" +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 "Payment review hold" +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 "Payment review release" +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 "Points incentive redemption" +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 "Postage payment to carrier" +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 "Pre-approved payment (BillUser API)" +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 "Reauthorization" +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 "Rebate or cash back reversal" +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 "Rebate payments" +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 "Reimbursement of chargeback" +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 "Reserve hold" +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 "Reserve release" +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 "Reversal of ACH deposit" +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 "Reversal of ACH withdrawal transaction" +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 "Reversal of debit card transaction" +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 "Reversal of general account hold" +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 "Reversal of points usage" +msgstr "" + +#. module: account_statement_import_online_paypal +#: model_terms:ir.ui.view,arch_db:account_statement_import_online_paypal.online_bank_statement_provider_form +msgid "Secret" +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 "Settlement consolidation" +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 "Store-to-store transfers" +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 "Subscription payment" +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 "Temporary hold on available balance" +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 "Third-party auction payment" +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 "Third-party payout" +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 "Third-party recoupment" +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 "Transaction fee for %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 "Transfer of funds from payable" +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 "Transfer to and from a credit-card-funded restricted balance" +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 "Transfer to external GL entity" +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 "Unknown authentication specified!" +msgstr "" + +#. module: account_statement_import_online_paypal +#: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#: code:addons/account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py:0 +#, python-format +msgid "Unknown error" +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 "User-initiated currency conversion" +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 "Virtual PayPal debit card transaction" +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 "Virtual terminal payment" +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 "Void of authorization" +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 "Warranty fee for warranty purchase" +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 "Website payments standard payment" +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 "Website payments. Pro account monthly fee" +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 "WorldLink check withdrawal fee" +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 "WorldLink withdrawal" +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 "eBay auction payment" +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 "eBay loyalty incentive" +msgstr "" 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 0d6d9816..b4e00c67 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 @@ -292,11 +292,12 @@ class OnlineBankStatementProviderPayPal(models.Model): or "" ) line = { - "name": name, + "ref": name, "amount": str(total_amount), "date": date, - "note": note, + "payment_ref": note, "unique_import_id": unique_import_id, + "online_raw_data": transaction, } payer_full_name = payer_name.get("full_name") or payer_name.get( "alternate_full_name" @@ -307,12 +308,12 @@ class OnlineBankStatementProviderPayPal(models.Model): if fee_amount: lines += [ { - "name": _("Fee for %s") % (name or transaction_id), + "ref": _("Fee for %s") % (name or transaction_id), "amount": str(fee_amount), "date": date, "partner_name": "PayPal", "unique_import_id": "%s-FEE" % unique_import_id, - "note": _("Transaction fee for %s") % note, + "payment_ref": _("Transaction fee for %s") % note, } ] return lines @@ -400,7 +401,7 @@ class OnlineBankStatementProviderPayPal(models.Model): # NOTE: Workaround for INVALID_REQUEST (see ROADMAP.rst) invalid_data_workaround = self.env.context.get( - "test_account_bank_statement_import_online_paypal_monday", + "test_account_statement_import_online_paypal_monday", interval_start.weekday() == 0 and (datetime.utcnow() - interval_start).total_seconds() < 28800, ) diff --git a/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst b/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst index 724bc1d0..bbb62dfd 100644 --- a/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst +++ b/account_statement_import_online_paypal/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * `CorporateHub `__ * Alexey Pelykh +* Omar CastiƱeira diff --git a/account_statement_import_online_paypal/static/description/index.html b/account_statement_import_online_paypal/static/description/index.html index 5a152d47..dd8c5960 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.

      @@ -478,7 +478,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/__init__.py b/account_statement_import_online_paypal/tests/__init__.py index ca7b0d9c..89a0922e 100644 --- a/account_statement_import_online_paypal/tests/__init__.py +++ b/account_statement_import_online_paypal/tests/__init__.py @@ -1,3 +1,3 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from . import test_account_bank_statement_import_online_paypal +from . import test_account_statement_import_online_paypal diff --git a/account_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py b/account_statement_import_online_paypal/tests/test_account_statement_import_online_paypal.py similarity index 95% rename from account_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py rename to account_statement_import_online_paypal/tests/test_account_statement_import_online_paypal.py index b2842d06..cc9ce800 100644 --- a/account_statement_import_online_paypal/tests/test_account_bank_statement_import_online_paypal.py +++ b/account_statement_import_online_paypal/tests/test_account_statement_import_online_paypal.py @@ -14,7 +14,7 @@ from odoo import fields from odoo.exceptions import UserError from odoo.tests import common -_module_ns = "odoo.addons.account_bank_statement_import_online_paypal" +_module_ns = "odoo.addons.account_statement_import_online_paypal" _provider_class = ( _module_ns + ".models.online_bank_statement_provider_paypal" @@ -254,7 +254,7 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): side_effect=[mocked_response_1, mocked_response_2], ), self.mock_token(): data = provider.with_context( - test_account_bank_statement_import_online_paypal_monday=True, + test_account_statement_import_online_paypal_monday=True, )._obtain_statement_data( self.now - relativedelta(hours=1), self.now, @@ -535,13 +535,14 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): ) self.assertEqual(len(data[0]), 2) + del data[0][0]["online_raw_data"] self.assertEqual( data[0][0], { "date": datetime(2019, 8, 1), "amount": "1000.00", - "name": "Invoice 1", - "note": "1234567890: Payment for Invoice(s) 1", + "ref": "Invoice 1", + "payment_ref": "1234567890: Payment for Invoice(s) 1", "partner_name": "Acme, Inc.", "unique_import_id": "1234567890-1564617600", }, @@ -551,8 +552,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): { "date": datetime(2019, 8, 1), "amount": "-100.00", - "name": "Fee for Invoice 1", - "note": "Transaction fee for 1234567890: Payment for Invoice(s) 1", + "ref": "Fee for Invoice 1", + "payment_ref": "Transaction fee for 1234567890: Payment for Invoice(s) 1", "partner_name": "PayPal", "unique_import_id": "1234567890-1564617600-FEE", }, @@ -606,13 +607,14 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): }""" ) self.assertEqual(len(lines), 1) + del lines[0]["online_raw_data"] self.assertEqual( lines[0], { "date": datetime(2019, 8, 1), "amount": "1000.00", - "name": "Invoice 1", - "note": "1234567890: Payment for Invoice(s) 1", + "ref": "Invoice 1", + "payment_ref": "1234567890: Payment for Invoice(s) 1", "partner_name": "Acme, Inc.", "unique_import_id": "1234567890-1564617600", }, @@ -665,13 +667,14 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): }""" ) self.assertEqual(len(lines), 1) + del lines[0]["online_raw_data"] self.assertEqual( lines[0], { "date": datetime(2019, 8, 1), "amount": "1000.00", - "name": "Invoice 1", - "note": "1234567890: Payment for Invoice(s) 1", + "ref": "Invoice 1", + "payment_ref": "1234567890: Payment for Invoice(s) 1", "partner_name": "Acme, Inc.", "unique_import_id": "1234567890-1564617600", }, @@ -724,13 +727,14 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): }""" ) self.assertEqual(len(lines), 2) + del lines[0]["online_raw_data"] self.assertEqual( lines[0], { "date": datetime(2019, 8, 1), "amount": "1000.00", - "name": "Invoice 1", - "note": "1234567890: Payment for Invoice(s) 1", + "ref": "Invoice 1", + "payment_ref": "1234567890: Payment for Invoice(s) 1", "partner_name": "Acme, Inc.", "unique_import_id": "1234567890-1564617600", }, @@ -740,8 +744,8 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): { "date": datetime(2019, 8, 1), "amount": "-100.00", - "name": "Fee for Invoice 1", - "note": "Transaction fee for 1234567890: Payment for Invoice(s) 1", + "ref": "Fee for Invoice 1", + "payment_ref": "Transaction fee for 1234567890: Payment for Invoice(s) 1", "partner_name": "PayPal", "unique_import_id": "1234567890-1564617600-FEE", }, @@ -790,13 +794,14 @@ class TestAccountBankAccountStatementImportOnlinePayPal(common.TransactionCase): }""" ) self.assertEqual(len(lines), 1) + del lines[0]["online_raw_data"] self.assertEqual( lines[0], { "date": datetime(2019, 8, 1), "amount": "1000.00", - "name": "Invoice 1", - "note": "1234567890: Payment for Invoice(s) 1", + "ref": "Invoice 1", + "payment_ref": "1234567890: Payment for Invoice(s) 1", "partner_name": "Acme, Inc.", "unique_import_id": "1234567890-1564617600", }, diff --git a/account_statement_import_online_paypal/views/online_bank_statement_provider.xml b/account_statement_import_online_paypal/views/online_bank_statement_provider.xml index 7d416cc0..fe5fe43d 100644 --- a/account_statement_import_online_paypal/views/online_bank_statement_provider.xml +++ b/account_statement_import_online_paypal/views/online_bank_statement_provider.xml @@ -9,11 +9,14 @@ online.bank.statement.provider - - + +