Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14] account_statement_import_online_wise : Error when importing via API - Date (xx/yy/zzzz) doesn't match the Number #728

Open
whotopia opened this issue Oct 17, 2024 · 1 comment
Labels

Comments

@whotopia
Copy link

Importing any statements fails due to error generated from /odoo/addons/account/models/sequence_mixin.py

Module

[14] account_statement_import_online_wise

Describe the bug

Using Odoo 14, I have Transferwise account with CHF currency as base, and also EUR, GBP and USD. After setup, when trying to import a bank statement for a period with any transactions, I get for example, the following:

Validation Error
The Date (02/10/2024) doesn't match the Number (Card transaction of 999.99 GBP issued by ...).
You might want to clear the field Number before proceeding with the change of the date.

Example:
Screenshot 2024-10-17 at 12 50 26

This is happening for all attempted importing from all currencies. I am quite sure that the setup for API connnection to Wise is correct.

To Reproduce

In my case any attempts to download statements, in any currency, is generating this error.

Steps to reproduce the behavior:

  1. Generated API key (read only) from wise.com
  2. Generated Private and Public keys
  3. Set up each Wise bank account with Bank Account Number / Bank Feeds: Online (OCA), and Online Bank Statements (OCA) / Provider set to Wise.com. Saving this creates a distinct online bank statement provider record.
  4. For the online bank statement provider record, configure the API key, and I have set Statement Creation: Weekly, Allow empty statements: no tick. Set API key, API base blank. Profile: set to name of company which comes from wise.com. Set Strong Customer Authentication, Private key and Public Key
  5. Tested creation of bank statement via Journal/bank account journal, and now selected "Pull Online Bank Account", and then configured date range manually for download. If the date range has no transactions it works. Otherwise throws the error.
  6. For the Wise Bank account journals (one per currency) it may help to know that I have distinct GL accounts for Outstanding Receipts, Outstanding payments and suspense accounts set. Also have GL for the actual bank account and also the Default Debit Account and Default Credit Account are set to the GL for the actual bank account. The default charges account is set to my banking fees GL account. The "outstanding .. " GL accounts all have reconciliation on, the suspense accounts have it off.
  7. Setup created 5 active sequences with nogap set WISE-CHF-xxxxxxxxx: Check Number Sequence

Expected behavior
Imports from wise should occur without error

Additional context
Does this have something to do with the date format that I have set for a user? Or localisation on wise perhaps? Has the WISE API recently changed? Any insights would be appreciated.

@rrebollo
Copy link

rrebollo commented Dec 2, 2024

Hello @whotopia , Is it happening in runboat? maybe you can test it with a sandbox from the wise side. Debugging the _get_sequence_format_param method should throw some light.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants