Skip to content

[18.0][FIX] account_payment_return_import_iso20022: Search payments by ID instead of move_id - #955

Open
carlos-lopez-tecnativa wants to merge 1 commit into
OCA:18.0from
Tecnativa:18.0-fix-account_payment_return_import_iso20022-match-reference
Open

[18.0][FIX] account_payment_return_import_iso20022: Search payments by ID instead of move_id#955
carlos-lopez-tecnativa wants to merge 1 commit into
OCA:18.0from
Tecnativa:18.0-fix-account_payment_return_import_iso20022-match-reference

Conversation

@carlos-lopez-tecnativa

Copy link
Copy Markdown
Contributor

After this PR OCA/bank-payment#1475, the EndToEndId is generated using the payment ID instead of the journal entry (move) ID.

As a result, when importing an payment return XML file, the payment can no longer be matched correctly because the lookup is still performed using the move_id.

TT63378
@Tecnativa @pedrobaeza @carlosdauden @sergio-teruel could you please review this?

@pedrobaeza

Copy link
Copy Markdown
Member

Please look for both, as we may have old payment orders.

@pedrobaeza pedrobaeza added this to the 18.0 milestone Jun 23, 2026
@carlos-lopez-tecnativa
carlos-lopez-tecnativa force-pushed the 18.0-fix-account_payment_return_import_iso20022-match-reference branch from 950f8cf to 1029d18 Compare June 23, 2026 14:55
@carlos-lopez-tecnativa

Copy link
Copy Markdown
Contributor Author

Please look for both, as we may have old payment orders.

Done. Please let me know if this is OK for you.

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You can better swap the search order. I'm now fearing that there's a choke between the IDs of both tables in any moment (but that's not your fault, but the change of criteria).

…nstead of move_id

After this PR OCA/bank-payment#1475, the EndToEndId is generated using the payment ID instead of the journal entry (move) ID.

As a result, when importing an payment return XML file, the payment can no longer be matched correctly because the lookup is still performed using the move_id.
@carlos-lopez-tecnativa
carlos-lopez-tecnativa force-pushed the 18.0-fix-account_payment_return_import_iso20022-match-reference branch from 1029d18 to a638662 Compare June 23, 2026 15:09

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now thinking twice, this may return incorrect results due to the choke I have mentioned. Do we simply break compatibility with older payments? What others think?

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

Labels

mod:account_payment_return_import_iso20022 Module account_payment_return_import_iso20022 series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants