Fixes issue 32366: Callout performance improvements.
authorInigo Sanchez <inigo.sanchez@openbravo.com>
Thu, 08 Sep 2016 13:20:39 +0200
changeset 30045 b4a8ad7a445f
parent 30005 1810949e9dd6 (current diff)
parent 30044 355be0d25972 (diff)
child 30046 7cbdcc419167
Fixes issue 32366: Callout performance improvements.
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/MetadataOnTab.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/MetadataOnTab.java	Thu Sep 08 13:20:39 2016 +0200
@@ -38,7 +38,6 @@
  * Sequence Number to set on the new metadata when the Attachment Method is selected.
  */
 public class MetadataOnTab extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static final String WINDOWTABSFIELDS_WINDOW_ID = "102";
 
   @Override
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/example/JSExecuteCalloutExample.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/example/JSExecuteCalloutExample.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,7 +28,6 @@
  */
 public class JSExecuteCalloutExample extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final String JSEXECUTE = "JSEXECUTE";
 
   @Override
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Thu Sep 08 13:20:39 2016 +0200
@@ -31,6 +31,9 @@
 import javax.enterprise.inject.Any;
 import javax.enterprise.inject.Instance;
 import javax.inject.Inject;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
@@ -67,6 +70,11 @@
 import org.openbravo.dal.service.OBDao;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.data.Sqlc;
+import org.openbravo.erpCommon.ad_callouts.CalloutConstants;
+import org.openbravo.erpCommon.ad_callouts.CalloutInformationProvider;
+import org.openbravo.erpCommon.ad_callouts.HttpServletCalloutInformationProvider;
+import org.openbravo.erpCommon.ad_callouts.SimpleCallout;
+import org.openbravo.erpCommon.ad_callouts.SimpleCalloutInformationProvider;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.datamodel.Column;
 import org.openbravo.model.ad.domain.Preference;
@@ -1462,49 +1470,69 @@
         continue;
       }
       log.debug("Calling callout " + calloutClassName + " with field changed " + lastFieldChanged);
