When you reverse-correct a completed and posted shipment, it fails due to the new shipment record (reverse) cannot save as its C_Order_ID was overwritten with a null. Thus u just comment this statement:
// to.setC_Order_ID(0); //red1 fails if set to zero
Thus it will maintain the from.C_Order_ID.
The method where this statement is located in MInOut.java:
public static MInOut copyFrom (MInOut from, Timestamp dateDoc,
int C_DocType_ID, boolean isSOTrx, boolean counter, String trxName)