UnlinkRunStepFromPurchaseOrder
Unlink an OSP run step from its purchase order line without deleting the PO line. Removes only the purchase_order_line_inventories record for this run step. The PO line itself is preserved along with any other runs’ inventories on it. Errors: rejected with a ValidationError when the primary OR any sibling that this call would touch has been received — either the parent PO line’s status is RECEIVED, or the specific part inventory has already been recorded against a receipt for its current line (the line stays ORDERED for serial-tracked lines with multiple POLIs until every POLI is received, but each individually received POLI is locked from that moment on). Received POLIs are part of the receipt audit trail and cannot be unlinked. applyToAllRunStepsInBatch controls batch propagation: when true (the default) and the run step is part of a normalized batch, every batch sibling currently linked to a PO line is also unlinked. Set to false to unlink only the specified run step.
UnlinkRunStepFromPurchaseOrder