[16.0][ADD] purchase_guarantee_disbursement: guarantee refund via disbursement#586
Open
coreichamp wants to merge 4 commits into16.0from
Open
[16.0][ADD] purchase_guarantee_disbursement: guarantee refund via disbursement#586coreichamp wants to merge 4 commits into16.0from
coreichamp wants to merge 4 commits into16.0from
Conversation
…bursement Add new module to enable refunding purchase guarantees through the disbursement system. Integrates guarantee records with disbursement requests, enabling approval workflows (draft → submitted → validated → bill creation). When a disbursement bill is created, it automatically links to guarantee.bill_ids, updating amount_returned. Supports partial refunds via multiple disbursement requests. Follows the pattern of purchase_order_disbursement module. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
c00e0b5 to
f50e5d8
Compare
added 2 commits
March 13, 2026 15:25
… states Add guarantee state flow: draft → lock → received → returned. - Extend state with received/returned via selection_add - Auto-transition lock→received when payment is posted - Auto-transition received→returned when refund bill is posted - Limit payment creation to 1 per guarantee - Refund button only visible after receipt is completed - Add purchase_guarantee_account_payment as dependency
…sbursement-return
…sbursement-return
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.
Summary
purchase_guarantee_disbursementwith full guarantee lifecycle: draft → lock → received → returnedlock → receivedwhen payment posted,received → returnedwhen refund bill posted (viaaccount.move._post()override)state == received), creates pre-filled disbursement request with partner, amount, account, and analytic dimensionsguarantee.bill_idsforamount_returnedtrackingpurchase_guarantee_account_paymentanddisbursementTest plan