Conversation
…arration This commit adds PayPal cart parsing to improve payment matching. Steps to reproduce: - Configure PayPal.com online bank statement provider with valid Client ID/Secret; - Ensure PayPal transactions include `cart_info.item_details.item_code` (used by Odoo as Sales Order name); - Pull an online bank statement for a date range containing such transactions. Expected result: - Bank statement line `narration` contains the PayPal `item_code` (e.g. `AG-052216`) so it can be used later for matching. Current result: - `item_code` is ignored and `narration` is not populated with Sales Order reference. Task: 5213
Contributor
|
Hi @alexey-pelykh, |
Steps to reproduce: - Configure PayPal.com online bank statement provider with valid Client ID/Secret; - Open the related "Online Bank Statement Providers -> PayPal" and click *Pull Online Bank Statement*; - Select any date range and click *Pull*. Expected result: - Imported bank statement lines contain the original PayPal transaction payload in the technical field `transaction_details. Current result: - Only a subset of PayPal data is available (e.g., `raw_data`), while full transaction JSON is not preserved on statement lines. Result: - Store the original PayPal transaction payload into `account.bank.statement.line.transaction_details` for both the main line and the fee line. - Tests updated accordingly to validate the new structure. Task: 5213
etobella
approved these changes
Jan 20, 2026
Member
etobella
left a comment
There was a problem hiding this comment.
TEchnically looks ok, just a non blocking comment.
account_statement_import_online_paypal/models/online_bank_statement_provider_paypal.py
Show resolved
Hide resolved
infonetconnections
approved these changes
Feb 4, 2026
Contributor
|
This PR has the |
…ls as JSON string Enterprise account_online_synchronization expects account.bank.statement.line.transaction_details to be a JSON-encoded string and calls json.loads() during create(). - Our PayPal provider started returning transaction_details as a Python dict, which causes TypeError: the JSON object must be str, bytes or bytearray, not dict in enterprise flow. - This fix ensures PayPal statement import always stores transaction_details as a JSON string to stay compatible with enterprise logic, without modifying enterprise code. - Tests updated accordingly (transaction_parse_* and pull assertions now expect JSON string). Task: 5213
…to payment_ref Enterprise account_online_synchronization expects account.bank.statement.line.transaction_details to be a JSON-encoded string and calls json.loads() during create(). - When importing PayPal statements, some transfer/withdrawal transactions (e.g. T0400) don’t contain enough info in `payment_ref` for downstream matching. - Update PayPal line generation to prepend PayPal `bank_reference_id` (when present) to `payment_ref` alongside the `transaction_id` for those transfer lines only, so the bank statement line contains an identifiable reference like: <bank_reference_id> <transaction_id>. Task: 5213
ae8f2b1 to
3fc25e4
Compare
Member
|
Hi @etobella @OCA/banking-maintainers would appreciate you having a look at this before merged. We left 4 separate commits on purpose to make the history tracking more convenient. It would be also easier to cherry-pick them in other versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improvement import so Sales Order reference is preserved for matching.
PayPal transactions can include the Odoo-paid Sales Order name in
cart_info.item_details[].item_code.PR extracts those
item_codevalues and writes them into the bank statement linenarration, improving downstream payment matching and reducing manual reconciliation.Additionally, the PR stores the original PayPal transaction JSON payload on each imported bank statement line in the technical field
transaction_details(including fee lines), so we can later use the full provider data for troubleshooting and matching logic without re-fetching from PayPal.Additionally, for PayPal transfer/withdrawal transactions the PR prepends PayPal’s bank reference to payment_ref to improve identification and matching.