[Reservations]Fixes in ReservationsUtils call to reservation post.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Fri, 19 Oct 2012 11:49:54 +0200
changeset 18651 66c2483f9825
parent 18650 151688afa57e
child 18652 649b5e295f8c
[Reservations]Fixes in ReservationsUtils call to reservation post.
src/org/openbravo/materialmgmt/ReservationUtils.java
--- a/src/org/openbravo/materialmgmt/ReservationUtils.java	Thu Oct 18 10:45:09 2012 +0200
+++ b/src/org/openbravo/materialmgmt/ReservationUtils.java	Fri Oct 19 11:49:54 2012 +0200
@@ -90,18 +90,28 @@
     return obmessage;
   }
 
+  /**
+   * Allowed actions:
+   * <ul>
+   * <li>PR Process</li>
+   * <li>RE Reactivate</li>
+   * <li>HO Put on Hold</li>
+   * <li>UNHO Unhold</li>
+   * <li>CL Close</li>
+   * </ul>
+   */
   public OBError processReserve(Reservation reservation, String action) throws OBException {
 
     OBContext.setAdminMode(true);
     Process process = null;
     try {
-      process = OBDal.getInstance().get(Process.class, "");
+      process = OBDal.getInstance().get(Process.class, "5A2A0AF88AF54BB085DCC52FCC9B17B7");
     } finally {
       OBContext.restorePreviousMode();
     }
 
     Map<String, String> parameters = new HashMap<String, String>();
-    parameters.put("action", action);
+    parameters.put("RES_Action", action);
 
     final ProcessInstance pinstance = CallProcess.getInstance().call(process, reservation.getId(),
         parameters);