Skip to content

Fix error that refunds executed via backend get signed before payment#46

Open
8191 wants to merge 1 commit into
Vorstieg:18.0from
8191:fix_refund
Open

Fix error that refunds executed via backend get signed before payment#46
8191 wants to merge 1 commit into
Vorstieg:18.0from
8191:fix_refund

Conversation

@8191

@8191 8191 commented May 23, 2026

Copy link
Copy Markdown
Contributor

When the user triggers a refund via the backend, the order is in state draft allowing the user to modify it before committing, but the RKSV signature is applied before, resulting in a wrong order being signed and added to the revenue counter.

  • Technical RKSV fields do not need translation
  • Calculatory RKSV fields should not be copied over when copying orders (the internal Odoo logic copies the order once the user triggers a refund) this renders _prepare_refund_values() unnecessary as values do not need to be removed, as this is done in action_retry_signing() right before signing
  • Extend payment wizard to trigger RKSV signing only once payment is confirmed

When the user triggers a refund via the backend, the order is in state
draft allowing the user to modify it before committing, but the RKSV
signature is applied before, resulting in a wrong order being signed
and added to the revenue counter.

* Technical RKSV fields do not need translation
* Calculatory RKSV fields should not be copied over when copying orders
  (the internal Odoo logic copies the order once the user triggers a
  refund) this renders _prepare_refund_values() unnecessary as values
  do not need to be removed, as this is done in action_retry_signing()
  right before signing
* Extend payment wizard to trigger RKSV signing only once payment is
  confirmed
@RobinSteiner

Copy link
Copy Markdown
Collaborator

Good spot, and really nice solution!

I have just one concern, while its true that technical RKSV fields do not really need translations, if we change this now and want to upgrade the module on existing DBs, they will break since we do not have a migration script.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants