Author: jleroux
Date: Sat Jan 14 07:31:15 2012
New Revision: 1231444
URL:
http://svn.apache.org/viewvc?rev=1231444&view=revLog:
A patch from Ankit Jain
https://issues.apache.org/jira/browse/OFBIZ-OFBIZ-4629 "The Status of PicklistItem never changes from PICKITEM_PENDING to PICKITEM_COMPLETED."
Ankit 1st provided another patch,I asked:
jleroux: It seems to me that this is already done in methods PackingSessionLine.issueItemToShipment, and VerifyPickSessionRow.issueItemToShipment, which makes sense to me, thought I did only a 5 mins review, so I could be wrong, could you please check?
Ankit: Yes I found the method VerifyPickSessionRow.issueItemToShipment which is doing the same thing.
I found a bug too and also the reason for it, actually when you verify an order by passing "PicklistBinId" then it updates the status of picklistitems, but if we verify an order by passing a orderId then the status of the picklistitem never changes to Complete.
The reason is that when we pass orderId the "picklistBinId" is not get set in the verifyPickSession so its not available at the time "issueItemToShipment" is called so its not changing the status to complete.
Modified:
ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy
Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy?rev=1231444&r1=1231443&r2=1231444&view=diff==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/shipment/VerifyPick.groovy Sat Jan 14 07:31:15 2012
@@ -77,6 +77,14 @@ if (picklistBinId) {
}
}
+if (orderId && !picklistBinId) {
+ picklistBin = EntityUtil.getFirst(delegator.findByAnd("PicklistBin", [primaryOrderId : orderId]));
+ if (picklistBin) {
+ picklistBinId = picklistBin.picklistBinId;
+ verifyPickSession.setPicklistBinId(picklistBinId);
+ }
+}
+
context.orderId = orderId;
context.shipGroupSeqId = shipGroupSeqId;
context.picklistBinId = picklistBinId;