+      Class<?> calloutClass;
       try {
-        Class<?> calloutClass = Class.forName(calloutClassName);
-        Method init = null;
-        Method service = null;
-        Method post = null;
-        for (Method m : calloutClass.getMethods()) {
-          if (m.getName().equals("init") && m.getParameterTypes().length == 1) {
-            init = m;
-          }
-          if (m.getName().equals("service")) {
-            service = m;
-          }
-          if (m.getName().equals("doPost")) {
-            post = m;
-          }
-        }
+        calloutClass = Class.forName(calloutClassName);
+      } catch (ClassNotFoundException e) {
+        throw new OBException("Couldn't find class " + calloutClassName, e);
+      }
+      try {
         calloutsToCall.remove(calloutClassName);
         lastfieldChangedList.remove(lastFieldChanged);
 
-        if (init == null || service == null) {
-          log.info("Couldn't find method in Callout " + calloutClassName);
+        Object calloutObject;
+        boolean isCalloutInitialized = false;
+        if (calloutInstances.get(calloutClassName) != null) {
+          calloutObject = calloutInstances.get(calloutClassName);
+          isCalloutInitialized = true;
         } else {
-          RequestContext rq = RequestContext.get();
+          calloutObject = calloutClass.newInstance();
+          calloutInstances.put(calloutClassName, calloutObject);
+        }
 
-          RequestContext.get().setRequestParameter("inpLastFieldChanged", lastFieldChanged);
-          RequestContext.get().setRequestParameter("inpOB3UIMode", "Y");
+        if (!(calloutObject instanceof HttpServlet) && !(calloutObject instanceof SimpleCallout)) {
+          log.info("Callout "
+              + calloutClassName
+              + " only allows reference instances of type SimpleCallout and HttpServlet but the callout is an instance of "
+              + calloutObject.getClass().getName());
+          continue;
+        }
+
+        RequestContext request = RequestContext.get();
+        RequestContext.get().setRequestParameter("inpLastFieldChanged", lastFieldChanged);
+        RequestContext.get().setRequestParameter("inpOB3UIMode", "Y");
+        CalloutServletConfig config = new CalloutServletConfig(calloutClassName,
+            RequestContext.getServletContext());
+        CalloutInformationProvider calloutResponseManager = null;
+
+        // execute SimpleCallout callouts
+        if (SimpleCallout.class.isAssignableFrom(calloutClass)) {
+
+          SimpleCallout calloutInstance = (SimpleCallout) calloutObject;
+          calloutInstance.init(config);
+
+          // execute SimpleCallout callout
+          JSONObject result = calloutInstance.executeSimpleCallout(request);
+
+          // updated info values of callouts infrastructure
+          String calloutNameJS = calloutClassName.substring(calloutClassName.lastIndexOf(".") + 1);
+          calledCallouts.add(calloutNameJS);
+
+          calloutResponseManager = new SimpleCalloutInformationProvider(result);
+        } else {
           // We then execute the callout
-          Object calloutInstance;
-          CalloutHttpServletResponse fakeResponse = new CalloutHttpServletResponse(rq.getResponse());
-          Object[] arguments = { rq.getRequest(), fakeResponse };
-          if (calloutInstances.get(calloutClassName) != null) {
-            calloutInstance = calloutInstances.get(calloutClassName);
-            post.invoke(calloutInstance, arguments);
+          HttpServlet calloutInstance = (HttpServlet) calloutObject;
+          CalloutHttpServletResponse fakeResponse = new CalloutHttpServletResponse(
+              request.getResponse());
+
+          if (isCalloutInitialized) {
+            Method doPost = calloutClass.getMethod("doPost", HttpServletRequest.class,
+                HttpServletResponse.class);
+            doPost.setAccessible(true);
+            doPost.invoke(calloutInstance, request.getRequest(), fakeResponse);
           } else {
-            calloutInstance = calloutClass.newInstance();
-            calloutInstances.put(calloutClassName, calloutInstance);
-            CalloutServletConfig config = new CalloutServletConfig(calloutClassName,
-                RequestContext.getServletContext());
-            Object[] initArgs = { config };
-            init.invoke(calloutInstance, initArgs);
-            // We invoke the service method. This method will automatically call the doPost() method
-            // of the callout servlet
-            service.invoke(calloutInstance, arguments);
+            calloutInstance.init(config);
+            calloutInstance.service(request.getRequest(), fakeResponse);
           }
 
           String calloutResponse = fakeResponse.getOutputFromWriter();
@@ -1515,184 +1543,16 @@
           if (calloutNameJS != null && calloutNameJS != "") {
             calledCallouts.add(calloutNameJS);
           }
-          if (returnedArray.size() > 0) {
-            for (NativeArray element : returnedArray) {
-              String name = (String) element.get(0, null);
-              if (name.equals("MESSAGE") || name.equals("INFO") || name.equals("WARNING")
-                  || name.equals("ERROR") || name.equals("SUCCESS")) {
-                log.debug("Callout message: " + element.get(1, null));
-                JSONObject message = new JSONObject();
-                message.put("text", element.get(1, null).toString());
-                message.put("severity", name.equals("MESSAGE") ? "TYPE_INFO" : "TYPE_" + name);
-                messages.add(message);
-              } else if (name.equals("JSEXECUTE")) {
-                // The code on a JSEXECUTE command is sent directly to the client for eval()
-                String code = (String) element.get(1, null);
-                if (code != null) {
-                  jsExecuteCode.add(code);
-                }
-              } else if (name.equals("EXECUTE")) {
-                String js = element.get(1, null) == null ? null : element.get(1, null).toString();
-                if (js != null && !js.equals("")) {
-                  if (js.equals("displayLogic();")) {
-                    // We don't do anything, this is a harmless js response
-                  } else {
-                    JSONObject message = new JSONObject();
-                    message.put("text", Utility.messageBD(new DalConnectionProvider(false),
-                        "OBUIAPP_ExecuteInCallout", RequestContext.get().getVariablesSecureApp()
-                            .getLanguage()));
-                    message.put("severity", "TYPE_ERROR");
-                    messages.add(message);
-                    createNewPreferenceForWindow(tab.getWindow());
-                    log.warn("An EXECUTE element has been found in the response of the callout "
-                        + calloutClassName
-                        + ". A preference has been created for the window "
-                        + tab.getWindow().getName()
-                        + "so that it's shown in classic mode until this problem is fixed. This requires to build the system to generate this classic window.");
-                  }
-                }
-              } else {
-                if (name.startsWith("inp")) {
-                  boolean changed = false;
-                  if (inpFields.containsKey(name)) {
-                    Column col = inpFields.get(name).getColumn();
-                    if (col == null) {
-                      continue;
-                    }
-                    String colId = "inp" + Sqlc.TransformaNombreColumna(col.getDBColumnName());
-                    if (element.get(1, null) instanceof NativeArray) {
-                      // Combo data
-                      NativeArray subelements = (NativeArray) element.get(1, null);
-                      JSONObject jsonobject = new JSONObject();
-                      ArrayList<JSONObject> comboEntries = new ArrayList<JSONObject>();
-                      // If column is not mandatory, we add an initial blank element
-                      if (!col.isMandatory()) {
-                        JSONObject entry = new JSONObject();
-                        entry.put(JsonConstants.ID, (String) null);
-                        entry.put(JsonConstants.IDENTIFIER, (String) null);
-                        comboEntries.add(entry);
-                      }
-                      for (int j = 0; j < subelements.getLength(); j++) {
-                        NativeArray subelement = (NativeArray) subelements.get(j, null);
-                        if (subelement != null && subelement.get(2, null) != null) {
-                          JSONObject entry = new JSONObject();
-                          entry.put(JsonConstants.ID, subelement.get(0, null));
-                          entry.put(JsonConstants.IDENTIFIER, subelement.get(1, null));
-                          comboEntries.add(entry);
-                          if ((j == 0 && col.isMandatory())
-                              || subelement.get(2, null).toString().equalsIgnoreCase("True")) {
-                            // If the column is mandatory, we choose the first value as selected
-                            // In any case, we select the one which is marked as selected "true"
-                            UIDefinition uiDef = UIDefinitionController.getInstance()
-                                .getUIDefinition(col.getId());
-                            String newValue = subelement.get(0, null).toString();
-                            jsonobject.put("value", newValue);
-                            jsonobject.put("classicValue", uiDef.convertToClassicString(newValue));
-                            rq.setRequestParameter(colId, uiDef.convertToClassicString(newValue));
-                            log.debug("Column: " + col.getDBColumnName() + "  Value: " + newValue);
-                          }
-                        }
-                      }
-                      // If the callout returns a combo, we in any case set the new value with what
-                      // the callout returned
-                      columnValues.put(colId, jsonobject);
-                      changed = true;
-                      if (dynamicCols.contains(colId)) {
-                        changedCols.add(col.getDBColumnName());
-                      }
-                      jsonobject.put("entries", new JSONArray(comboEntries));
-                    } else {
-                      // Normal data
-                      Object el = element.get(1, null);
-                      String oldValue = rq.getRequestParameter(colId);
-                      // We set the new value in the request, so that the JSONObject is computed
-                      // with the new value
-                      UIDefinition uiDef = UIDefinitionController.getInstance().getUIDefinition(
-                          col.getId());
-                      if (el instanceof String
-                          || !(uiDef.getDomainType() instanceof PrimitiveDomainType)) {
-                        rq.setRequestParameter(colId, el == null ? null : el.toString());
-                      } else {
-                        rq.setRequestParameter(colId, uiDef.convertToClassicString(el));
-                      }
-                      String jsonStr = uiDef.getFieldProperties(inpFields.get(name), true);
-                      JSONObject jsonobj = new JSONObject(jsonStr);
-                      if (el == null
-                          && (uiDef instanceof ForeignKeyUIDefinition || uiDef instanceof EnumUIDefinition)) {
-                        // Special case for null values for combos: we must clean the combo values
-                        jsonobj.put("value", "");
-                        jsonobj.put("classicValue", "");
-                        jsonobj.put("entries", new JSONArray());
-                      }
-                      if (jsonobj.has("classicValue")) {
-                        String newValue = jsonobj.getString("classicValue");
-                        log.debug("Modified column: " + col.getDBColumnName() + "  Value: " + el);
-                        if ((oldValue == null && newValue != null)
-                            || (oldValue != null && newValue == null)
-                            || (oldValue != null && newValue != null && !oldValue.equals(newValue))) {
-                          columnValues.put(
-                              "inp" + Sqlc.TransformaNombreColumna(col.getDBColumnName()), jsonobj);
-                          changed = true;
-                          if (dynamicCols.contains(colId)) {
-                            changedCols.add(col.getDBColumnName());
-                          }
-                          rq.setRequestParameter(colId, jsonobj.getString("classicValue"));
-                        }
-                      } else {
-                        log.debug("Column value didn't change. We do not attempt to execute any additional callout");
-                      }
-                    }
-                    if (changed && col.getCallout() != null) {
-                      // We need to fire this callout, as the column value was changed
-                      // but only if the callout we are firing is different
-                      if (!calloutClassName.equals(col.getCallout().getADModelImplementationList()
-                          .get(0).getJavaClassName())) {
-                        addCalloutToList(col, calloutsToCall, lastfieldChangedList);
-                      }
-                    }
-                  } else {
-                    for (AuxiliaryInput aux : tab.getADAuxiliaryInputList()) {
-                      if (name
-                          .equalsIgnoreCase("inp" + Sqlc.TransformaNombreColumna(aux.getName()))) {
-                        Object el = element.get(1, null);
-                        JSONObject obj = new JSONObject();
-                        obj.put("value", el);
-                        obj.put("classicValue", el);
-                        columnValues.put(name, obj);
-                        // Add the auxiliary input to the list of auxiliary inputs modified by
-                        // callouts
-                        if (!overwrittenAuxiliaryInputs.contains(aux.getName())) {
-                          overwrittenAuxiliaryInputs.add(aux.getName());
-                        }
-                      }
-                    }
-                    if (!columnValues.containsKey(name)) {
-                      // This returned value wasn't found to be either a column or an auxiliary
-                      // input. We assume it is a hidden input, which are used in places like
-                      // selectors
-                      Object el = element.get(1, null);
-                      if (el != null) {
-                        if (el instanceof NativeArray) {
-                          // In this case, we ignore the value, as a hidden input cannot be an array
-                          // of elements
-                        } else {
-                          hiddenInputs.put(name, el);
-                          // We set the hidden fields in the request, so that subsequent callouts
-                          // can use them
-                          rq.setRequestParameter(name, el.toString());
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
+
+          calloutResponseManager = new HttpServletCalloutInformationProvider(returnedArray);
         }
+
+        managesUpdatedValuesForCallout(columnValues, tab, calloutsToCall, lastfieldChangedList,
+            messages, dynamicCols, jsExecuteCode, hiddenInputs, overwrittenAuxiliaryInputs,
+            changedCols, inpFields, calloutClassName, request, calloutResponseManager);
+
         lastCalledCallout = calloutClassName;
         lastFieldOfLastCalloutCalled = lastFieldChanged;
-      } catch (ClassNotFoundException e) {
-        throw new OBException("Couldn't find class " + calloutClassName, e);
       } catch (Exception e) {
         throw new OBException("Couldn't execute callout (class " + calloutClassName + ")", e);
       }
@@ -1704,6 +1564,170 @@
 
   }
 
+  private void managesUpdatedValuesForCallout(Map<String, JSONObject> columnValues, Tab tab,
+      List<String> calloutsToCall, List<String> lastfieldChangedList, List<JSONObject> messages,
+      List<String> dynamicCols, List<String> jsExecuteCode, Map<String, Object> hiddenInputs,
+      List<String> overwrittenAuxiliaryInputs, List<String> changedCols,
+      HashMap<String, Field> inpFields, String calloutClassName, RequestContext request,
+      CalloutInformationProvider calloutInformationProvider) throws JSONException {
+    Object element = calloutInformationProvider.getNextElement();
+    while (element != null) {
+      String name = (String) calloutInformationProvider.getCurrentElementName();
+      if (name.equals("MESSAGE") || name.equals("INFO") || name.equals("WARNING")
+          || name.equals("ERROR") || name.equals("SUCCESS")) {
+        log.debug("Callout message: " + calloutInformationProvider.getCurrentElementValue(element));
+        JSONObject message = new JSONObject();
+        message.put("text", calloutInformationProvider.getCurrentElementValue(element).toString());
+        message.put("severity", name.equals("MESSAGE") ? "TYPE_INFO" : "TYPE_" + name);
+        messages.add(message);
+      } else if (name.equals("JSEXECUTE")) {
+        // The code on a JSEXECUTE command is sent directly to the client for eval()
+        String code = (String) calloutInformationProvider.getCurrentElementValue(element);
+        if (code != null) {
+          jsExecuteCode.add(code);
+        }
+      } else if (name.equals("EXECUTE")) {
+        String js = calloutInformationProvider.getCurrentElementValue(element) == null ? null
+            : calloutInformationProvider.getCurrentElementValue(element).toString();
+        if (js != null && !js.equals("")) {
+          if (js.equals("displayLogic();")) {
+            // We don't do anything, this is a harmless js response
+          } else {
+            JSONObject message = new JSONObject();
+            message.put("text", Utility.messageBD(new DalConnectionProvider(false),
+                "OBUIAPP_ExecuteInCallout", RequestContext.get().getVariablesSecureApp()
+                    .getLanguage()));
+            message.put("severity", "TYPE_ERROR");
+            messages.add(message);
+            // Create preference to activate classic window only for HttpServlet callouts and in
+            // other cases error is shown.
+            if (calloutInformationProvider instanceof HttpServletCalloutInformationProvider) {
+              createNewPreferenceForWindow(tab.getWindow());
+              log.warn("An EXECUTE element has been found in the response of the callout "
+                  + calloutClassName
+                  + ". A preference has been created for the window "
+                  + tab.getWindow().getName()
+                  + " so that it's shown in classic mode until this problem is fixed. This requires to build the system to generate this classic window.");
+            } else {
+              log.error("An EXECUTE element has been found in the response of the SimpleCallout "
+                  + calloutClassName + ".");
+            }
+          }
+        }
+      } else {
+        if (name.startsWith("inp")) {
+          boolean changed = false;
+          if (inpFields.containsKey(name)) {
+            Column col = inpFields.get(name).getColumn();
+            if (col != null) {
+              String colId = "inp" + Sqlc.TransformaNombreColumna(col.getDBColumnName());
+              if (calloutInformationProvider.isComboData(element)) {
+                // Combo data
+                calloutInformationProvider.manageComboData(columnValues, dynamicCols, changedCols,
+                    request, element, col, colId);
+                // When managing combos, it is not taken into account if the column value has
+                // changed, so 'changed' is always true.
+                changed = true;
+              } else {
+                // Normal data
+                Object el = calloutInformationProvider.getCurrentElementValue(element);
+                String oldValue = request.getRequestParameter(colId);
+                // We set the new value in the request, so that the JSONObject is computed
+                // with the new value
+                UIDefinition uiDef = UIDefinitionController.getInstance().getUIDefinition(
+                    col.getId());
+                if (el instanceof String || !(uiDef.getDomainType() instanceof PrimitiveDomainType)) {
+                  request.setRequestParameter(colId, el == null ? null : el.toString());
+                } else {
+                  request.setRequestParameter(colId, uiDef.convertToClassicString(el));
+                }
+                String jsonStr = uiDef.getFieldProperties(inpFields.get(name), true);
+                JSONObject jsonobj = new JSONObject(jsonStr);
+                if (el == null
+                    && (uiDef instanceof ForeignKeyUIDefinition || uiDef instanceof EnumUIDefinition)) {
+                  // Special case for null values for combos: we must clean the combo values
+                  jsonobj.put(CalloutConstants.VALUE, "");
+                  jsonobj.put(CalloutConstants.CLASSIC_VALUE, "");
+                  jsonobj.put(CalloutConstants.ENTRIES, new JSONArray());
+                }
+                if (jsonobj.has(CalloutConstants.CLASSIC_VALUE)) {
+                  String newValue = jsonobj.getString(CalloutConstants.CLASSIC_VALUE);
+                  log.debug("Modified column: " + col.getDBColumnName() + "  Value: " + el);
+                  if ((oldValue == null && newValue != null)
+                      || (oldValue != null && newValue == null)
+                      || (oldValue != null && newValue != null && !oldValue.equals(newValue))) {
+                    columnValues.put("inp" + Sqlc.TransformaNombreColumna(col.getDBColumnName()),
+                        jsonobj);
+                    changed = true;
+                    if (dynamicCols.contains(colId)) {
+                      changedCols.add(col.getDBColumnName());
+                    }
+                    request.setRequestParameter(colId,
+                        jsonobj.getString(CalloutConstants.CLASSIC_VALUE));
+                  }
+                } else {
+                  log.debug("Column value didn't change. We do not attempt to execute any additional callout");
+                }
+              }
+              if (changed && col.getCallout() != null) {
+                // We need to fire this callout, as the column value was changed
+                // but only if the callout we are firing is different
+                if (isShouldBeFired(calloutClassName, col)) {
+                  addCalloutToList(col, calloutsToCall, lastfieldChangedList);
+                }
+              }
+            }
+          } else {
+            for (AuxiliaryInput aux : tab.getADAuxiliaryInputList()) {
+              if (name.equalsIgnoreCase("inp" + Sqlc.TransformaNombreColumna(aux.getName()))) {
+                Object el = calloutInformationProvider.getCurrentElementValue(element);
+                JSONObject obj = new JSONObject();
+                obj.put(CalloutConstants.VALUE, el);
+                obj.put(CalloutConstants.CLASSIC_VALUE, el);
+                columnValues.put(name, obj);
+                // Add the auxiliary input to the list of auxiliary inputs modified by
+                // callouts
+                if (!overwrittenAuxiliaryInputs.contains(aux.getName())) {
+                  overwrittenAuxiliaryInputs.add(aux.getName());
+                }
+              }
+            }
+            if (!columnValues.containsKey(name)) {
+              // This returned value wasn't found to be either a column or an auxiliary
+              // input. We assume it is a hidden input, which are used in places like
+              // selectors
+              Object el = calloutInformationProvider.getCurrentElementValue(element);
+              if (el != null) {
+                if (calloutInformationProvider.isComboData(element)) {
+                  // In this case, we ignore the value, as a hidden input cannot be an array
+                  // of elements
+                } else {
+                  hiddenInputs.put(name, el);
+                  // We set the hidden fields in the request, so that subsequent callouts
+                  // can use them
+                  request.setRequestParameter(name, el.toString());
+                }
+              }
+            }
+          }
+        }
+      }
+      element = calloutInformationProvider.getNextElement();
+    }
+  }
+
+  /**
+   * This callout should be fire only if the callout we are firing is different.
+   * 
+   * @param calloutClassName
+   *          callout that is firing
+   * @return true if it is should be fired.
+   */
+  private boolean isShouldBeFired(String calloutClassName, Column col) {
+    return !calloutClassName.equals(col.getCallout().getADModelImplementationList().get(0)
+        .getJavaClassName());
+  }
+
   /**
    * This method will create a new preference to show the given window in classic mode, if there is
    * a preference doesn't already exist
@@ -1711,7 +1735,6 @@
    * @param window
    */
   private void createNewPreferenceForWindow(Window window) {
-
     OBCriteria<Preference> prefCriteria = OBDao.getFilteredCriteria(Preference.class,
         Restrictions.eq(Preference.PROPERTY_PROPERTY, "OBUIAPP_UseClassicMode"),
         Restrictions.eq(Preference.PROPERTY_WINDOW, window));
@@ -1726,7 +1749,6 @@
     newPref.setPropertyList(true);
     OBDal.getInstance().save(newPref);
     OBDal.getInstance().flush();
-
   }
 
   private void addCalloutToList(Column col, List<String> listOfCallouts,
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/GridConfigurationSequenceNumberCallout.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/GridConfigurationSequenceNumberCallout.java	Thu Sep 08 13:20:39 2016 +0200
@@ -38,7 +38,6 @@
  */
 public class GridConfigurationSequenceNumberCallout extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final String GC_SYSTEM_TAB_ID = "13FE911F7F684A47801DF55525BAD4A1";
   private static final String GC_TAB_TAB_ID = "49B33DC2EDFD45A48EECE139AD5E9AC9";
   private static final String warningMessage = "SameSeqNoForGridConfiguration";
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/CheckOptionalFilterCallout.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/CheckOptionalFilterCallout.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013 Openbravo SLU
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -35,7 +35,6 @@
 
 public class CheckOptionalFilterCallout extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final String OPTIONAL_FILTERS = "@optional_filters@";
   private static final String warningMessage = "OBUIAPP_CheckOptionalFilters";
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/CalloutConstants.java	Thu Sep 08 13:20:39 2016 +0200
@@ -0,0 +1,38 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2016 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import org.openbravo.client.application.window.FormInitializationComponent;
+
+/**
+ * Defines constants used for manage Callouts. These constants are used in
+ * {@link FormInitializationComponent}, {@link SimpleCalloutInformationProvider} and
+ * {@link HttpServletCalloutInformationProvider} classes.
+ * 
+ * @author inigo.sanchez
+ */
+public class CalloutConstants {
+
+  public static final String VALUE = "value";
+  public static final String CLASSIC_VALUE = "classicValue";
+  public static final String ENTRIES = "entries";
+
+  public static final String COMBO_SELECTED_VALUE = "classicValue";
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/CalloutInformationProvider.java	Thu Sep 08 13:20:39 2016 +0200
@@ -0,0 +1,71 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2016 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.model.ad.datamodel.Column;
+
+/**
+ * CalloutInformationProvider provides the information that is used to populate the messages,
+ * comboEntries etc... for Callouts.
+ * 
+ * @author inigo.sanchez
+ *
+ */
+public interface CalloutInformationProvider {
+
+  /**
+   * Retrieves the name of the current element to take into account into the FIC response.
+   */
+  public String getCurrentElementName();
+
+  /**
+   * Retrieves the value of the current parameter allocated inside element to take into account into
+   * the FIC response.
+   */
+  public Object getCurrentElementValue(Object element);
+
+  /**
+   * Retrieves the next element of the collection to manage all values updated by callouts.
+   * 
+   * @return
+   */
+  public Object getNextElement();
+
+  /**
+   * This method checks if an object represents a combo data to apply a particular parser
+   * operations.
+   *
+   * @return true if values represents a combo data.
+   */
+  public Boolean isComboData(Object element);
+
+  /**
+   * This method allows to implement a particular mechanism for managing combo data generated by
+   * callouts.
+   */
+  public void manageComboData(Map<String, JSONObject> columnValues, List<String> dynamicCols,
+      List<String> changedCols, RequestContext request, Object element, Column col, String colIdent)
+      throws JSONException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/DelegateConnectionProvider.java	Thu Sep 08 13:20:39 2016 +0200
@@ -0,0 +1,145 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2016 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import javax.servlet.ServletContext;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.ConnectionProviderContextListener;
+import org.openbravo.client.application.window.servlet.CalloutServletConfig;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.exception.NoConnectionAvailableException;
+
+/**
+ * A connection provider which is used on current SimpleCallout infrastructure (see
+ * {@link SimpleCallout}).
+ *
+ * This implementation is required to maintain backwards compatibility in SimpleCallouts
+ * implementations.
+ *
+ * @author inigo.sanchez
+ */
+public class DelegateConnectionProvider implements ConnectionProvider {
+
+  protected ConnectionProvider myPool;
+  private ServletContext context;
+  protected Logger log4j = Logger.getLogger(this.getClass());
+
+  public void init(CalloutServletConfig config) {
+    context = config.getServletContext();
+  }
+
+  private ConnectionProvider getPool() {
+    if (myPool == null) {
+      myPool = ConnectionProviderContextListener.getPool(context);
+    }
+    return myPool;
+  }
+
+  public Connection getConnection() throws NoConnectionAvailableException {
+    return getPool().getConnection();
+  }
+
+  public String getRDBMS() {
+    return getPool().getRDBMS();
+  }
+
+  public Connection getTransactionConnection() throws NoConnectionAvailableException, SQLException {
+    return getPool().getTransactionConnection();
+  }
+
+  public void releaseCommitConnection(Connection conn) throws SQLException {
+    getPool().releaseCommitConnection(conn);
+  }
+
+  public void releaseRollbackConnection(Connection conn) throws SQLException {
+    getPool().releaseRollbackConnection(conn);
+  }
+
+  public PreparedStatement getPreparedStatement(String poolName, String strSql) throws Exception {
+    return getPool().getPreparedStatement(poolName, strSql);
+  }
+
+  public PreparedStatement getPreparedStatement(String strSql) throws Exception {
+    return getPool().getPreparedStatement(strSql);
+  }
+
+  public PreparedStatement getPreparedStatement(Connection conn, String strSql) throws SQLException {
+    return getPool().getPreparedStatement(conn, strSql);
+  }
+
+  public void releasePreparedStatement(PreparedStatement preparedStatement) throws SQLException {
+    getPool().releasePreparedStatement(preparedStatement);
+  }
+
+  public Statement getStatement(String poolName) throws Exception {
+    return getPool().getStatement(poolName);
+  }
+
+  public Statement getStatement() throws Exception {
+    return getPool().getStatement();
+  }
+
+  public Statement getStatement(Connection conn) throws SQLException {
+    return getPool().getStatement(conn);
+  }
+
+  public void releaseStatement(Statement statement) throws SQLException {
+    getPool().releaseStatement(statement);
+  }
+
+  public void releaseTransactionalStatement(Statement statement) throws SQLException {
+    getPool().releaseTransactionalStatement(statement);
+  }
+
+  public void releaseTransactionalPreparedStatement(PreparedStatement preparedStatement)
+      throws SQLException {
+    getPool().releaseTransactionalPreparedStatement(preparedStatement);
+  }
+
+  public CallableStatement getCallableStatement(String poolName, String strSql) throws Exception {
+    return getPool().getCallableStatement(poolName, strSql);
+  }
+
+  public CallableStatement getCallableStatement(String strSql) throws Exception {
+    return getPool().getCallableStatement(strSql);
+  }
+
+  public CallableStatement getCallableStatement(Connection conn, String strSql) throws SQLException {
+    return getPool().getCallableStatement(conn, strSql);
+  }
+
+  public void releaseCallableStatement(CallableStatement callableStatement) throws SQLException {
+    getPool().releaseCallableStatement(callableStatement);
+  }
+
+  public void destroy() throws Exception {
+    getPool().destroy();
+  }
+
+  public String getStatus() {
+    return getPool().getStatus();
+  }
+}
--- a/src/org/openbravo/erpCommon/ad_callouts/EmailConfiguration_Port.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/EmailConfiguration_Port.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -23,8 +23,6 @@
 
 public class EmailConfiguration_Port extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     String strSmtpConnectionSecurity = info.getStringParameter("inpsmtpconnectionsecurity", null);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/HttpServletCalloutInformationProvider.java	Thu Sep 08 13:20:39 2016 +0200
@@ -0,0 +1,143 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2016 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.mozilla.javascript.NativeArray;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.client.kernel.reference.UIDefinition;
+import org.openbravo.client.kernel.reference.UIDefinitionController;
+import org.openbravo.model.ad.datamodel.Column;
+import org.openbravo.service.json.JsonConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * HttpServletCalloutInformationProvider provides the information that is used to populate the
+ * messages, comboEntries,etc in the FIC. This information is updated by a HttpServlet Callout.
+ * 
+ * @author inigo.sanchez
+ *
+ */
+public class HttpServletCalloutInformationProvider implements CalloutInformationProvider {
+
+  private ArrayList<NativeArray> calloutResult;
+  private int current;
+  private String currentElementName;
+
+  private final Logger log = LoggerFactory.getLogger(HttpServletCalloutInformationProvider.class);
+
+  public HttpServletCalloutInformationProvider(ArrayList<NativeArray> calloutResult) {
+    this.calloutResult = calloutResult;
+    this.current = 0;
+    this.currentElementName = "";
+  }
+
+  @Override
+  public String getCurrentElementName() {
+    return currentElementName;
+  }
+
+  @Override
+  public Object getCurrentElementValue(Object element) {
+    return getValue(element, 1);
+  }
+
+  private Object getValue(Object element, int position) {
+    NativeArray nativeArrayElement = (NativeArray) element;
+    return nativeArrayElement.get(position, null);
+  }
+
+  @Override
+  public Object getNextElement() {
+    NativeArray element = null;
+    if (current < calloutResult.size()) {
+      element = (NativeArray) calloutResult.get(current);
+      current++;
+      // Update current element name
+      currentElementName = (String) element.get(0, null);
+    }
+    return element;
+  }
+
+  @Override
+  public Boolean isComboData(Object element) {
+    if (element instanceof NativeArray) {
+      NativeArray nativeArrayElement = (NativeArray) element;
+      return nativeArrayElement.get(1, null) instanceof NativeArray;
+    }
+    return false;
+  }
+
+  @Override
+  public void manageComboData(Map<String, JSONObject> columnValues, List<String> dynamicCols,
+      List<String> changedCols, RequestContext request, Object element, Column col, String colIdent)
+      throws JSONException {
+    NativeArray subelements = (NativeArray) this.getCurrentElementValue(element);
+    JSONObject jsonobject = new JSONObject();
+    ArrayList<JSONObject> comboEntries = new ArrayList<JSONObject>();
+    // If column is not mandatory, we add an initial blank element
+    if (!col.isMandatory()) {
+      JSONObject entry = new JSONObject();
+      entry.put(JsonConstants.ID, (String) null);
+      entry.put(JsonConstants.IDENTIFIER, (String) null);
+      comboEntries.add(entry);
+    }
+    for (int j = 0; j < subelements.getLength(); j++) {
+      NativeArray subelement = (NativeArray) getValue(subelements, j);
+      if (subelement != null && getValue(subelement, 2) != null) {
+        JSONObject entry = new JSONObject();
+        entry.put(JsonConstants.ID, this.getElementName(subelement));
+        entry.put(JsonConstants.IDENTIFIER, this.getCurrentElementValue(subelement));
+        comboEntries.add(entry);
+        if ((j == 0 && col.isMandatory())
+            || getValue(subelement, 2).toString().equalsIgnoreCase("True")) {
+          // If the column is mandatory, we choose the first value as selected
+          // In any case, we select the one which is marked as selected "true"
+          UIDefinition uiDef = UIDefinitionController.getInstance().getUIDefinition(col.getId());
+          String newValue = this.getElementName(subelement).toString();
+
+          jsonobject.put(CalloutConstants.VALUE, newValue);
+          jsonobject.put(CalloutConstants.CLASSIC_VALUE, uiDef.convertToClassicString(newValue));
+          request.setRequestParameter(colIdent, uiDef.convertToClassicString(newValue));
+          log.debug("Column: {} Value: {}", col.getDBColumnName(), newValue);
+        }
+      }
+    }
+    // If the callout returns a combo, we in any case set the new value with what
+    // the callout returned
+    columnValues.put(colIdent, jsonobject);
+
+    if (dynamicCols.contains(colIdent)) {
+      changedCols.add(col.getDBColumnName());
+    }
+    jsonobject.put(CalloutConstants.ENTRIES, new JSONArray(comboEntries));
+  }
+
+  private Object getElementName(Object element) {
+    NativeArray nativeArrayElement = (NativeArray) element;
+    return nativeArrayElement.get(0, null);
+  }
+}
--- a/src/org/openbravo/erpCommon/ad_callouts/JavaPackageChecker.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/JavaPackageChecker.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2012 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,8 +32,6 @@
  */
 public class JavaPackageChecker extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     String strPackage = info.getStringParameter("inpjavapackage", null);
--- a/src/org/openbravo/erpCommon/ad_callouts/Multiphase_dates.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/Multiphase_dates.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,7 +32,6 @@
 
 public class Multiphase_dates extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private final String PROJECTTASK_TAB = "490";
   private final String PROJECTPHASE_TAB = "478";
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_CalculateExchangeRate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_CalculateExchangeRate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,6 @@
 
 public class SE_CalculateExchangeRate extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final String ADWINDOW_PurchaseInvoice = "183";
   private static final String ADWINDOW_SalesInvoice = "167";
   private static final String ADWINDOW_PaymentOut = "6F8F913FA60F4CBD93DC1D3AA696E76E";
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_DimensionDocBaseType.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_DimensionDocBaseType.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,8 +32,6 @@
 
 public class SE_DimensionDocBaseType extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     final String strDocBaseType = info.getStringParameter("inpdocbasetype", null);
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_DoubtfulDebt_Method.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_DoubtfulDebt_Method.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013 Openbravo SLU
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,8 +26,6 @@
 
 public class SE_DoubtfulDebt_Method extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_ElementValue_AccountSign.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_ElementValue_AccountSign.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,8 +26,6 @@
 
 public class SE_ElementValue_AccountSign extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     final String ACCOUNTSIGN_CREDIT = "C";
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_GLItem_Transaction.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_GLItem_Transaction.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013-2015 Openbravo SLU
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,8 +30,6 @@
 
 public class SE_GLItem_Transaction extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     final String strGLItemId = info.getStringParameter("inpcGlitemId", IsIDFilter.instance);
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_InOut_Organization.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_InOut_Organization.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,8 +26,6 @@
 
 public class SE_InOut_Organization extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     String strIsSOTrx = Utility.getContext(this, info.vars, "isSOTrx", info.getWindowId());
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_InOut_Warehouse.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_InOut_Warehouse.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,8 +27,6 @@
 
 public class SE_InOut_Warehouse extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_AccountingDate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_AccountingDate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,8 +25,6 @@
 
 public class SE_Invoice_AccountingDate extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartnerLocation.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartnerLocation.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2014 Openbravo SLU 
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,7 +27,6 @@
 import org.openbravo.erpCommon.utility.CashVATUtil;
 
 public class SE_Invoice_BPartnerLocation extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N");
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_Organization.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_Organization.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2013-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,7 +27,6 @@
 import org.openbravo.erpCommon.utility.CashVATUtil;
 
 public class SE_Invoice_Organization extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N");
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_TaxDate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_TaxDate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2015 Openbravo SLU
+ * All portions are Copyright (C) 2015-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,8 +26,6 @@
 
 public class SE_Invoice_TaxDate extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Locator_Activate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Locator_Activate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -35,7 +35,6 @@
 import org.openbravo.model.materialmgmt.onhandquantity.StoragePending;
 
 public class SE_Locator_Activate extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   private final String STORAGEBIN_TAB = "178";
   private final String WAREHOUSE_TAB = "177";
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartner.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartner.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2015 Openbravo SLU
+ * All portions are Copyright (C) 2001-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -33,7 +33,6 @@
 import org.openbravo.model.common.businesspartner.BusinessPartner;
 
 public class SE_Order_BPartner extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartnerLocation.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Order_BPartnerLocation.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2014 Openbravo SLU 
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,7 +27,6 @@
 import org.openbravo.erpCommon.utility.CashVATUtil;
 
 public class SE_Order_BPartnerLocation extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N");
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Order_Organization.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Order_Organization.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2013-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,6 @@
 import org.openbravo.erpCommon.utility.Utility;
 
 public class SE_Order_Organization extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N");
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Organization_NotTaxDeductable.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Organization_NotTaxDeductable.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2013 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,7 +27,6 @@
 
 public class SE_Organization_NotTaxDeductable extends SimpleCallout {
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N");
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,8 +26,6 @@
 
 public class SE_PaymentMethod extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_PaymentMethod_FinAccount.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -31,8 +31,6 @@
 
 public class SE_PaymentMethod_FinAccount extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_BPartner.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_BPartner.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2015 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -35,8 +35,6 @@
 
 public class SE_Payment_BPartner extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_FinAccount.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_FinAccount.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  Enterprise Intelligence Systems (http://www.eintel.com.au).
  ************************************************************************
@@ -36,8 +36,6 @@
  */
 public class SE_Payment_FinAccount extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_MultiCurrency.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_MultiCurrency.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -40,7 +40,6 @@
 
 public class SE_Payment_MultiCurrency extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final Logger sePaymentMultiCurrencyLog4j = Logger
       .getLogger(SE_Payment_MultiCurrency.class);
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_Transaction.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Payment_Transaction.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014-2015 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,8 +32,6 @@
 
 public class SE_Payment_Transaction extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     try {
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Sales_Pricelist.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Sales_Pricelist.java	Thu Sep 08 13:20:39 2016 +0200
@@ -20,7 +20,6 @@
 
 import javax.servlet.ServletException;
 
-@SuppressWarnings("serial")
 public class SE_Sales_Pricelist extends SimpleCallout {
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_StatementDate_Transaction.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_StatementDate_Transaction.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2015 Openbravo SLU
+ * All portions are Copyright (C) 2015-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,8 +22,6 @@
 
 public class SE_StatementDate_Transaction extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     try {
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_TaxRate_Withholding.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_TaxRate_Withholding.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2013 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,7 +27,6 @@
 
 public class SE_TaxRate_Withholding extends SimpleCallout {
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N");
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Trxtype_Transaction.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Trxtype_Transaction.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014-2015 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -24,8 +24,6 @@
 
 public class SE_Trxtype_Transaction extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     try {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_AdvPayment_Document.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_AdvPayment_Document.java	Thu Sep 08 13:20:39 2016 +0200
@@ -1,3 +1,21 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2016 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
 package org.openbravo.erpCommon.ad_callouts;
 
 import javax.servlet.ServletException;
@@ -9,8 +27,6 @@
 
 public class SL_AdvPayment_Document extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_BP_Category_Default.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_BP_Category_Default.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,12 +11,11 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
-
 package org.openbravo.erpCommon.ad_callouts;
 
 import java.util.List;
@@ -32,7 +31,6 @@
 import org.openbravo.model.common.enterprise.Organization;
 
 public class SL_BP_Category_Default extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_BPartnerLocation.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_BPartnerLocation.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2015 Openbravo SLU
+ * All portions are Copyright (C) 2015-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -33,7 +33,6 @@
 import org.openbravo.model.common.geography.Location;
 
 public class SL_BPartnerLocation extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static Logger log = Logger.getLogger(SL_BPartnerLocation.class);
 
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N");
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Commission_ListDetails.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Commission_ListDetails.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,8 +22,6 @@
 
 public class SL_Commission_ListDetails extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     String strBasisAmt = info.getStringParameter("inpbasisamt", null);
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_CostAdjustment_DocType.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_CostAdjustment_DocType.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,8 +22,6 @@
 
 public class SL_CostAdjustment_DocType extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     info.addDocumentNo();
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_CostingRule_FixBackdated.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_CostingRule_FixBackdated.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2015 Openbravo SLU
+ * All portions are Copyright (C) 2015-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -24,8 +24,6 @@
 
 public class SL_CostingRule_FixBackdated extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Costing_Currency.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Costing_Currency.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013 Openbravo SLU
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,8 +28,6 @@
 
 public class SL_Costing_Currency extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Depreciate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Depreciate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2012-2013 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,7 +27,6 @@
 import org.openbravo.model.financialmgmt.assetmgmt.AssetGroup;
 
 public class SL_Depreciate extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Product.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InOutLine_Product.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,6 @@
 import org.openbravo.model.common.plm.Product;
 
 public class SL_InOutLine_Product extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InOut_AccountingDate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InOut_AccountingDate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,8 +25,6 @@
 
 public class SL_InOut_AccountingDate extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_AmtUnitCost.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,8 +28,6 @@
 
 public class SL_InvAmtUpd_AmtUnitCost extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     BigDecimal onHandQty = info.getBigDecimalParameter("inponhandqty");
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_DocType.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_DocType.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,8 +22,6 @@
 
 public class SL_InvAmtUpd_DocType extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     info.addDocumentNo();
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_ProductRefDate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_InvAmtUpd_ProductRefDate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014-2015 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -41,8 +41,6 @@
 
 public class SL_InvAmtUpd_ProductRefDate extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     try {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Locator.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Locator.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2009-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -23,7 +23,6 @@
 import org.apache.commons.lang.StringUtils;
 
 public class SL_Inventory_Locator extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Product.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,6 @@
 import org.openbravo.model.common.plm.Product;
 
 public class SL_Inventory_Product extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Journal_MultiAcctSchema.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Journal_MultiAcctSchema.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -21,7 +21,6 @@
 import javax.servlet.ServletException;
 
 public class SL_Journal_MultiAcctSchema extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_DocType.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_DocType.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,8 +22,6 @@
 
 public class SL_LandedCost_DocType extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     info.addDocumentNo();
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_InvoiceLine.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_InvoiceLine.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2014 Openbravo SLU 
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -31,8 +31,6 @@
 
 public class SL_LandedCost_InvoiceLine extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     VariablesSecureApp vars = info.vars;
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_Receipt.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_LandedCost_Receipt.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2014 Openbravo SLU 
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,8 +22,6 @@
 
 public class SL_LandedCost_Receipt extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     info.addResult("inpmInoutlineId", "");
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Movement_Product.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Movement_Product.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,6 @@
 import org.openbravo.model.common.plm.Product;
 
 public class SL_Movement_Product extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Order_UpdateLinesDate.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Order_UpdateLinesDate.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2013 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -33,8 +33,6 @@
 
 public class SL_Order_UpdateLinesDate extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     try {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Preference.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Preference.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2010-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -35,7 +35,6 @@
  */
 public class SL_Preference extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final ValueListFilter booleanFilter = new ValueListFilter("Y", "N", "");
   private static final IsIDFilter idFilter = new IsIDFilter();
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_ProductCh_Characteristic.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_ProductCh_Characteristic.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013 Openbravo SLU
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,7 +26,6 @@
 import org.openbravo.model.common.plm.Characteristic;
 
 public class SL_ProductCh_Characteristic extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
 
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_ProductionPlan_WRPhase_Quantity.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_ProductionPlan_WRPhase_Quantity.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -30,7 +30,6 @@
 
 public class SL_ProductionPlan_WRPhase_Quantity extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final IsIDFilter idFilter = new IsIDFilter();
   private static final NumberFilter numFilter = new NumberFilter();
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Project_Service.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Project_Service.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -19,12 +19,11 @@
 package org.openbravo.erpCommon.ad_callouts;
 
 import java.math.BigDecimal;
+
 import javax.servlet.ServletException;
 
 public class SL_Project_Service extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_RefreshSequenceAndLength.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_RefreshSequenceAndLength.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,7 +25,6 @@
 
 public class SL_RefreshSequenceAndLength extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final RequestFilter filterYesNo = new ValueListFilter("Y", "N", "");
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Reservation.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Reservation.java	Thu Sep 08 13:20:39 2016 +0200
@@ -1,3 +1,21 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2016 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
 package org.openbravo.erpCommon.ad_callouts;
 
 import javax.servlet.ServletException;
@@ -9,8 +27,6 @@
 
 public class SL_Reservation extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     String lastChanged = info.getLastFieldChanged();
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_SequenceProduct_Product_Attribute.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_SequenceProduct_Product_Attribute.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011 Openbravo SLU
+ * All portions are Copyright (C) 2011-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,7 +32,6 @@
 
 public class SL_SequenceProduct_Product_Attribute extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
   private static final IsIDFilter idFilter = new IsIDFilter();
   private static final String specialAttListId = "FF808181322476640132249E3417002F";
   private static final String lotSearchKey = "LOT";
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_StatusFieldDefaults.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_StatusFieldDefaults.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -24,7 +24,6 @@
 import org.apache.log4j.Logger;
 
 public class SL_StatusFieldDefaults extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static Logger logger = Logger.getLogger(SL_StatusFieldDefaults.class);
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_TableTab.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_TableTab.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2014 Openbravo SLU 
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU 
  * All Rights Reserved. 
  ************************************************************************
  */
@@ -30,7 +30,6 @@
  * 
  */
 public class SL_TableTab extends SimpleCallout {
-  private static final long serialVersionUID = 1L;
   private static final String READ_ONLY_UIPATTERN = "RO";
 
   @Override
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_TaxCategory_Org.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_TaxCategory_Org.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2015 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -35,8 +35,6 @@
 
 public class SL_TaxCategory_Org extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
 
--- a/src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SimpleCallout.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,32 +11,31 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.erpCommon.ad_callouts;
 
-import java.io.IOException;
-import java.io.PrintWriter;
 import java.math.BigDecimal;
+import java.util.ArrayList;
 
-import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 
 import org.apache.log4j.Logger;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.filter.IsIDFilter;
 import org.openbravo.base.filter.RegexFilter;
 import org.openbravo.base.filter.RequestFilter;
-import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.client.application.window.servlet.CalloutServletConfig;
+import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.service.db.DalConnectionProvider;
-import org.openbravo.utils.FormatUtilities;
-import org.openbravo.xmlEngine.XmlDocument;
+import org.openbravo.service.json.JsonConstants;
 
 /**
  * This class is used to implement Openbravo ERP servlet callouts in a simple manner.
@@ -52,15 +51,14 @@
  * 
  * </blockquote>
  * <p>
- * In this method you can develop the logic of the callout and use the infoobject of class
+ * In this method you can develop the logic of the callout and use the info object of class
  * <code>CalloutInfo<code/> to access window fields,
  * database and other methods
  * 
  * @author aro
  */
-public abstract class SimpleCallout extends HttpSecureAppServlet {
+public abstract class SimpleCallout extends DelegateConnectionProvider {
 
-  private static final long serialVersionUID = 1L;
   private static Logger log = Logger.getLogger(SimpleCallout.class);
 
   /**
@@ -74,56 +72,29 @@
   protected abstract void execute(CalloutInfo info) throws ServletException;
 
   @Override
-  public void init(ServletConfig config) {
+  public void init(CalloutServletConfig config) {
     super.init(config);
-    boolHist = false;
   }
 
-  @Override
-  public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException,
-      ServletException {
+  /**
+   * This method execute the SimpleCallout operations.
+   * 
+   * @return JSONObject with the values updated by the SimpleCallout.
+   */
+  public JSONObject executeSimpleCallout(RequestContext request) throws ServletException,
+      JSONException {
+    // prepare values for callout
+    VariablesSecureApp vars = new VariablesSecureApp(request.getRequest());
+    CalloutInfo info = new CalloutInfo(vars);
 
-    VariablesSecureApp vars = new VariablesSecureApp(request);
+    try {
+      // execute the callout
+      execute(info);
+    } catch (ServletException ex) {
+      // Error in current SimpleCallout, continue with following callout.
+    }
 
-    if (vars.commandIn("DEFAULT")) {
-      try {
-        printPage(response, vars);
-      } catch (ServletException ex) {
-        pageErrorCallOut(response);
-      }
-    } else {
-      pageError(response);
-    }
-  }
-
-  private void printPage(HttpServletResponse response, VariablesSecureApp vars) throws IOException,
-      ServletException {
-
-    log.debug("Output: dataSheet");
-
-    XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
-        "org/openbravo/erpCommon/ad_callouts/CallOut").createXmlDocument();
-
-    CalloutInfo info = new CalloutInfo(vars, getSimpleClassName(), getServletConfig());
-
-    execute(info);
-
-    xmlDocument.setParameter("array", info.finishResult());
-    xmlDocument.setParameter("frameName", "appFrame");
-    response.setContentType("text/html; charset=UTF-8");
-    PrintWriter out = response.getWriter();
-    out.println(xmlDocument.print());
-    out.close();
-  }
-
-  private String getSimpleClassName() {
-    String classname = getClass().getName();
-    int i = classname.lastIndexOf(".");
-    if (i < 0) {
-      return classname;
-    } else {
-      return classname.substring(i + 1);
-    }
+    return info.getJSONObjectResult();
   }
 
   /**
@@ -131,32 +102,21 @@
    */
   protected static class CalloutInfo {
 
-    private StringBuilder result;
-    private int rescounter;
-    private int selectcounter;
-    private final ServletConfig config;
+    private JSONObject result;
+    private String currentElement;
+    private ArrayList<JSONObject> currentSelectResult;
+
     /**
      * Provides the coder friendly methods to retrieve certain environment, session and servlet call
      * variables.
      */
     public VariablesSecureApp vars;
 
-    private CalloutInfo(VariablesSecureApp vars, String classname, ServletConfig config) {
-      this.config = config;
+    private CalloutInfo(VariablesSecureApp vars) {
       this.vars = vars;
-
-      result = new StringBuilder();
-      result.append("var calloutName='");
-      result.append(classname);
-      result.append("';\nvar respuesta = new Array(");
-
-      rescounter = 0;
-      selectcounter = 0;
-    }
-
-    private String finishResult() {
-      result.append(");");
-      return result.toString();
+      result = new JSONObject();
+      currentElement = null;
+      currentSelectResult = new ArrayList<JSONObject>();
     }
 
     /**
@@ -168,7 +128,6 @@
      *          SimpleCallout instance to invoke
      */
     public void executeCallout(SimpleCallout callout) throws ServletException {
-      callout.init(config);
       callout.execute(this);
     }
 
@@ -202,10 +161,26 @@
      *          The name of the field to get the value.
      * @param filter
      *          Filter used to validate the input against list of allowed inputs.
-     * @return The value of a field named param as an {@code String}.
+     * @return The value of a field named param as an {@code String}. If value is modified
+     *         previously by a parent callout, updated value is returned.
      */
     public String getStringParameter(String param, RequestFilter filter) {
-      return vars.getStringParameter(param, filter);
+      String value = "";
+      try {
+        // if a parent callout modified any value, updated value is returned.
+        if (result.has(param)) {
+          value = result.getJSONObject(param).get(CalloutConstants.CLASSIC_VALUE).toString();
+        } else {
+          value = vars.getStringParameter(param, filter);
+        }
+      } catch (JSONException e) {
+        log.error("Error parsing JSON Object.", e);
+      }
+      return value;
+    }
+
+    public String getStringParameter(String param) {
+      return getStringParameter(param, null);
     }
 
     /**
@@ -226,17 +201,8 @@
      *          The name of the select field to set the values.
      */
     public void addSelect(String param) {
-
-      if (rescounter > 0) {
-        result.append(',');
-      }
-      rescounter++;
-      result.append("\nnew Array(\"");
-      result.append(param);
-      result.append("\", ");
-      result.append("new Array(");
-
-      selectcounter = 0;
+      currentSelectResult = new ArrayList<JSONObject>();
+      currentElement = param;
     }
 
     /**
@@ -262,29 +228,49 @@
      *          Whether this entry field is selected or not.
      */
     public void addSelectResult(String name, String value, boolean selected) {
+      JSONObject entry = new JSONObject();
+      try {
+        entry.put(JsonConstants.ID, name);
+        entry.put(JsonConstants.IDENTIFIER, value);
+        currentSelectResult.add(entry);
 
-      if (selectcounter > 0) {
-        result.append(',');
+        if (selected) {
+          // If value of combo is selected
+          JSONObject valueSelected = new JSONObject();
+          valueSelected.put(CalloutConstants.VALUE, name.toString());
+          valueSelected.put(CalloutConstants.CLASSIC_VALUE, name.toString());
+          result.put(currentElement, valueSelected);
+        }
+      } catch (JSONException e) {
+        log.error("Error parsing JSON Object.", e);
       }
-      selectcounter++;
-      result.append("new Array(\"");
-      result.append(name);
-      result.append("\", \"");
-      result.append(FormatUtilities.replaceJS(value));
-      result.append("\",");
-      result.append(selected ? "\"true\"" : "\"false\"");
-      result.append(")");
     }
 
     /**
-     * Finish the inclusion of values to the select field.
+     * Finish the inclusion of values to the select field and destroy data.
      */
     public void endSelect() {
-      if (selectcounter == 0) {
-        result.append("null");
+      try {
+        // Added an initial blank element
+        if (result.isNull(currentElement)) {
+          ArrayList<JSONObject> blankElement = new ArrayList<JSONObject>();
+          blankElement.add(new JSONObject());
+          blankElement.addAll(currentSelectResult);
+          currentSelectResult = blankElement;
+
+          JSONObject jsonobject = new JSONObject();
+          jsonobject.put(CalloutConstants.ENTRIES, new JSONArray(currentSelectResult));
+          result.put(currentElement, jsonobject);
+        } else {
+          result.getJSONObject(currentElement).accumulate(CalloutConstants.ENTRIES,
+              new JSONArray(currentSelectResult));
+        }
+      } catch (JSONException e) {
+        log.error("Error parsing JSON Object.", e);
       }
-      result.append(")");
-      result.append(")");
+      // reset current elements
+      currentElement = null;
+      currentSelectResult = null;
     }
 
     /**
@@ -294,19 +280,23 @@
      *          The name of the field to get the value.
      * @param value
      *          The value to assign to the field.
+     * @throws JSONException
      */
     public void addResult(String param, Object value) {
+      JSONObject columnValue = new JSONObject();
+      Object strValue = value == null ? "null" : value;
 
-      if (rescounter > 0) {
-        result.append(',');
+      // handle case when callouts are sending us "\"\"" string.
+      if ("\"\"".equals(strValue)) {
+        strValue = "";
       }
-      rescounter++;
-
-      result.append("\nnew Array(\"");
-      result.append(param);
-      result.append("\", ");
-      result.append(value == null ? "null" : value.toString());
-      result.append(")");
+      try {
+        columnValue.put(CalloutConstants.VALUE, strValue);
+        columnValue.put(CalloutConstants.CLASSIC_VALUE, strValue);
+        result.put(param, columnValue);
+      } catch (JSONException e) {
+        log.error("Error parsing JSON Object.", e);
+      }
     }
 
     /**
@@ -317,10 +307,10 @@
      *          The name of the field to get the value.
      * @param value
      *          The value to assign to the field.
+     * @throws JSONException
      */
     public void addResult(String param, String value) {
-      addResult(param, (Object) (value == null ? null : "\"" + FormatUtilities.replaceJS(value)
-          + "\""));
+      addResult(param, (Object) (value == null ? null : value));
     }
 
     /**
@@ -402,5 +392,13 @@
     public String getResult() {
       return result.toString();
     }
+
+    /**
+     * Returns the value of the result variable
+     */
+    public JSONObject getJSONObjectResult() {
+      return result;
+    }
+
   }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_callouts/SimpleCalloutInformationProvider.java	Thu Sep 08 13:20:39 2016 +0200
@@ -0,0 +1,154 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2016 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.erpCommon.ad_callouts;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.model.ad.datamodel.Column;
+import org.openbravo.service.json.JsonConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * SimpleCalloutInformationProvider provides the information that is used to populate the messages,
+ * comboEntries,etc in the FIC. This information is updated by a SimpleCallout.
+ * 
+ * @author inigo.sanchez
+ *
+ */
+public class SimpleCalloutInformationProvider implements CalloutInformationProvider {
+
+  private JSONObject calloutResult;
+  private Iterator<String> keys;
+  private String currentElementName;
+
+  private final Logger log = LoggerFactory.getLogger(SimpleCalloutInformationProvider.class);
+
+  @SuppressWarnings("unchecked")
+  public SimpleCalloutInformationProvider(JSONObject calloutResult) {
+    this.calloutResult = calloutResult;
+    this.keys = this.calloutResult.keys();
+    this.currentElementName = "";
+  }
+
+  @Override
+  public String getCurrentElementName() {
+    return currentElementName;
+  }
+
+  @Override
+  public Object getCurrentElementValue(Object element) {
+    JSONObject json = (JSONObject) element;
+    String value = null;
+    try {
+      value = json.getString(CalloutConstants.CLASSIC_VALUE);
+    } catch (JSONException e) {
+      log.error("Error retrieving value from json {}", json);
+    }
+    return value;
+  }
+
+  @Override
+  public Object getNextElement() {
+    try {
+      if (keys.hasNext()) {
+        currentElementName = keys.next();
+        return calloutResult.getJSONObject(currentElementName);
+      }
+    } catch (JSONException e) {
+      log.error("Error retrieving next element with key {}", currentElementName);
+    }
+    return null;
+  }
+
+  @Override
+  public Boolean isComboData(Object element) {
+    if (element instanceof JSONObject) {
+      JSONObject json = (JSONObject) element;
+      return json.has(CalloutConstants.ENTRIES);
+    }
+    return false;
+  }
+
+  @Override
+  public void manageComboData(Map<String, JSONObject> columnValues, List<String> dynamicCols,
+      List<String> changedCols, RequestContext request, Object element, Column col, String colIdent)
+      throws JSONException {
+    JSONObject firstComboEntry = new JSONObject();
+    JSONObject entry = (JSONObject) element;
+    JSONArray entryValues = entry.getJSONArray(CalloutConstants.ENTRIES);
+    ArrayList<JSONObject> newJsonArr = new ArrayList<JSONObject>();
+    JSONObject comboEntry = null;
+
+    if (!entry.has(CalloutConstants.COMBO_SELECTED_VALUE)) {
+      // If it is not mandatory and first value is not empty, we add an initial blank element
+      if (!col.isMandatory()
+          && (entryValues.length() == 0 || !entryValues.getJSONObject(0).isNull(JsonConstants.ID))) {
+        comboEntry = new JSONObject();
+        comboEntry.put(JsonConstants.ID, (String) null);
+        comboEntry.put(JsonConstants.IDENTIFIER, (String) null);
+        newJsonArr.add(comboEntry);
+      }
+
+      // As we do not have selected value information in the entry, select the first element. For
+      // not mandatory columns, this will be a blank element.
+      if (newJsonArr.size() > 0 && newJsonArr.get(0).has(JsonConstants.ID)) {
+        // create element with selected value
+        String selectedValue = newJsonArr.get(0).getString(JsonConstants.ID);
+        firstComboEntry.put(CalloutConstants.VALUE, selectedValue);
+        firstComboEntry.put(CalloutConstants.CLASSIC_VALUE, selectedValue);
+      }
+
+    } else {
+      // selected value is chosen
+      firstComboEntry.put(CalloutConstants.VALUE, entry.getString(CalloutConstants.VALUE));
+      firstComboEntry.put(CalloutConstants.CLASSIC_VALUE,
+          entry.getString(CalloutConstants.CLASSIC_VALUE));
+    }
+
+    // Added all combo entries
+    for (int i = 0; i < entryValues.length(); i++) {
+      comboEntry = entryValues.getJSONObject(i);
+      newJsonArr.add(comboEntry);
+    }
+
+    // added this new value and set parameter into request
+    if (firstComboEntry.has(CalloutConstants.CLASSIC_VALUE)) {
+      request.setRequestParameter((String) this.getCurrentElementName(),
+          firstComboEntry.getString(CalloutConstants.CLASSIC_VALUE));
+    }
+
+    columnValues.put(colIdent, firstComboEntry);
+
+    if (dynamicCols.contains((String) this.getCurrentElementName())) {
+      changedCols.add(col.getDBColumnName());
+    }
+
+    if (entry.has(CalloutConstants.ENTRIES)) {
+      firstComboEntry.put(CalloutConstants.ENTRIES, newJsonArr);
+    }
+  }
+}
--- a/src/org/openbravo/erpCommon/ad_callouts/SysInfoCustomAllowed.java	Thu Sep 08 13:09:34 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SysInfoCustomAllowed.java	Thu Sep 08 13:20:39 2016 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -41,8 +41,6 @@
  */
 public class SysInfoCustomAllowed extends SimpleCallout {
 
-  private static final long serialVersionUID = 1L;
-
   @Override
   protected void execute(CalloutInfo info) throws ServletException {
     boolean customAllowed = info.getStringParameter("inpcustomizationAllowed",