Skip to content

UPD camt parser: filter empty text nodes and enhance transaction details - #942

Open
ecino wants to merge 1 commit into
OCA:18.0from
CompassionCH:18.0-camt-improvements
Open

UPD camt parser: filter empty text nodes and enhance transaction details#942
ecino wants to merge 1 commit into
OCA:18.0from
CompassionCH:18.0-camt-improvements

Conversation

@ecino

@ecino ecino commented May 6, 2026

Copy link
Copy Markdown
Contributor

This pull request makes several improvements to the CAMT account statement parser, enhancing its robustness and accuracy when extracting transaction details from XML files. The changes focus on handling edge cases in XML parsing, improving reference extraction, and ensuring transaction details are parsed correctly.

Reference and Value Extraction Improvements:

  • The list of XPath expressions for extracting transaction references now includes an additional path ("./ns:AcctSvcrRef"), improving coverage for different CAMT file structures.

Transaction Details Handling:

  • If no transaction detail nodes are found, the parser now attempts to extract the payment reference from the AddtlNtryInf field, ensuring more complete data extraction.
  • When iterating over transaction detail nodes, the parser now:
    • Copies the narration field to each transaction detail.
    • Sets the transaction amount based on the detail amount, if present, or falls back to the main amount if only one detail exists.
    • These changes improve accuracy when splitting or aggregating transaction details.

@OCA-git-bot OCA-git-bot added series:18.0 mod:account_statement_import_camt Module account_statement_import_camt labels May 6, 2026
@ecino
ecino force-pushed the 18.0-camt-improvements branch from 87d6892 to 7e3c450 Compare May 6, 2026 12:50

@davidwul davidwul left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the AcctSvcrRef is key to match details debit or credit from a camt054,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:account_statement_import_camt Module account_statement_import_camt series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants