OCA / bank-statement-import

Bank Import Addons
https://odoo-community.org/psc-teams/banking-10
GNU Affero General Public License v3.0
152 stars 411 forks source link

account_statement_import_online_paypal Paypal Statement Import Failure. Error message: Failed to resolve transaction #726

Open maxgrassi opened 2 weeks ago

maxgrassi commented 2 weeks ago

Describe the bug: Since 02/10/2024, the PayPal movements are no longer being imported into Odoo through the account_statement_import_online_paypal module. When attempting to manually pull transactions, the following error message appears: Failed to resolve transaction "transaction number (date and time)". Please see enclosed screenshot.

This issue is not related to duplicated transactions, but seems to be related to communication permissions between Odoo and PayPal. No changes were made to the system prior to the issue, and we are using the latest version of the module.

To Reproduce Affected versions: Odoo 16 Community Edition Steps to reproduce the behavior:

Go to Accounting > Configuration > Journals > Paypal > Pull online bank statement Set from / to date Attempt to import PayPal transactions manually The error appears, and no transactions are imported Expected behavior The PayPal transactions should be imported into Odoo without any error.

Additional context Odoo 16 Community Edition Module version: 16.0.1.0.1 Issue started on 02/10/2024 It seems to be related to communication or permission issues between Odoo and PayPal.

paypal-statement-import-failure

Roodin commented 2 weeks ago

It is related to method def _paypal_get_transaction. Now it seems not to be able to retrive the transaction with the same start_date and end_date in the url (transaction_date). If you change that parmeters in 1 second it will work.

maxgrassi commented 2 weeks ago

It is related to method def _paypal_get_transaction. Now it seems not to be able to retrive the transaction with the same start_date and end_date in the url (transaction_date). If you change that parmeters in 1 second it will work.

Hi Roodin,

Thank you for your response. I understand that the issue might be related to the method def _paypal_get_transaction, specifically with how it retrieves transactions when the start_date and end_date are the same in the URL (transaction_date).

However, I have already tried adjusting the start and end dates (including changing them by 1 second) in the manual retrieval dialog box, but the issue persists. Even with different date ranges or times, I am unable to retrieve PayPal transactions either automatically or manually.

Previously, the transactions were imported automatically without needing to manually pull them. Now, even when attempting the manual pull with adjusted parameters, it still fails to retrieve the transactions.

Could you clarify if there is another place in the code or configuration where I should modify the date parameters (perhaps directly in the method _paypal_get_transaction)? If so, could you provide guidance on how and where to make these changes?

Thank you for your help!

Roodin commented 2 weeks ago

These are the changes i have done and is working for my customer. May be is not the best solution, but a temporal fix.

Screenshot_20241009_104955