Fixes Issue 25339. Change order when removing an element using Dal.
authorDavid Miguelez <david.miguelez@openbravo.com>
Mon, 16 Dec 2013 19:15:43 +0100
changeset 21543 55cf907d0a6b
parent 21542 8d037bf11312
child 21544 d58f93128052
Fixes Issue 25339. Change order when removing an element using Dal.
src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java
--- a/src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java	Tue Dec 10 12:52:34 2013 +0100
+++ b/src/org/openbravo/common/actionhandler/RMInOutPickEditLines.java	Mon Dec 16 19:15:43 2013 +0100
@@ -153,8 +153,8 @@
     if (idList.size() > 0) {
       for (String id : idList) {
         ShipmentInOutLine iol = OBDal.getInstance().get(ShipmentInOutLine.class, id);
+        OBDal.getInstance().remove(iol);
         inOut.getMaterialMgmtShipmentInOutLineList().remove(iol);
-        OBDal.getInstance().remove(iol);
       }
       OBDal.getInstance().save(inOut);
       OBDal.getInstance().flush();