Fix error that refunds executed via backend get signed before payment#46
Open
8191 wants to merge 1 commit into
Open
Fix error that refunds executed via backend get signed before payment#468191 wants to merge 1 commit into
8191 wants to merge 1 commit into
Conversation
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
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. |
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.
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.