[ADD] purchase_stock_ux: mass cancellation of remaining qty to receive#342
Open
jcadhoc wants to merge 1 commit into
Open
[ADD] purchase_stock_ux: mass cancellation of remaining qty to receive#342jcadhoc wants to merge 1 commit into
jcadhoc wants to merge 1 commit into
Conversation
Add a 'purchase.order.cancel.remaining' wizard, available from the purchase order action menu, that cancels the remaining qty to receive on every order line with a pending/partial receipt in a single operation. It reuses the existing per-line button_cancel_remaining, mirroring the sale.order.cancel.remaining wizard from sale_stock_ux. Task 52215.
Contributor
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.

What
Adds a wizard to cancel the remaining quantity to receive on all lines of one or more purchase orders in a single operation.
purchase.order.cancel.remaining(+ form with confirmation).purchase.order, available from the list and form action menu.receipt_statusispendingorpartialand applies the existing per-linebutton_cancel_remaining().Why
There was no way to cancel only the remaining qty to receive of a PO when a vendor delivers partially and the rest won't arrive — the order stayed open indefinitely or had to be cancelled and recreated. The per-line
button_cancel_remainingalready existed; this adds the order-level (mass) counterpart, mirroringsale.order.cancel.remaininginsale_stock_ux.Out of scope: remaining qty to invoice (only qty to receive is handled).
How it works
Reuses
button_cancel_remaining(), which sets the lineproduct_qtytoqty_received + qty_returned; Odoo then cancels the pending moves. Lines already fully received are ignored, and each cancelled line is logged in the chatter.Test plan
receipt_status = full(ordered qty drops to received qty), pending receptions are cancelled, and the chatter logs the qty change per line. Already-received and already-invoiced quantities are untouched.Task 52215.