[DMI] merge from main repo
authorGuillermo Alvarez de Eulate <guillermo.alvarez@openbravo.com>
Thu, 16 May 2019 17:03:52 +0200
changeset 35797 668e3c8609c4
parent 35796 df96ff60c3c4 (current diff)
parent 35789 b82519cbc5e9 (diff)
child 35798 6a3c5d03c3ef
[DMI] merge from main repo
lib/runtime/xstream-1.3.1.jar
--- a/legal/Licensing.txt	Tue May 14 00:54:35 2019 +0200
+++ b/legal/Licensing.txt	Thu May 16 17:03:52 2019 +0200
@@ -123,9 +123,6 @@
 # postgresql-42.2.2.jre7.jar
 Under the BSD license, also available at http://jdbc.postgresql.org/license.html  
 
-# xstream-1.3.1.jar
-Under a modified BSD license available at http://xstream.codehaus.org/license.html
-
 # Dojo Foundation javascripts in web/js/dojo/
 All files under the Academic Free License 2.1 (license available at
 http://opensource.org/licenses/afl-2.1.php)
Binary file lib/runtime/xstream-1.3.1.jar has changed
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_ISPAYMENTCONFIRMED.xml	Tue May 14 00:54:35 2019 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_ISPAYMENTCONFIRMED.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION APRM_ISPAYMENTCONFIRMED">
-    <function name="APRM_ISPAYMENTCONFIRMED" type="VARCHAR">
+    <function name="APRM_ISPAYMENTCONFIRMED" type="VARCHAR" volatility="STABLE">
       <parameter name="status" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2011-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNOINVPAIDSTATUS.xml	Tue May 14 00:54:35 2019 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNOINVPAIDSTATUS.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION APRM_SEQNOINVPAIDSTATUS">
-    <function name="APRM_SEQNOINVPAIDSTATUS" type="VARCHAR">
+    <function name="APRM_SEQNOINVPAIDSTATUS" type="VARCHAR" volatility="STABLE">
       <parameter name="p_paymentmethod_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2015-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml	Tue May 14 00:54:35 2019 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_SEQNUMBERPAYMENTSTATUS.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION APRM_SEQNUMBERPAYMENTSTATUS">
-    <function name="APRM_SEQNUMBERPAYMENTSTATUS" type="VARCHAR">
+    <function name="APRM_SEQNUMBERPAYMENTSTATUS" type="VARCHAR" volatility="STABLE">
       <parameter name="status" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2014-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-datetime.js	Tue May 14 00:54:35 2019 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-datetime.js	Thu May 16 17:03:52 2019 +0200
@@ -281,25 +281,28 @@
 // It has the value of the current selected date at 00:00:00
 isc.ClassFactory.defineClass('OBDateTimeFromDateItem', isc.OBDateTimeItem);
 
-// == OBDateItem properties ==
+// == OBDateTimeFromDateItem properties ==
 isc.OBDateTimeFromDateItem.addProperties({
   showTime: false,
-  fixedTime: '00:00:00'
+  fixedTime: '00:00:00',
+  pickerDataChanged: function (picker) {
+    if (picker.chosenDate && picker.chosenDate.logicalDate) {
+      // The picker is returning a logical date because this class is defined to not show the time
+      // Remove the logicalDate flag because the value to be saved should be a datetime value
+      delete picker.chosenDate.logicalDate;
+    }
+    this.Super('pickerDataChanged', arguments);
+  }
 });
 
 // == OBDateTimeToDateItem ==
-// OBDateTimeToDateItem inherits from OBDateTimeItem
+// OBDateTimeToDateItem inherits from OBDateTimeFromDateItem
 // It has the value of the next day of the selected date at 00:00:00
-isc.ClassFactory.defineClass('OBDateTimeToDateItem', isc.OBDateTimeItem);
+// Note that the logic to calculate the next day is not implemented here
+// For the moment, that logic should be implemented where needed
+isc.ClassFactory.defineClass('OBDateTimeToDateItem', isc.OBDateTimeFromDateItem);
 
-// == OBDateItem properties ==
-isc.OBDateTimeToDateItem.addProperties({
-  showTime: false,
-  fixedTime: '00:00:00'
-});
-
-
-// == OBDateTimeToDateItem ==
+// == OBAbsoluteDateTimeItem ==
 // OBAbsoluteDateTimeItem inherits from OBDateTimeItem
 // It displays the received date and send to the backend the modified one "as it is". So there is no any kind of UTC conversion.
 isc.ClassFactory.defineClass('OBAbsoluteDateTimeItem', isc.OBDateTimeItem);
--- a/src-db/database/model/functions/AD_COLUMN_IDENTIFIER.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_COLUMN_IDENTIFIER.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_COLUMN_IDENTIFIER">
-    <function name="AD_COLUMN_IDENTIFIER" type="VARCHAR">
+    <function name="AD_COLUMN_IDENTIFIER" type="VARCHAR" volatility="STABLE">
       <parameter name="p_tablename" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_COLUMN_IDENTIFIER_REF_SQL.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_COLUMN_IDENTIFIER_REF_SQL">
-    <function name="AD_COLUMN_IDENTIFIER_REF_SQL" type="VARCHAR">
+    <function name="AD_COLUMN_IDENTIFIER_REF_SQL" type="VARCHAR" volatility="STABLE">
       <parameter name="p_tableref" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -28,7 +28,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_COLUMN_IDENTIFIER_SQL.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_COLUMN_IDENTIFIER_SQL">
-    <function name="AD_COLUMN_IDENTIFIER_SQL" type="VARCHAR">
+    <function name="AD_COLUMN_IDENTIFIER_SQL" type="VARCHAR" volatility="STABLE">
       <parameter name="p_tablename" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_COLUMN_IDENTIFIER_STD.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_COLUMN_IDENTIFIER_STD.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_COLUMN_IDENTIFIER_STD">
-    <function name="AD_COLUMN_IDENTIFIER_STD" type="VARCHAR">
+    <function name="AD_COLUMN_IDENTIFIER_STD" type="VARCHAR" volatility="STABLE">
       <parameter name="p_tablename" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_DBA_USER_CONST_SEARCHCOND.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_DBA_USER_CONST_SEARCHCOND.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_DBA_USER_CONST_SEARCHCOND">
-    <function name="AD_DBA_USER_CONST_SEARCHCOND" type="VARCHAR">
+    <function name="AD_DBA_USER_CONST_SEARCHCOND" type="VARCHAR" volatility="STABLE">
       <parameter name="p_constraintname" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_DOCTYPE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_DOCTYPE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_DOCTYPE">
-    <function name="AD_GET_DOCTYPE" type="VARCHAR">
+    <function name="AD_GET_DOCTYPE" type="VARCHAR" volatility="STABLE">
       <parameter name="p_clientid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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-2011 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_DOCTYPE_EXPENSES.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_DOCTYPE_EXPENSES.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_DOCTYPE_EXPENSES">
-    <function name="AD_GET_DOCTYPE_EXPENSES" type="VARCHAR">
+    <function name="AD_GET_DOCTYPE_EXPENSES" type="VARCHAR" volatility="STABLE">
       <parameter name="p_clientid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_DOC_LE_BU.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_DOC_LE_BU.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_DOC_LE_BU">
-    <function name="AD_GET_DOC_LE_BU" type="VARCHAR">
+    <function name="AD_GET_DOC_LE_BU" type="VARCHAR" volatility="STABLE">
       <parameter name="p_header_table" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_LEVEL_NODE_TREE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_LEVEL_NODE_TREE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_LEVEL_NODE_TREE">
-    <function name="AD_GET_LEVEL_NODE_TREE" type="NUMERIC">
+    <function name="AD_GET_LEVEL_NODE_TREE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_tree_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_NODE_TREE_BYLEVEL.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_NODE_TREE_BYLEVEL.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_NODE_TREE_BYLEVEL">
-    <function name="AD_GET_NODE_TREE_BYLEVEL" type="VARCHAR">
+    <function name="AD_GET_NODE_TREE_BYLEVEL" type="VARCHAR" volatility="STABLE">
       <parameter name="p_tree_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_ORG_LE_BU.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_ORG_LE_BU.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_ORG_LE_BU">
-    <function name="AD_GET_ORG_LE_BU" type="VARCHAR">
+    <function name="AD_GET_ORG_LE_BU" type="VARCHAR" volatility="STABLE">
       <parameter name="p_org_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2012-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_ORG_LE_BU_TREENODE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_ORG_LE_BU_TREENODE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_ORG_LE_BU_TREENODE">
-    <function name="AD_GET_ORG_LE_BU_TREENODE" type="VARCHAR">
+    <function name="AD_GET_ORG_LE_BU_TREENODE" type="VARCHAR" volatility="STABLE">
       <parameter name="p_org_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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) 2018 Openbravo SLU
+* All portions are Copyright (C) 2018-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_GET_PREFERENCE_VALUE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_GET_PREFERENCE_VALUE">
-    <function name="AD_GET_PREFERENCE_VALUE" type="NVARCHAR">
+    <function name="AD_GET_PREFERENCE_VALUE" type="NVARCHAR" volatility="STABLE">
       <parameter name="p_property_name" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -34,7 +34,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ISJAVASCRIPTWORD.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ISJAVASCRIPTWORD.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ISJAVASCRIPTWORD">
-    <function name="AD_ISJAVASCRIPTWORD" type="CHAR">
+    <function name="AD_ISJAVASCRIPTWORD" type="CHAR" volatility="IMMUTABLE">
       <parameter name="word" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ISJAVAWORD.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ISJAVAWORD.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ISJAVAWORD">
-    <function name="AD_ISJAVAWORD" type="CHAR">
+    <function name="AD_ISJAVAWORD" type="CHAR" volatility="IMMUTABLE">
       <parameter name="word" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2010 Openbravo SLU
+* All portions are Copyright (C) 2009-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ISMEMBERINCLUDED.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ISMEMBERINCLUDED.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ISMEMBERINCLUDED">
-    <function name="AD_ISMEMBERINCLUDED" type="NUMERIC">
+    <function name="AD_ISMEMBERINCLUDED" type="NUMERIC" volatility="STABLE">
       <parameter name="p_nodeid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ISORGINCLUDED.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ISORGINCLUDED.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ISORGINCLUDED">
-    <function name="AD_ISORGINCLUDED" type="NUMERIC">
+    <function name="AD_ISORGINCLUDED" type="NUMERIC" volatility="STABLE">
       <parameter name="p_orgid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2017 Openbravo SLU
+* All portions are Copyright (C) 2017-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ISORGINCLUDED_TREENODE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ISORGINCLUDED_TREENODE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ISORGINCLUDED_TREENODE">
-    <function name="AD_ISORGINCLUDED_TREENODE" type="NUMERIC">
+    <function name="AD_ISORGINCLUDED_TREENODE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_orgid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_MAPPING_FORMAT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_MAPPING_FORMAT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_MAPPING_FORMAT">
-    <function name="AD_MAPPING_FORMAT" type="VARCHAR">
+    <function name="AD_MAPPING_FORMAT" type="VARCHAR" volatility="IMMUTABLE">
       <parameter name="p_str" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_MESSAGE_GET2.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_MESSAGE_GET2.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_MESSAGE_GET2">
-    <function name="AD_MESSAGE_GET2" type="NVARCHAR">
+    <function name="AD_MESSAGE_GET2" type="NVARCHAR" volatility="STABLE">
       <parameter name="p_value" type="NVARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2008 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_MODULE_CHECKED.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_MODULE_CHECKED.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_MODULE_CHECKED">
-    <function name="AD_MODULE_CHECKED" type="VARCHAR">
+    <function name="AD_MODULE_CHECKED" type="VARCHAR" volatility="IMMUTABLE">
       <parameter name="p_module_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_MODULE_DEPENDENT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_MODULE_DEPENDENT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_MODULE_DEPENDENT">
-    <function name="AD_MODULE_DEPENDENT" type="CHAR">
+    <function name="AD_MODULE_DEPENDENT" type="CHAR" volatility="STABLE">
       <parameter name="p_childmodule_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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) 2008 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_MODULE_IDENTIFIER.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_MODULE_IDENTIFIER.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_MODULE_IDENTIFIER">
-    <function name="AD_MODULE_IDENTIFIER" type="VARCHAR">
+    <function name="AD_MODULE_IDENTIFIER" type="VARCHAR" volatility="STABLE">
       <parameter name="p_module_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ORGTYPE_ISLE_ISBU.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORGTYPE_ISLE_ISBU.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORGTYPE_ISLE_ISBU">
-    <function name="AD_ORGTYPE_ISLE_ISBU" type="NUMERIC">
+    <function name="AD_ORGTYPE_ISLE_ISBU" type="NUMERIC" volatility="STABLE">
       <body><![CDATA[/*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
@@ -13,7 +13,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-2014 Openbravo SLU
+* All portions are Copyright (C) 2009-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ORGTYPE_ISTRANS_ALLOWED.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORGTYPE_ISTRANS_ALLOWED.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORGTYPE_ISTRANS_ALLOWED">
-    <function name="AD_ORGTYPE_ISTRANS_ALLOWED" type="NUMERIC">
+    <function name="AD_ORGTYPE_ISTRANS_ALLOWED" type="NUMERIC" volatility="STABLE">
       <body><![CDATA[/*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
@@ -13,7 +13,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) 2008-2014 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/      
--- a/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_CHK_CALENDAR">
-    <function name="AD_ORG_CHK_CALENDAR" type="NUMERIC">
+    <function name="AD_ORG_CHK_CALENDAR" type="NUMERIC" volatility="STABLE">
       <body><![CDATA[/*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
@@ -13,7 +13,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) 2008-2017 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/      
--- a/src-db/database/model/functions/AD_ORG_CHK_READY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_CHK_READY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_CHK_READY">
-    <function name="AD_ORG_CHK_READY" type="NUMERIC">
+    <function name="AD_ORG_CHK_READY" type="NUMERIC" volatility="STABLE">
       <parameter name="p_ad_org_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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) 2008-2015 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ORG_CHK_SCHEMAS.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_CHK_SCHEMAS.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_CHK_SCHEMAS">
-    <function name="AD_ORG_CHK_SCHEMAS" type="NUMERIC">
+    <function name="AD_ORG_CHK_SCHEMAS" type="NUMERIC" volatility="STABLE">
       <body><![CDATA[/*************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
@@ -13,7 +13,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) 2008-2014 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/      
--- a/src-db/database/model/functions/AD_ORG_GETCALENDAROWNER.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_GETCALENDAROWNER.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_GETCALENDAROWNER">
-    <function name="AD_ORG_GETCALENDAROWNER" type="VARCHAR">
+    <function name="AD_ORG_GETCALENDAROWNER" type="VARCHAR" volatility="STABLE">
       <parameter name="p_organization" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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) 2008-2018 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ORG_GETCALENDAROWNERTN.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_GETCALENDAROWNERTN.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_GETCALENDAROWNERTN">
-    <function name="AD_ORG_GETCALENDAROWNERTN" type="VARCHAR">
+    <function name="AD_ORG_GETCALENDAROWNERTN" type="VARCHAR" volatility="STABLE">
       <parameter name="p_organization" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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) 2008-2018 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOW.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_GETPERIODCONTROLALLOW">
-    <function name="AD_ORG_GETPERIODCONTROLALLOW" type="VARCHAR">
+    <function name="AD_ORG_GETPERIODCONTROLALLOW" type="VARCHAR" volatility="STABLE">
       <parameter name="p_organization" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2009-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOWTN.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_GETPERIODCONTROLALLOWTN.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_GETPERIODCONTROLALLOWTN">
-    <function name="AD_ORG_GETPERIODCONTROLALLOWTN" type="VARCHAR">
+    <function name="AD_ORG_GETPERIODCONTROLALLOWTN" type="VARCHAR" volatility="STABLE">
       <parameter name="p_organization" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2009-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_ORG_ISINNATURALTREE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_ORG_ISINNATURALTREE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_ORG_ISINNATURALTREE">
-    <function name="AD_ORG_ISINNATURALTREE" type="VARCHAR">
+    <function name="AD_ORG_ISINNATURALTREE" type="VARCHAR" volatility="STABLE">
       <parameter name="p_orga" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_PARENT_MENU_ELEMENT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_PARENT_MENU_ELEMENT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_PARENT_MENU_ELEMENT">
-    <function name="AD_PARENT_MENU_ELEMENT" type="VARCHAR">
+    <function name="AD_PARENT_MENU_ELEMENT" type="VARCHAR" volatility="STABLE">
       <parameter name="p_nodeid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/AD_PARENT_TREE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/AD_PARENT_TREE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION AD_PARENT_TREE">
-    <function name="AD_PARENT_TREE" type="VARCHAR">
+    <function name="AD_PARENT_TREE" type="VARCHAR" volatility="STABLE">
       <parameter name="p_tree_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_ADD_MONTHS2.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_ADD_MONTHS2.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_ADD_MONTHS2">
-    <function name="C_ADD_MONTHS2" type="TIMESTAMP">
+    <function name="C_ADD_MONTHS2" type="TIMESTAMP" volatility="IMMUTABLE">
       <parameter name="pdate" type="TIMESTAMP" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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) 2007 Openbravo SLU
+* All portions are Copyright (C) 2007-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_AGING_GET_SCOPE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_AGING_GET_SCOPE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_AGING_GET_SCOPE">
-    <function name="C_AGING_GET_SCOPE" type="NUMERIC">
+    <function name="C_AGING_GET_SCOPE" type="NUMERIC" volatility="STABLE">
       <parameter name="pdate" type="TIMESTAMP" mode="in">
         <default/>
       </parameter>
@@ -28,7 +28,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) 2008-2016 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_BASE_CONVERT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_BASE_CONVERT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_BASE_CONVERT">
-    <function name="C_BASE_CONVERT" type="NUMERIC">
+    <function name="C_BASE_CONVERT" type="NUMERIC" volatility="STABLE">
       <parameter name="p_amount" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -31,7 +31,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/C_CALCULATECOST_CATSALARY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CALCULATECOST_CATSALARY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CALCULATECOST_CATSALARY">
-    <function name="C_CALCULATECOST_CATSALARY" type="NUMERIC">
+    <function name="C_CALCULATECOST_CATSALARY" type="NUMERIC" volatility="STABLE">
       <parameter name="pcatsal" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2008 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_CALCULATE_CATSALARY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CALCULATE_CATSALARY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CALCULATE_CATSALARY">
-    <function name="C_CALCULATE_CATSALARY" type="VARCHAR">
+    <function name="C_CALCULATE_CATSALARY" type="VARCHAR" volatility="STABLE">
       <parameter name="pcbpartner" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2008 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_CHK_OPEN_PERIOD.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CHK_OPEN_PERIOD.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CHK_OPEN_PERIOD">
-    <function name="C_CHK_OPEN_PERIOD" type="NUMERIC">
+    <function name="C_CHK_OPEN_PERIOD" type="NUMERIC" volatility="STABLE">
       <parameter name="p_orgid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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 Openbravo SLU
+* All portions are Copyright (C) 2009-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_CHK_OPEN_PERIOD_GLJ.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CHK_OPEN_PERIOD_GLJ.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CHK_OPEN_PERIOD_GLJ">
-    <function name="C_CHK_OPEN_PERIOD_GLJ" type="NUMERIC">
+    <function name="C_CHK_OPEN_PERIOD_GLJ" type="NUMERIC" volatility="STABLE">
       <parameter name="p_orgid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_CONVERT_DOC_CURRENCY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CONVERT_DOC_CURRENCY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CONVERT_DOC_CURRENCY">
-    <function name="C_CONVERT_DOC_CURRENCY" type="NUMERIC">
+    <function name="C_CONVERT_DOC_CURRENCY" type="NUMERIC" volatility="STABLE">
       <parameter name="p_amount" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -40,7 +40,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2011-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_CURRENCY_CONVERT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_CONVERT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_CONVERT">
-    <function name="C_CURRENCY_CONVERT" type="NUMERIC">
+    <function name="C_CURRENCY_CONVERT" type="NUMERIC" volatility="STABLE">
       <parameter name="p_amount" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -37,7 +37,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2018 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/C_CURRENCY_CONVERT0.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_CONVERT0.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_CONVERT0">
-    <function name="C_CURRENCY_CONVERT0" type="NUMERIC">
+    <function name="C_CURRENCY_CONVERT0" type="NUMERIC" volatility="STABLE">
       <parameter name="p_amount" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -37,7 +37,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2009 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/C_CURRENCY_CONVERT_PRECISION.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_CONVERT_PRECISION.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_CONVERT_PRECISION">
-    <function name="C_CURRENCY_CONVERT_PRECISION" type="NUMERIC">
+    <function name="C_CURRENCY_CONVERT_PRECISION" type="NUMERIC" volatility="STABLE">
       <parameter name="p_amount" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -37,7 +37,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-2018 Openbravo SLU
+ * All portions are Copyright (C) 2010-2019 Openbravo SLU
  * All Rights Reserved.
 ************************************************************************/
   v_Rate NUMBER;
--- a/src-db/database/model/functions/C_CURRENCY_CONVERT_RATE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_CONVERT_RATE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_CONVERT_RATE">
-    <function name="C_CURRENCY_CONVERT_RATE" type="NUMERIC">
+    <function name="C_CURRENCY_CONVERT_RATE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_amount" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -37,7 +37,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-2018 Openbravo SLU
+ * All portions are Copyright (C) 2012-2019 Openbravo SLU
  * All Rights Reserved.
 ************************************************************************/
 
--- a/src-db/database/model/functions/C_CURRENCY_ISOSYM.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_ISOSYM.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_ISOSYM">
-    <function name="C_CURRENCY_ISOSYM" type="VARCHAR">
+    <function name="C_CURRENCY_ISOSYM" type="VARCHAR" volatility="STABLE">
       <parameter name="p_currency_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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) 2008 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 
--- a/src-db/database/model/functions/C_CURRENCY_RATE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_RATE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_RATE">
-    <function name="C_CURRENCY_RATE" type="NUMERIC">
+    <function name="C_CURRENCY_RATE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_curfrom_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -34,7 +34,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2018 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/C_CURRENCY_ROUND.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_ROUND.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_ROUND">
-    <function name="C_CURRENCY_ROUND" type="NUMERIC">
+    <function name="C_CURRENCY_ROUND" type="NUMERIC" volatility="STABLE">
       <parameter name="p_amount" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/C_CURRENCY_SYMBOL.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_CURRENCY_SYMBOL.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_CURRENCY_SYMBOL">
-    <function name="C_CURRENCY_SYMBOL" type="VARCHAR">
+    <function name="C_CURRENCY_SYMBOL" type="VARCHAR" volatility="STABLE">
       <parameter name="p_currency_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2008 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 
--- a/src-db/database/model/functions/C_DATEDAYINMONTH.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_DATEDAYINMONTH.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_DATEDAYINMONTH">
-    <function name="C_DATEDAYINMONTH" type="TIMESTAMP">
+    <function name="C_DATEDAYINMONTH" type="TIMESTAMP" volatility="IMMUTABLE">
       <parameter name="p_day" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_DB_PERCENTAGE_PAID.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_DB_PERCENTAGE_PAID.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_DB_PERCENTAGE_PAID">
-    <function name="C_DB_PERCENTAGE_PAID" type="NUMERIC">
+    <function name="C_DB_PERCENTAGE_PAID" type="NUMERIC" volatility="STABLE">
       <parameter name="p_debt_payment_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2016 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_DEBT_PAYMENT_PAID.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_DEBT_PAYMENT_PAID.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_DEBT_PAYMENT_PAID">
-    <function name="C_DEBT_PAYMENT_PAID" type="CHAR">
+    <function name="C_DEBT_PAYMENT_PAID" type="CHAR" volatility="STABLE">
       <parameter name="p_debtpaymentid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_DEBT_PAYMENT_STATUS.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_DEBT_PAYMENT_STATUS.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_DEBT_PAYMENT_STATUS">
-    <function name="C_DEBT_PAYMENT_STATUS" type="CHAR">
+    <function name="C_DEBT_PAYMENT_STATUS" type="CHAR" volatility="IMMUTABLE">
       <parameter name="p_settlement_cancel_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -34,7 +34,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_DEBT_PAYMENT_STATUS0.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_DEBT_PAYMENT_STATUS0.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_DEBT_PAYMENT_STATUS0">
-    <function name="C_DEBT_PAYMENT_STATUS0" type="CHAR">
+    <function name="C_DEBT_PAYMENT_STATUS0" type="CHAR" volatility="STABLE">
       <parameter name="p_debt_payment_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_DIVIDE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_DIVIDE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_DIVIDE">
-    <function name="C_DIVIDE" type="NUMERIC">
+    <function name="C_DIVIDE" type="NUMERIC" volatility="IMMUTABLE">
       <parameter name="p_dividendo" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GETBPLOCATIONID.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GETBPLOCATIONID.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GETBPLOCATIONID">
-    <function name="C_GETBPLOCATIONID" type="VARCHAR">
+    <function name="C_GETBPLOCATIONID" type="VARCHAR" volatility="STABLE">
       <parameter name="p_bpartnerid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2009 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GETINVOICELINE_TAXAMOUNT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GETINVOICELINE_TAXAMOUNT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GETINVOICELINE_TAXAMOUNT">
-    <function name="C_GETINVOICELINE_TAXAMOUNT" type="NUMERIC">
+    <function name="C_GETINVOICELINE_TAXAMOUNT" type="NUMERIC" volatility="STABLE">
       <parameter name="p_invoiceline" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,7 @@
 * under the License.
 * The Original Code is Openbravo ERP.
 * The Initial Developer of the Original Code is Openbravo SL
-* All portions are Copyright (C) 2010 Openbravo SL
+* All portions are Copyright (C) 2010-2019 Openbravo SL
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GETINVOICESTATUSFROMSHIPMENT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GETINVOICESTATUSFROMSHIPMENT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GETINVOICESTATUSFROMSHIPMENT">
-    <function name="C_GETINVOICESTATUSFROMSHIPMENT" type="NUMERIC">
+    <function name="C_GETINVOICESTATUSFROMSHIPMENT" type="NUMERIC" volatility="STABLE">
       <parameter name="p_minoutid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
--- a/src-db/database/model/functions/C_GETTAX.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GETTAX.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GETTAX">
-    <function name="C_GETTAX" type="VARCHAR">
+    <function name="C_GETTAX" type="VARCHAR" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
--- a/src-db/database/model/functions/C_GETWITHHOLDING.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GETWITHHOLDING.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GETWITHHOLDING">
-    <function name="C_GETWITHHOLDING" type="NUMERIC">
+    <function name="C_GETWITHHOLDING" type="NUMERIC" volatility="STABLE">
       <parameter name="id_invoice_in" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  _Francesco Finamore_______________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GET_CURRENCY_PRECISION.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_CURRENCY_PRECISION.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_CURRENCY_PRECISION">
-    <function name="C_GET_CURRENCY_PRECISION" type="NUMERIC">
+    <function name="C_GET_CURRENCY_PRECISION" type="NUMERIC" volatility="STABLE">
       <parameter name="p_curto_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2018 Openbravo SLU
+ * All portions are Copyright (C) 2010-2019 Openbravo SLU
  * All Rights Reserved.
 *************************************************************************
 ****
--- a/src-db/database/model/functions/C_GET_DEFAULT_PERIOD.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_DEFAULT_PERIOD.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_DEFAULT_PERIOD">
-    <function name="C_GET_DEFAULT_PERIOD" type="VARCHAR">
+    <function name="C_GET_DEFAULT_PERIOD" type="VARCHAR" volatility="STABLE">
       <parameter name="p_invoice" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2012-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GET_IBAN_DISPLAYED_ACCOUNT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_IBAN_DISPLAYED_ACCOUNT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_IBAN_DISPLAYED_ACCOUNT">
-    <function name="C_GET_IBAN_DISPLAYED_ACCOUNT" type="NVARCHAR">
+    <function name="C_GET_IBAN_DISPLAYED_ACCOUNT" type="NVARCHAR" volatility="STABLE">
       <parameter name="p_iban" type="NVARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2016 Openbravo SLU
+ * All portions are Copyright (C) 2012-2019 Openbravo SLU
  * All Rights Reserved.
 *************************************************************************
 ****
--- a/src-db/database/model/functions/C_GET_ISOWEEK_DAY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_ISOWEEK_DAY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_ISOWEEK_DAY">
-    <function name="C_GET_ISOWEEK_DAY" type="NUMERIC">
+    <function name="C_GET_ISOWEEK_DAY" type="NUMERIC" volatility="IMMUTABLE">
       <parameter name="p_date" type="TIMESTAMP" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2019 Openbravo SLU
  * All Rights Reserved.
 *************************************************************************/
 BEGIN
--- a/src-db/database/model/functions/C_GET_NET_AMOUNT_FROM_GROSS.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_NET_AMOUNT_FROM_GROSS.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_NET_AMOUNT_FROM_GROSS">
-    <function name="C_GET_NET_AMOUNT_FROM_GROSS" type="NUMERIC">
+    <function name="C_GET_NET_AMOUNT_FROM_GROSS" type="NUMERIC" volatility="STABLE">
       <parameter name="p_tax_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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) 2017-2018 Openbravo SLU
+* All portions are Copyright (C) 2017-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GET_NET_PRICE_FROM_GROSS.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_NET_PRICE_FROM_GROSS.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_NET_PRICE_FROM_GROSS">
-    <function name="C_GET_NET_PRICE_FROM_GROSS" type="NUMERIC">
+    <function name="C_GET_NET_PRICE_FROM_GROSS" type="NUMERIC" volatility="STABLE">
       <parameter name="p_tax_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -28,7 +28,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2012-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GET_PRODUCT_TAXCATEGORY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_PRODUCT_TAXCATEGORY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_PRODUCT_TAXCATEGORY">
-    <function name="C_GET_PRODUCT_TAXCATEGORY" type="VARCHAR">
+    <function name="C_GET_PRODUCT_TAXCATEGORY" type="VARCHAR" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -28,7 +28,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GET_SERVICE_AMOUNT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_SERVICE_AMOUNT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_SERVICE_AMOUNT">
-    <function name="C_GET_SERVICE_AMOUNT" type="NUMERIC">
+    <function name="C_GET_SERVICE_AMOUNT" type="NUMERIC" volatility="STABLE">
       <parameter name="v_c_orderline_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_GET_TAX_AMT_FROM_NET.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_GET_TAX_AMT_FROM_NET.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_GET_TAX_AMT_FROM_NET">
-    <function name="C_GET_TAX_AMT_FROM_NET" type="NUMERIC">
+    <function name="C_GET_TAX_AMT_FROM_NET" type="NUMERIC" volatility="STABLE">
       <parameter name="p_tax_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -28,7 +28,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-2018 Openbravo SLU
+* All portions are Copyright (C) 2012-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_IGNORE_ACCENT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_IGNORE_ACCENT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_IGNORE_ACCENT">
-    <function name="C_IGNORE_ACCENT" type="VARCHAR">
+    <function name="C_IGNORE_ACCENT" type="VARCHAR" volatility="IMMUTABLE">
       <parameter name="v_str" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2008 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_INVOICELINE_TAX.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_INVOICELINE_TAX.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_INVOICELINE_TAX">
-    <function name="C_INVOICELINE_TAX" type="NUMERIC">
+    <function name="C_INVOICELINE_TAX" type="NUMERIC" volatility="STABLE">
       <parameter name="p_invoiceline_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  _______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_INVOICETODATE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_INVOICETODATE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_INVOICETODATE">
-    <function name="C_INVOICETODATE" type="TIMESTAMP">
+    <function name="C_INVOICETODATE" type="TIMESTAMP" volatility="IMMUTABLE">
       <parameter name="p_invoicefrecuency" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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-2009 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_INVOICE_PERCENTAGE_PAID.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_INVOICE_PERCENTAGE_PAID.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_INVOICE_PERCENTAGE_PAID">
-    <function name="C_INVOICE_PERCENTAGE_PAID" type="NUMERIC">
+    <function name="C_INVOICE_PERCENTAGE_PAID" type="NUMERIC" volatility="STABLE">
       <parameter name="p_invoice_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_LOCATION_DESCRIPTION.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_LOCATION_DESCRIPTION.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_LOCATION_DESCRIPTION">
-    <function name="C_LOCATION_DESCRIPTION" type="NVARCHAR">
+    <function name="C_LOCATION_DESCRIPTION" type="NVARCHAR" volatility="STABLE">
       <parameter name="p_c_location_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_LOCATION_IDENTIFIER.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_LOCATION_IDENTIFIER.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_LOCATION_IDENTIFIER">
-    <function name="C_LOCATION_IDENTIFIER" type="NVARCHAR">
+    <function name="C_LOCATION_IDENTIFIER" type="NVARCHAR" volatility="STABLE">
       <parameter name="p_c_location_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_LOCATION_NAME.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_LOCATION_NAME.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_LOCATION_NAME">
-    <function name="C_LOCATION_NAME" type="NVARCHAR">
+    <function name="C_LOCATION_NAME" type="NVARCHAR" volatility="STABLE">
       <parameter name="p_c_location_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_ORDER_STATUS.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_ORDER_STATUS.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_ORDER_STATUS">
-    <function name="C_ORDER_STATUS" type="CHAR">
+    <function name="C_ORDER_STATUS" type="CHAR" volatility="STABLE">
       <parameter name="p_orderid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_PAYMENTDUEDATE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_PAYMENTDUEDATE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_PAYMENTDUEDATE">
-    <function name="C_PAYMENTDUEDATE" type="TIMESTAMP">
+    <function name="C_PAYMENTDUEDATE" type="TIMESTAMP" volatility="STABLE">
       <parameter name="p_bpartner_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -43,7 +43,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_TAX_GET_LEVEL.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_TAX_GET_LEVEL.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_TAX_GET_LEVEL">
-    <function name="C_TAX_GET_LEVEL" type="NUMERIC">
+    <function name="C_TAX_GET_LEVEL" type="NUMERIC" volatility="STABLE">
       <parameter name="p_parenttax" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2016 Openbravo SLU
+* All portions are Copyright (C) 2010-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_TAX_GET_ROOT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_TAX_GET_ROOT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_TAX_GET_ROOT">
-    <function name="C_TAX_GET_ROOT" type="VARCHAR">
+    <function name="C_TAX_GET_ROOT" type="VARCHAR" volatility="STABLE">
       <parameter name="p_tax" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_TAX_ISMEMBER.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_TAX_ISMEMBER.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_TAX_ISMEMBER">
-    <function name="C_TAX_ISMEMBER" type="NUMERIC">
+    <function name="C_TAX_ISMEMBER" type="NUMERIC" volatility="STABLE">
       <parameter name="p_parenttax" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ***********************************************************************
--- a/src-db/database/model/functions/C_TRIM.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_TRIM.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_TRIM">
-    <function name="C_TRIM" type="VARCHAR">
+    <function name="C_TRIM" type="VARCHAR" volatility="IMMUTABLE">
       <parameter name="p_str" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -16,7 +16,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/C_UOM_CONVERT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/C_UOM_CONVERT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION C_UOM_CONVERT">
-    <function name="C_UOM_CONVERT" type="NUMERIC">
+    <function name="C_UOM_CONVERT" type="NUMERIC" volatility="STABLE">
       <parameter name="p_qty" type="NUMERIC" mode="in">
         <default/>
       </parameter>
@@ -28,7 +28,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/FIN_AGING_GETDOCNO.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/FIN_AGING_GETDOCNO.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION FIN_AGING_GETDOCNO">
-    <function name="FIN_AGING_GETDOCNO" type="NVARCHAR">
+    <function name="FIN_AGING_GETDOCNO" type="NVARCHAR" volatility="STABLE">
       <parameter name="p_poreference" type="NVARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2016 Openbravo SLU
+* All portions are Copyright (C) 2016-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/FIN_AGING_INVOICECURRENCY_RATE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/FIN_AGING_INVOICECURRENCY_RATE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION FIN_AGING_INVOICECURRENCY_RATE">
-    <function name="FIN_AGING_INVOICECURRENCY_RATE" type="NUMERIC">
+    <function name="FIN_AGING_INVOICECURRENCY_RATE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_invoice_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2016 Openbravo SLU
+* All portions are Copyright (C) 2016-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/FIN_AGING_ISDOUBTFULTDEBT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/FIN_AGING_ISDOUBTFULTDEBT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION FIN_AGING_ISDOUBTFULTDEBT">
-    <function name="FIN_AGING_ISDOUBTFULTDEBT" type="CHAR">
+    <function name="FIN_AGING_ISDOUBTFULTDEBT" type="CHAR" volatility="STABLE">
       <parameter name="p_finpaymentschedule_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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) 2016 Openbravo SLU
+* All portions are Copyright (C) 2016-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/FIN_AGING_PAYMENTCURRENCY_RATE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/FIN_AGING_PAYMENTCURRENCY_RATE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION FIN_AGING_PAYMENTCURRENCY_RATE">
-    <function name="FIN_AGING_PAYMENTCURRENCY_RATE" type="NUMERIC">
+    <function name="FIN_AGING_PAYMENTCURRENCY_RATE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_payment_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2016 Openbravo SLU
+* All portions are Copyright (C) 2016-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/MRP_CHECK_PLANNINGMETHOD.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/MRP_CHECK_PLANNINGMETHOD.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION MRP_CHECK_PLANNINGMETHOD">
-    <function name="MRP_CHECK_PLANNINGMETHOD" type="NUMERIC">
+    <function name="MRP_CHECK_PLANNINGMETHOD" type="NUMERIC" volatility="STABLE">
       <parameter name="p_planningmethod_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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-2009 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_BOM_PRICELIMIT.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_BOM_PRICELIMIT.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_BOM_PRICELIMIT">
-    <function name="M_BOM_PRICELIMIT" type="NUMERIC">
+    <function name="M_BOM_PRICELIMIT" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,7 @@
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2012 Openbravo S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo S.L.U.
 ******************************************************************************/
   v_Price        NUMBER;
   v_ProductPrice NUMBER;
--- a/src-db/database/model/functions/M_BOM_PRICELIST.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_BOM_PRICELIST.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_BOM_PRICELIST">
-    <function name="M_BOM_PRICELIST" type="NUMERIC">
+    <function name="M_BOM_PRICELIST" type="NUMERIC" volatility="STABLE">
       <parameter name="product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,7 @@
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2012 Openbravo S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo S.L.U.
 ******************************************************************************/
   v_Price        NUMBER;
   v_ProductPrice NUMBER;
--- a/src-db/database/model/functions/M_BOM_PRICESTD.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_BOM_PRICESTD.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_BOM_PRICESTD">
-    <function name="M_BOM_PRICESTD" type="NUMERIC">
+    <function name="M_BOM_PRICESTD" type="NUMERIC" volatility="STABLE">
       <parameter name="product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,7 @@
 * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
 * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2012 Openbravo S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo S.L.U.
 ******************************************************************************/
   v_Price        NUMBER;
   v_ProductPrice NUMBER;
--- a/src-db/database/model/functions/M_BOM_QTY_AVAILABLE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_BOM_QTY_AVAILABLE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_BOM_QTY_AVAILABLE">
-    <function name="M_BOM_QTY_AVAILABLE" type="NUMERIC">
+    <function name="M_BOM_QTY_AVAILABLE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2008 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/M_BOM_QTY_ONHAND.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_BOM_QTY_ONHAND.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_BOM_QTY_ONHAND">
-    <function name="M_BOM_QTY_ONHAND" type="NUMERIC">
+    <function name="M_BOM_QTY_ONHAND" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2012 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/M_BOM_QTY_ORDERED.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_BOM_QTY_ORDERED.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_BOM_QTY_ORDERED">
-    <function name="M_BOM_QTY_ORDERED" type="NUMERIC">
+    <function name="M_BOM_QTY_ORDERED" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2012 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/M_BOM_QTY_RESERVED.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_BOM_QTY_RESERVED.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_BOM_QTY_RESERVED">
-    <function name="M_BOM_QTY_RESERVED" type="NUMERIC">
+    <function name="M_BOM_QTY_RESERVED" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,7 @@
 * parts created by ComPiere are Copyright (C) ComPiere, Inc.;
 * All Rights Reserved.
 * Contributor(s): Openbravo SLU
-* Contributions are Copyright (C) 2001-2012 Openbravo, S.L.U.
+* Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U.
 *
 * Specifically, this derivative work is based upon the following Compiere
 * file and version.
--- a/src-db/database/model/functions/M_CHECK_STOCK.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_CHECK_STOCK.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_CHECK_STOCK">
-    <function name="M_CHECK_STOCK" type="NULL">
+    <function name="M_CHECK_STOCK" type="NULL" volatility="STABLE">
       <parameter name="p_m_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -31,7 +31,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-2017 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GETJSONDESCRIPTION.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GETJSONDESCRIPTION.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GETJSONDESCRIPTION">
-    <function name="M_GETJSONDESCRIPTION" type="VARCHAR">
+    <function name="M_GETJSONDESCRIPTION" type="VARCHAR" volatility="STABLE">
       <parameter name="p_attributesetinstance_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -26,7 +26,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) 2017-2018 Openbravo SLU
+ * All portions are Copyright (C) 2017-2019 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
--- a/src-db/database/model/functions/M_GET_CONVERTED_AUMQTY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_CONVERTED_AUMQTY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_CONVERTED_AUMQTY">
-    <function name="M_GET_CONVERTED_AUMQTY" type="NUMERIC">
+    <function name="M_GET_CONVERTED_AUMQTY" type="NUMERIC" volatility="STABLE">
       <parameter name="p_mproductid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2016 Openbravo SLU
+* All portions are Copyright (C) 2016-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 *
--- a/src-db/database/model/functions/M_GET_CONVERTED_QTY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_CONVERTED_QTY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_CONVERTED_QTY">
-    <function name="M_GET_CONVERTED_QTY" type="NUMERIC">
+    <function name="M_GET_CONVERTED_QTY" type="NUMERIC" volatility="STABLE">
       <parameter name="p_mproductid" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2016 Openbravo SLU
+* All portions are Copyright (C) 2016-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 *
--- a/src-db/database/model/functions/M_GET_COST.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_COST.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_COST">
-    <function name="M_GET_COST" type="NUMERIC">
+    <function name="M_GET_COST" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -40,7 +40,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_NO_TRX_PRODUCT_COST.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_NO_TRX_PRODUCT_COST.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_NO_TRX_PRODUCT_COST">
-    <function name="M_GET_NO_TRX_PRODUCT_COST" type="NUMERIC">
+    <function name="M_GET_NO_TRX_PRODUCT_COST" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -34,7 +34,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_OFFER.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_OFFER.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_OFFER">
-    <function name="M_GET_OFFER" type="VARCHAR">
+    <function name="M_GET_OFFER" type="VARCHAR" volatility="STABLE">
       <parameter name="p_date" type="TIMESTAMP" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_OFFERS_NAME.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_OFFERS_NAME.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_OFFERS_NAME">
-    <function name="M_GET_OFFERS_NAME" type="VARCHAR">
+    <function name="M_GET_OFFERS_NAME" type="VARCHAR" volatility="STABLE">
       <parameter name="p_date" type="TIMESTAMP" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2017 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_OFFERS_PRICE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_OFFERS_PRICE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_OFFERS_PRICE">
-    <function name="M_GET_OFFERS_PRICE" type="NUMERIC">
+    <function name="M_GET_OFFERS_PRICE" type="NUMERIC" volatility="IMMUTABLE">
       <parameter name="p_date" type="TIMESTAMP" mode="in">
         <default/>
       </parameter>
@@ -31,7 +31,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_OFFERS_STD_PRICE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_OFFERS_STD_PRICE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_OFFERS_STD_PRICE">
-    <function name="M_GET_OFFERS_STD_PRICE" type="NUMERIC">
+    <function name="M_GET_OFFERS_STD_PRICE" type="NUMERIC" volatility="IMMUTABLE">
       <parameter name="p_bpartner_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -31,7 +31,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_OFFER_PRICE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_OFFER_PRICE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_OFFER_PRICE">
-    <function name="M_GET_OFFER_PRICE" type="NUMERIC">
+    <function name="M_GET_OFFER_PRICE" type="NUMERIC" volatility="IMMUTABLE">
       <parameter name="p_offer_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_OFFER_STD_PRICE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_OFFER_STD_PRICE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_OFFER_STD_PRICE">
-    <function name="M_GET_OFFER_STD_PRICE" type="NUMERIC">
+    <function name="M_GET_OFFER_STD_PRICE" type="NUMERIC" volatility="IMMUTABLE">
       <parameter name="p_offer_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_PARETO_ABC.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_PARETO_ABC.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_PARETO_ABC">
-    <function name="M_GET_PARETO_ABC" type="VARCHAR">
+    <function name="M_GET_PARETO_ABC" type="VARCHAR" volatility="STABLE">
       <parameter name="p_warehouse_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -28,7 +28,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-2017 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_PARETO_ABC_LEGACY.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_PARETO_ABC_LEGACY.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_PARETO_ABC_LEGACY">
-    <function name="M_GET_PARETO_ABC_LEGACY" type="VARCHAR">
+    <function name="M_GET_PARETO_ABC_LEGACY" type="VARCHAR" volatility="STABLE">
       <parameter name="p_warehouse_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -25,7 +25,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-2016 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_PRICELIST_VERSION.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_PRICELIST_VERSION.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_PRICELIST_VERSION">
-    <function name="M_GET_PRICELIST_VERSION" type="VARCHAR">
+    <function name="M_GET_PRICELIST_VERSION" type="VARCHAR" volatility="STABLE">
       <parameter name="p_pricelist_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_PRODUCT_COST.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_PRODUCT_COST.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_PRODUCT_COST">
-    <function name="M_GET_PRODUCT_COST" type="NUMERIC">
+    <function name="M_GET_PRODUCT_COST" type="NUMERIC" volatility="STABLE">
       <parameter name="p_product_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2006 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_PRODUCT_PRICE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_PRODUCT_PRICE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_PRODUCT_PRICE">
-    <function name="M_GET_PRODUCT_PRICE" type="NUMERIC">
+    <function name="M_GET_PRODUCT_PRICE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_ad_client_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2008 Openbravo SLU
+* All portions are Copyright (C) 2001-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_PRODUCT_PRICE_DATE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_PRODUCT_PRICE_DATE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_PRODUCT_PRICE_DATE">
-    <function name="M_GET_PRODUCT_PRICE_DATE" type="NUMERIC">
+    <function name="M_GET_PRODUCT_PRICE_DATE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_ad_client_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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) 2007-2008 Openbravo SLU
+* All portions are Copyright (C) 2007-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_TRANSACTION_COST.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_TRANSACTION_COST.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_TRANSACTION_COST">
-    <function name="M_GET_TRANSACTION_COST" type="NUMERIC">
+    <function name="M_GET_TRANSACTION_COST" type="NUMERIC" volatility="STABLE">
       <parameter name="p_transaction_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_GET_TRX_AND_PRODUCT_COST.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_GET_TRX_AND_PRODUCT_COST.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_GET_TRX_AND_PRODUCT_COST">
-    <function name="M_GET_TRX_AND_PRODUCT_COST" type="NUMERIC">
+    <function name="M_GET_TRX_AND_PRODUCT_COST" type="NUMERIC" volatility="STABLE">
       <parameter name="p_transaction_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -40,7 +40,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_ISPARENT_CH_VALUE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_ISPARENT_CH_VALUE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_ISPARENT_CH_VALUE">
-    <function name="M_ISPARENT_CH_VALUE" type="NUMERIC">
+    <function name="M_ISPARENT_CH_VALUE" type="NUMERIC" volatility="STABLE">
       <parameter name="p_ch_value_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -22,7 +22,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_WAREHOUSE_DEFAULT_RULE.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_WAREHOUSE_DEFAULT_RULE.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_WAREHOUSE_DEFAULT_RULE">
-    <function name="M_WAREHOUSE_DEFAULT_RULE" type="NULL">
+    <function name="M_WAREHOUSE_DEFAULT_RULE" type="NULL" volatility="IMMUTABLE">
       <parameter name="pinstance_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -19,7 +19,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-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/functions/M_WAREHOUSE_DEFAULT_RULE_PARAM.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/functions/M_WAREHOUSE_DEFAULT_RULE_PARAM.xml	Thu May 16 17:03:52 2019 +0200
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
   <database name="FUNCTION M_WAREHOUSE_DEFAULT_RULE_PARAM">
-    <function name="M_WAREHOUSE_DEFAULT_RULE_PARAM" type="NULL">
+    <function name="M_WAREHOUSE_DEFAULT_RULE_PARAM" type="NULL" volatility="IMMUTABLE">
       <parameter name="pinstance_id" type="VARCHAR" mode="in">
         <default/>
       </parameter>
@@ -76,7 +76,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) 2017-2018 Openbravo SLU
+* All portions are Copyright (C) 2017-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
--- a/src-db/database/model/postscript-PostgreSql.sql	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/postscript-PostgreSql.sql	Thu May 16 17:03:52 2019 +0200
@@ -114,7 +114,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) 2008-2009 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -181,7 +181,7 @@
    RETURN v_is_included;
  
 END;   $BODY$
-  LANGUAGE 'plpgsql' VOLATILE
+  LANGUAGE 'plpgsql' STABLE
 /-- END
 
 CREATE OR REPLACE FUNCTION AD_ORG_CHK_DOC_PAYMENTS(p_header_table IN character varying, p_lines_table IN character varying, p_document_id IN character varying, p_header_column_id IN character varying, p_lines_column_id IN character varying, p_lines_column_payment_id IN character varying) 
@@ -199,7 +199,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) 2008-2009 Openbravo SLU
+* All portions are Copyright (C) 2008-2019 Openbravo SLU
 * All Rights Reserved.
 * Contributor(s):  ______________________________________.
 ************************************************************************/
@@ -269,7 +269,7 @@
   RETURN v_is_included;
  
 END;   $BODY$
-  LANGUAGE 'plpgsql' VOLATILE
+  LANGUAGE 'plpgsql' STABLE
 /-- END
 
 -- Inserts an alert recipient for available updates
--- a/src-db/database/model/prescript-PostgreSql.sql	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/model/prescript-PostgreSql.sql	Thu May 16 17:03:52 2019 +0200
@@ -938,14 +938,14 @@
 SET SEARCH_PATH FROM CURRENT
 as 'select
 cast(date_trunc(''month'', $1) + ''1 month''::interval as date) - 1'
-language sql
+language sql IMMUTABLE
 /-- END
 
 create or replace function last_day(timestamptz) returns date 
 SET SEARCH_PATH FROM CURRENT
 as 'select
 cast(date_trunc(''month'', cast($1 AS date)) + ''1 month''::interval as date) - 1'
-language sql
+language sql IMMUTABLE
 /-- END
 
 
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Tue May 14 00:54:35 2019 +0200
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Thu May 16 17:03:52 2019 +0200
@@ -9480,6 +9480,17 @@
 <!--4BF4D03912BB496C95B142D6447C2567-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--4BF4D03912BB496C95B142D6447C2567--></AD_REF_LIST>
 
+<!--4C57DF27FBB141DC8D15A664330A417D--><AD_REF_LIST>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <AD_REF_LIST_ID><![CDATA[4C57DF27FBB141DC8D15A664330A417D]]></AD_REF_LIST_ID>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <VALUE><![CDATA[WS]]></VALUE>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <NAME><![CDATA[WebService]]></NAME>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <AD_REFERENCE_ID><![CDATA[8A9921F241B344F3AD99B6F59173F788]]></AD_REFERENCE_ID>
+<!--4C57DF27FBB141DC8D15A664330A417D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4C57DF27FBB141DC8D15A664330A417D--></AD_REF_LIST>
+
 <!--4C6B4B638FC74B72AD5646519F92AB57--><AD_REF_LIST>
 <!--4C6B4B638FC74B72AD5646519F92AB57-->  <AD_REF_LIST_ID><![CDATA[4C6B4B638FC74B72AD5646519F92AB57]]></AD_REF_LIST_ID>
 <!--4C6B4B638FC74B72AD5646519F92AB57-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-test/src/org/openbravo/test/AllAntTaskTests.java	Tue May 14 00:54:35 2019 +0200
+++ b/src-test/src/org/openbravo/test/AllAntTaskTests.java	Thu May 16 17:03:52 2019 +0200
@@ -119,6 +119,7 @@
 import org.openbravo.test.system.ImportEntryBuilderTest;
 import org.openbravo.test.system.ImportEntrySizeTest;
 import org.openbravo.test.system.Issue29934Test;
+import org.openbravo.test.system.JSONSerialization;
 import org.openbravo.test.system.OldCallouts;
 import org.openbravo.test.system.Sessions;
 import org.openbravo.test.system.SystemServiceTest;
@@ -226,6 +227,7 @@
     Sessions.class, //
     OBContextTest.class, //
     OldCallouts.class, //
+    JSONSerialization.class, //
 
     // xml
     ClientExportImportTest.class, //
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-test/src/org/openbravo/test/system/JSONSerialization.java	Thu May 16 17:03:52 2019 +0200
@@ -0,0 +1,215 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.test.system;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.Matchers.contains;
+import static org.junit.Assert.assertThat;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.servlet.ServletException;
+
+import org.junit.Test;
+import org.openbravo.base.provider.OBProvider;
+import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBError;
+import org.openbravo.model.ad.ui.ProcessRequest;
+import org.openbravo.scheduling.ParameterSerializationException;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.scheduling.ProcessContext;
+import org.openbravo.service.db.DalConnectionProvider;
+import org.openbravo.test.base.OBBaseTest;
+
+/**
+ * Test cases used to ensure the correct JSON serialization of different objects.
+ */
+public class JSONSerialization extends OBBaseTest {
+
+  private static final String PROCESS_CONTEXT = "{\"org.openbravo.scheduling.ProcessContext\":"
+      + "{\"user\":\"4028E6C72959682B01295A0735CB0120\",\"role\":\"\",\"language\":\"en_US\","
+      + "\"theme\":\"ltr\\/org.openbravo.userinterface.skin.250to300Comp\\/250to300Comp\","
+      + "\"client\":\"4028E6C72959682B01295A070852010D\",\"organization\":\"357947E87C284935AD1D783CF6F099A1\","
+      + "\"warehouse\":\"\",\"command\":\"DEFAULT\",\"userClient\":\"\","
+      + "\"userOrganization\":\"\",\"dbSessionID\":\"\",\"javaDateFormat\":\"\",\"jsDateFormat\":\"\","
+      + "\"sqlDateFormat\":\"\",\"accessLevel\":\"\",\"roleSecurity\":true}}";
+
+  private static final String PB_PARAMS = "{\"mChValueId\":\"9E16B9CCFC7B4836B72840F0AF68C151\",\"mProductId\":\"\"}";
+  private static final String PB_PARAMS_WRONG = "[]";
+  private static final String M_CH_VALUE_ID = "9E16B9CCFC7B4836B72840F0AF68C151";
+  private static final String AD_PROCESS_ID = "58591E3E0F7648E4A09058E037CE49FC";
+
+  private static final String OB_ERROR = "{\"OBError\":{\"title\":\"Title\",\"message\":\"Message\",\"type\":\"Error\"}}";
+
+  /** ProcessContext is correctly serialized */
+  @Test
+  public void serializeProcessContext() {
+    setUserContext(QA_TEST_ADMIN_USER_ID);
+    ProcessContext processContext = new ProcessContext(getVars());
+    assertThat(processContext.toString(), equalTo(PROCESS_CONTEXT));
+  }
+
+  /** Test correct deserialization of a JSONObject containing a ProcessContext definition */
+  @Test
+  public void deserializeProcessContext() {
+    String obContext = OBDal.getInstance()
+        .getSession()
+        .createQuery(
+            "SELECT openbravoContext FROM ProcessRequest WHERE id = '078147FA19124BA69786EA7374807D0D'",
+            String.class)
+        .uniqueResult();
+    ProcessContext processContext = ProcessContext.newInstance(obContext);
+
+    List<Object> collection = Arrays.asList(processContext.getUser(), processContext.getRole(),
+        processContext.getLanguage(), processContext.getTheme(), processContext.getClient(),
+        processContext.getOrganization(), processContext.getWarehouse(),
+        processContext.getCommand(), processContext.getUserClient(),
+        processContext.getUserOrganization(), processContext.getDbSessionID(),
+        processContext.getJavaDateFormat(), processContext.getJavaDateTimeFormat(),
+        processContext.getJsDateFormat(), processContext.getSqlDateFormat(),
+        processContext.getAccessLevel(), processContext.isRoleSecurity());
+
+    assertThat(collection, contains("100", "4028E6C72959682B01295A071429011E", "en_US",
+        "ltr/org.openbravo.userinterface.skin.250to300Comp/250to300Comp",
+        "4028E6C72959682B01295A070852010D", "0", "4028E6C72959682B01295ECFEF4502A0",
+        "SAVE_BUTTONProcessing100", "'4028E6C72959682B01295A070852010D'",
+        "'5EFF95EB540740A3B10510D9814EFAD5','43D590B4814049C6B85C6545E8264E37','0','357947E87C284935AD1D783CF6F099A1'",
+        "A9220D77CB54469A99320051BB0D74C5", "dd-MM-yyyy", "dd-MM-yyyy HH:mm:ss", "%d-%m-%Y",
+        "DD-MM-YYYY", "3", true));
+  }
+
+  /** Test consistency of ProcessContext serialization */
+  @Test
+  public void isConsistentSerialization() {
+    ProcessContext processContext = ProcessContext.newInstance(PROCESS_CONTEXT);
+    assertThat(processContext.toString(), equalTo(PROCESS_CONTEXT));
+  }
+
+  /**
+   * ProcessBundle parameters are correctly serialized
+   * 
+   * @throws ServletException
+   */
+  @Test
+  public void serializeProcessBundleParameters() throws ServletException {
+    ProcessBundle pb = new ProcessBundle(AD_PROCESS_ID, getVars())
+        .init(new DalConnectionProvider(false));
+
+    HashMap<String, Object> parameters = new HashMap<>();
+    parameters.put("mProductId", "");
+    parameters.put("mChValueId", M_CH_VALUE_ID);
+    pb.setParams(parameters);
+
+    assertThat(pb.getParamsDeflated(), equalTo(PB_PARAMS));
+  }
+
+  /**
+   * ProcessBundle parameters are correctly deserialized
+   * 
+   * @throws ServletException
+   */
+  @Test
+  public void deserializeProcessBundleParameters() throws ServletException {
+    String processRequestId = null;
+    try {
+      processRequestId = createProcessRequest(PB_PARAMS);
+      ProcessBundle pb = ProcessBundle.request(processRequestId, getVars(),
+          new DalConnectionProvider(false));
+      assertThat(pb.getParams().get("mProductId"), equalTo(""));
+      assertThat(pb.getParams().get("mChValueId"), equalTo(M_CH_VALUE_ID));
+    } finally {
+      removeProcessRequest(processRequestId);
+    }
+  }
+
+  /**
+   * Expected exception is thrown when ProcessBundle parameters serialization fails
+   * 
+   * @throws ServletException
+   */
+  @Test(expected = ParameterSerializationException.class)
+  public void exceptionIsThrownWhenSerializationFails() throws ServletException {
+    ProcessBundle pb = new ProcessBundle(AD_PROCESS_ID, getVars())
+        .init(new DalConnectionProvider(false));
+
+    HashMap<String, Object> parameters = new HashMap<>();
+    parameters.put("unsupportedParam", Collections.emptyList());
+    pb.setParams(parameters);
+
+    pb.getParamsDeflated(); // should throw ParameterSerializationException
+
+  }
+
+  /**
+   * Expected exception is thrown when ProcessBundle parameters deserialization fails
+   * 
+   * @throws ServletException
+   */
+  @Test(expected = ParameterSerializationException.class)
+  public void exceptionIsThrownWhenDeserializationFails() throws ServletException {
+    String processRequestId = null;
+    try {
+      processRequestId = createProcessRequest(PB_PARAMS_WRONG);
+      ProcessBundle.request(processRequestId, getVars(), new DalConnectionProvider(false));
+    } finally {
+      removeProcessRequest(processRequestId);
+    }
+  }
+
+  /** OBError is serialized as expected */
+  @Test
+  public void serializeOBError() {
+    OBError error = new OBError();
+    error.setType("Error");
+    error.setTitle("Title");
+    error.setMessage("Message");
+    assertThat(error.toJSON().toString(), equalTo(OB_ERROR));
+  }
+
+  private VariablesSecureApp getVars() {
+    return new VariablesSecureApp(OBContext.getOBContext().getUser().getId(),
+        OBContext.getOBContext().getCurrentClient().getId(),
+        OBContext.getOBContext().getCurrentOrganization().getId());
+  }
+
+  private String createProcessRequest(String parameters) {
+    ProcessRequest pr = OBProvider.getInstance().get(ProcessRequest.class);
+    pr.setProcess(
+        OBDal.getInstance().getProxy(org.openbravo.model.ad.ui.Process.class, AD_PROCESS_ID));
+    pr.setParams(parameters);
+    OBDal.getInstance().save(pr);
+    OBDal.getInstance().commitAndClose();
+    return pr.getId();
+  }
+
+  private void removeProcessRequest(String processRequestId) {
+    if (processRequestId == null) {
+      return;
+    }
+    OBDal.getInstance()
+        .remove(OBDal.getInstance().getProxy(ProcessRequest.class, processRequestId));
+    OBDal.getInstance().commitAndClose();
+  }
+
+}
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModules.html	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModules.html	Thu May 16 17:03:52 2019 +0200
@@ -228,10 +228,6 @@
         if(response.statusofstate=="Warning"){
           var warns=response.warnings;
           if (warns) {
-            if (warns instanceof Array) {
-              warns = warns[0];
-            }
-            warns = [warns.string];
             for(i=0;i<warns.length;i++){
               if (warns[i] !== undefined) {
                 var old=document.getElementById("warning_"+correspondingNode(response.state)).title;
@@ -253,16 +249,8 @@
           }
         }
         if(response.statusofstate=="Error"){
-          var errs;
-          if(response.errors instanceof Array){
-              errs=response.errors[0].string;
-          }else{
-              errs=response.errors.string;
-          }
+          var errs=response.errors;
           if(errs){
-            if(!(errs instanceof Array)){
-              errs=[errs];
-            }
             if(numoferrs[getStatusIndex(response.state)]<errs.length){
               for(i=0;i<errs.length;i++){
                 progList_addTextToTextArea('<b><i>Error: </b></i>'+errs[i]);
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModulesCallServlet.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModulesCallServlet.java	Thu May 16 17:03:52 2019 +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-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -40,9 +40,6 @@
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
-
 public class ApplyModulesCallServlet extends HttpBaseServlet {
   private static final long serialVersionUID = 1L;
 
@@ -98,7 +95,7 @@
         ps.setString(1, "%" + state);
         ps.executeQuery();
         ResultSet rs = ps.getResultSet();
-        ArrayList<String> warnings = new ArrayList<String>();
+        ArrayList<String> warnings = new ArrayList<>();
         while (rs.next()) {
           warning = true; // there is at least an warning in this state
           int linenumber = rs.getInt(2);
@@ -109,14 +106,14 @@
             warnings.add(rs.getString(1));
           }
         }
-        resp.setWarnings(warnings.toArray(new String[0]));
+        resp.setWarnings(warnings);
 
         ps2 = getPreparedStatement(
             "SELECT MESSAGE, LINE_NUMBER FROM AD_ERROR_LOG WHERE ERROR_LEVEL='ERROR' AND SYSTEM_STATUS LIKE ?");
         ps2.setString(1, "%" + state);
         ps2.executeQuery();
         ResultSet rs2 = ps2.getResultSet();
-        ArrayList<String> errors = new ArrayList<String>();
+        ArrayList<String> errors = new ArrayList<>();
         while (rs2.next()) {
           error = true; // there is at least an error in this state
           int linenumber = rs2.getInt(2);
@@ -127,9 +124,8 @@
             errors.add(rs2.getString(1));
           }
         }
-        resp.setErrors(errors.toArray(new String[0]));
-        vars.setSessionValue("ApplyModules|Last_Line_Number_Log",
-            Integer.valueOf(newlinenumber).toString());
+        resp.setErrors(errors);
+        vars.setSessionValue("ApplyModules|Last_Line_Number_Log", Integer.toString(newlinenumber));
       }
       ps3 = getPreparedStatement("SELECT MESSAGE FROM AD_ERROR_LOG ORDER BY CREATED DESC");
       ps3.executeQuery();
@@ -172,20 +168,19 @@
     resp.setState(Integer.parseInt(fState.replace("RB", "")));
     PreparedStatement ps2 = null;
     PreparedStatement ps3 = null;
-    boolean warning = false;
     boolean error = false;
     try {
       ps2 = getPreparedStatement(
           "SELECT MESSAGE, SYSTEM_STATUS, LINE_NUMBER FROM AD_ERROR_LOG WHERE ERROR_LEVEL='ERROR' AND MESSAGE NOT LIKE 'Task%' AND MESSAGE NOT LIKE 'Target%' ORDER BY CREATED DESC");
       ps2.executeQuery();
       ResultSet rs2 = ps2.getResultSet();
-      ArrayList<String> errors = new ArrayList<String>();
+      ArrayList<String> errors = new ArrayList<>();
       while (rs2.next()) {
         error = true; // there is at least an error in this state
         errors.add(rs2.getString(1));
         resp.setState(Integer.parseInt(rs2.getString(2).replace("RB", "")));
       }
-      resp.setErrors(errors.toArray(new String[0]));
+      resp.setErrors(errors);
 
       ps3 = getPreparedStatement("SELECT MESSAGE FROM AD_ERROR_LOG ORDER BY CREATED ");
       ps3.executeQuery();
@@ -198,8 +193,6 @@
 
       if (error) {
         resp.setStatusofstate("Error");
-      } else if (warning) {
-        resp.setStatusofstate("Warning");
       } else {
         resp.setStatusofstate(defaultState);
       }
@@ -236,11 +229,7 @@
       ApplyModulesResponse resp = fillResponse(vars, state, "Processing", true);
       response.setContentType("text/plain; charset=UTF-8");
       final PrintWriter out = response.getWriter();
-      String strResult;
-      XStream xs = new XStream(new JettisonMappedXmlDriver());
-      xs.alias("Response", ApplyModulesResponse.class);
-      strResult = xs.toXML(resp);
-      out.print(strResult);
+      out.print(resp.toJSON());
       out.close();
     } catch (Exception e) {
       // We need to use printStackTrace here because if not, the log will not be shown
@@ -275,11 +264,7 @@
     response.setContentType("text/plain; charset=UTF-8");
     try {
       final PrintWriter out = response.getWriter();
-      String strResult;
-      XStream xs = new XStream(new JettisonMappedXmlDriver());
-      xs.alias("Response", ApplyModulesResponse.class);
-      strResult = xs.toXML(resp);
-      out.print(strResult);
+      out.print(resp.toJSON());
       out.close();
     } catch (Exception e) {
       // We need to use printStackTrace here because if not, the log will not be shown
@@ -383,12 +368,9 @@
         error.setMessage(message);
       }
 
-      XStream xs = new XStream(new JettisonMappedXmlDriver());
-      xs.alias("OBError", OBError.class);
-      String strResult = xs.toXML(error);
       response.setContentType("text/html; charset=UTF-8");
       final PrintWriter out = response.getWriter();
-      out.print(strResult);
+      out.print(error.toJSON().toString());
       out.close();
 
       PreparedStatement psErr = getPreparedStatement(
--- a/src/org/openbravo/erpCommon/ad_process/ApplyModulesResponse.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/ApplyModulesResponse.java	Thu May 16 17:03:52 2019 +0200
@@ -10,65 +10,68 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************/
 package org.openbravo.erpCommon.ad_process;
 
-public class ApplyModulesResponse {
+import java.util.List;
+
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+
+class ApplyModulesResponse {
   private int state;
   private String statusofstate;
-  private String[] warnings;
-  private String[] errors;
+  private List<String> warnings;
+  private List<String> errors;
   private String lastmessage;
   private String processFinished;
 
-  public int getState() {
-    return state;
-  }
-
   public void setState(int state) {
     this.state = state;
   }
 
-  public String getStatusofstate() {
-    return statusofstate;
-  }
-
   public void setStatusofstate(String statusofstate) {
     this.statusofstate = statusofstate;
   }
 
-  public String[] getWarnings() {
-    return warnings;
-  }
-
-  public void setWarnings(String[] warnings) {
+  public void setWarnings(List<String> warnings) {
     this.warnings = warnings;
   }
 
-  public String[] getErrors() {
-    return errors;
-  }
-
-  public void setErrors(String[] errors) {
+  public void setErrors(List<String> errors) {
     this.errors = errors;
   }
 
-  public String getLastmessage() {
-    return lastmessage;
-  }
-
   public void setLastmessage(String lastmessage) {
     this.lastmessage = lastmessage;
   }
 
-  public String getProcessFinished() {
-    return processFinished;
-  }
-
   public void setProcessFinished(String processFinished) {
     this.processFinished = processFinished;
   }
+
+  String toJSON() {
+    JSONObject jsonObject = new JSONObject();
+    try {
+      JSONObject properties = new JSONObject();
+      properties.put("state", state);
+      properties.put("statusofstate", statusofstate);
+      if (!warnings.isEmpty()) {
+        properties.put("warnings", new JSONArray(warnings));
+      }
+      if (errors.isEmpty()) {
+        properties.put("errors", new JSONArray(errors));
+      }
+      properties.put("lastmessage", lastmessage);
+      properties.put("processFinished", processFinished);
+
+      jsonObject.put("Response", properties);
+    } catch (JSONException ex) {
+    }
+    return jsonObject.toString();
+  }
 }
--- a/src/org/openbravo/erpCommon/security/SessionLogin.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/erpCommon/security/SessionLogin.java	Thu May 16 17:03:52 2019 +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-2018 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -159,6 +159,8 @@
       session.setNewOBObject(true);
 
       OBDal.getInstance().save(session);
+
+      // commit new ad_session without auditing
       SessionInfo.auditThisThread(false);
       OBDal.getInstance().commitAndClose();
       setSessionID(session.getId());
@@ -168,6 +170,9 @@
       return 0;
     } finally {
       OBContext.restorePreviousMode();
+
+      // reset auditing so other DB modifications in this thread are audited
+      SessionInfo.auditThisThread(true);
     }
   }
 
--- a/src/org/openbravo/erpCommon/utility/OBError.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/erpCommon/utility/OBError.java	Thu May 16 17:03:52 2019 +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-2018 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,6 +22,9 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+
 @SuppressWarnings("serial")
 public class OBError implements Serializable {
   private String type = "";
@@ -32,44 +35,32 @@
   public OBError() {
   }
 
-  public void setType(String _data) {
-    String localData = _data;
-    if (localData == null) {
-      localData = "";
-    }
-    this.type = localData;
+  public void setType(String type) {
+    this.type = type != null ? type : "";
   }
 
   public String getType() {
     return ((this.type == null) ? "Hidden" : this.type);
   }
 
-  public void setTitle(String _data) {
-    String localData = _data;
-    if (localData == null) {
-      localData = "";
-    }
-    this.title = localData;
+  public void setTitle(String title) {
+    this.title = title != null ? title : "";
   }
 
   public String getTitle() {
     return ((this.title == null) ? "" : this.title);
   }
 
-  public void setMessage(String _data) {
-    String localData = _data;
-    if (localData == null) {
-      localData = "";
-    }
-    this.message = localData;
+  public void setMessage(String message) {
+    this.message = message != null ? message : "";
   }
 
   public String getMessage() {
     return ((this.message == null) ? "" : this.message);
   }
 
-  public void setConnectionAvailable(boolean _data) {
-    this.connectionAvailable = _data;
+  public void setConnectionAvailable(boolean connectionAvailable) {
+    this.connectionAvailable = connectionAvailable;
   }
 
   public boolean isEmpty() {
@@ -88,10 +79,20 @@
   }
 
   public Map<String, String> toMap() {
-    Map<String, String> o = new HashMap<String, String>();
+    Map<String, String> o = new HashMap<>();
     o.put("title", title);
     o.put("message", message);
     o.put("type", type);
     return o;
   }
+
+  public JSONObject toJSON() {
+    JSONObject obError = new JSONObject();
+    JSONObject data = new JSONObject(toMap());
+    try {
+      obError.put("OBError", data);
+    } catch (JSONException ignore) {
+    }
+    return obError;
+  }
 }
--- a/src/org/openbravo/erpCommon/utility/WindowTree.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/erpCommon/utility/WindowTree.java	Thu May 16 17:03:52 2019 +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-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -50,9 +50,6 @@
 import org.openbravo.utils.Replace;
 import org.openbravo.xmlEngine.XmlDocument;
 
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
-
 /**
  * @author Fernando Iriazabal
  * 
@@ -115,9 +112,7 @@
         error.setType("Error");
         error.setTitle("Error");
         error.setMessage(strResult);
-        XStream xs = new XStream(new JettisonMappedXmlDriver());
-        xs.alias("OBError", OBError.class);
-        strResult = xs.toXML(error);
+        strResult = error.toJSON().toString();
       }
 
       out.print(strResult);
--- a/src/org/openbravo/scheduling/OBScheduler.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/scheduling/OBScheduler.java	Thu May 16 17:03:52 2019 +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) 2008-2018 Openbravo SLU
+ * All portions are Copyright (C) 2008-2019 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -153,7 +153,7 @@
 
     ProcessRequestData.insert(getConnection(), context.getOrganization(), context.getClient(),
         context.getUser(), context.getUser(), requestId, processId, context.getUser(), SCHEDULED,
-        channel.toString(), context.toString(), bundle.getParamsDeflated(), null, null, null, null);
+        channel, context.toString(), bundle.getParamsDeflated(), null, null, null, null);
 
     if (bundle.getGroupInfo() != null) {
       // Is Part of a Group, update the info
@@ -293,19 +293,23 @@
           continue;
         }
 
-        try {
-          final ProcessBundle bundle = ProcessBundle.request(requestId, vars, getConnection());
-          schedule(requestId, bundle);
-
-        } catch (final ServletException e) {
-          log.error("Error scheduling process: " + e.getMessage(), e);
-        }
+        scheduleProcess(requestId, vars);
       }
     } catch (final ServletException e) {
       log.error("An error occurred retrieving scheduled process data: " + e.getMessage(), e);
     }
   }
 
+  private void scheduleProcess(String requestId, VariablesSecureApp vars)
+      throws SchedulerException {
+    try {
+      final ProcessBundle bundle = ProcessBundle.request(requestId, vars, getConnection());
+      schedule(requestId, bundle);
+    } catch (final ServletException | ParameterSerializationException e) {
+      log.error("Error scheduling process request: " + requestId, e);
+    }
+  }
+
   /**
    * @author awolski
    * 
@@ -390,7 +394,7 @@
     private static Trigger newInstance(String name, ProcessBundle bundle, ConnectionProvider conn)
         throws ServletException {
 
-      TriggerData data = new TriggerData();
+      TriggerData data;
 
       if (bundle.isGroup()) {
         data = TriggerData.selectGroup(conn, name, GroupInfo.processGroupId);
@@ -611,7 +615,7 @@
       }
 
       if (time != null && !time.equals("")) {
-        final int hour = Integer.parseInt(time.substring(time.indexOf(" ") + 1, time.indexOf(':')));
+        final int hour = Integer.parseInt(time.substring(time.indexOf(' ') + 1, time.indexOf(':')));
         final int minute = Integer
             .parseInt(time.substring(time.indexOf(':') + 1, time.lastIndexOf(':')));
         final int second = Integer
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/scheduling/ParameterSerializationException.java	Thu May 16 17:03:52 2019 +0200
@@ -0,0 +1,39 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.scheduling;
+
+import org.openbravo.base.exception.OBException;
+
+/**
+ * Class used to handle the errors when serializing or deserializing the parameters of a
+ * {@link ProcessBundle}.
+ */
+public class ParameterSerializationException extends OBException {
+  private static final long serialVersionUID = 1L;
+
+  /**
+   * Creates a new ParameterSerializationException.
+   * 
+   * @param message
+   *          The exception message
+   */
+  public ParameterSerializationException(String message) {
+    super(message);
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/scheduling/ParameterSerializer.java	Thu May 16 17:03:52 2019 +0200
@@ -0,0 +1,110 @@
+/*
+ *************************************************************************
+ * 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) 2019 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.scheduling;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Spliterators;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+import java.util.stream.StreamSupport;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+
+/**
+ * A class that allows to serialize and deserialize the parameters of a {@link ProcessBundle}.
+ */
+class ParameterSerializer {
+  private static ParameterSerializer instance = new ParameterSerializer();
+  private static Logger log = LogManager.getLogger();
+
+  static ParameterSerializer getInstance() {
+    return instance;
+  }
+
+  String serialize(Map<String, Object> parameters) {
+    if (parameters.isEmpty()) {
+      return "";
+    }
+
+    checkParameters(parameters);
+
+    return new JSONObject(parameters).toString();
+  }
+
+  private void checkParameters(Map<String, Object> parameters) {
+    List<Class<?>> invalidTypes = parameters.values()
+        .stream()
+        .filter(((Predicate<Object>) this::isSupportedType).negate())
+        .map(Object::getClass)
+        .distinct()
+        .collect(Collectors.toList());
+
+    if (!invalidTypes.isEmpty()) {
+      log.error("Could not serialize parameters because it has unsupported types {}. Map: {}",
+          invalidTypes, parameters);
+      throw new ParameterSerializationException(
+          "Could not serialize paramters with types " + invalidTypes);
+    }
+  }
+
+  private boolean isSupportedType(Object value) {
+    return value instanceof String || value instanceof JSONObject;
+  }
+
+  Map<String, Object> deserialize(String parameters) {
+    JSONObject json;
+    try {
+      json = new JSONObject(parameters);
+    } catch (JSONException e) {
+      throw new ParameterSerializationException(
+          "Could not deserialize map of parameters: " + parameters);
+    }
+
+    @SuppressWarnings("unchecked")
+    Map<String, Object> pbParams = (Map<String, Object>) StreamSupport
+        .stream(Spliterators.spliteratorUnknownSize(json.keys(), 0), false)
+        .collect(Collectors.toMap(Function.identity(), k -> deserialize(json, (String) k)));
+
+    return pbParams;
+  }
+
+  Object deserialize(JSONObject json, String key) {
+    Object value = null;
+    try {
+      value = json.get(key);
+    } catch (JSONException ex) {
+      // It should not happen as the key will always exists
+    }
+
+    if (!isSupportedType(value)) {
+      Class<?> clazz = value != null ? value.getClass() : null;
+      log.error(
+          "Could not deserialize parameter because it has unsupported type {}. Parameter: name = {}, value = {}",
+          clazz, key, value);
+      throw new ParameterSerializationException(
+          "Could not deserialize parameter with type " + clazz);
+    }
+    return value;
+  }
+}
--- a/src/org/openbravo/scheduling/ProcessBundle.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/scheduling/ProcessBundle.java	Thu May 16 17:03:52 2019 +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) 2008-2018 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,9 +32,6 @@
 import org.openbravo.erpCommon.ad_process.JasperProcess;
 import org.openbravo.erpCommon.ad_process.PinstanceProcedure;
 
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
-
 /**
  * A ProcessBundle is a 'container' holding all the relevant information required to execute a
  * process in the Openbravo ERP system, including security/contextual details such as User, Client
@@ -229,13 +226,14 @@
   }
 
   /**
-   * Returns the parameters for this process. This is guaranteed not to be null.
+   * Returns the parameters for this process. This is guaranteed not to be null. For the moment only
+   * parameters of type String or JSONObject are supported.
    * 
    * @return the process parameter map
    */
   public Map<String, Object> getParams() {
     if (params == null) {
-      params = new HashMap<String, Object>();
+      params = new HashMap<>();
     }
     return params;
   }
@@ -253,8 +251,7 @@
   }
 
   public String getParamsDeflated() {
-    final XStream xstream = new XStream(new JettisonMappedXmlDriver());
-    return xstream.toXML(getParams());
+    return ParameterSerializer.getInstance().serialize(getParams());
   }
 
   /**
@@ -425,9 +422,8 @@
    *          a connection to the database
    * @return a new ProcessBundle object based on the information in the request
    * @throws ServletException
-   *           if an error occurrs retrieving the request from the database
+   *           if an error occurs retrieving the request from the database
    */
-  @SuppressWarnings("unchecked")
   public static final ProcessBundle request(String requestId, VariablesSecureApp vars,
       ConnectionProvider conn) throws ServletException {
     final ProcessRequestData data = ProcessRequestData.select(conn, requestId);
@@ -447,8 +443,7 @@
     if (paramString == null || paramString.trim().equals("")) {
       bundle.setParams(new HashMap<String, Object>());
     } else {
-      final XStream xstream = new XStream(new JettisonMappedXmlDriver());
-      bundle.setParams((Map<String, Object>) xstream.fromXML(paramString));
+      bundle.setParams(ParameterSerializer.getInstance().deserialize(paramString));
     }
 
     return bundle;
--- a/src/org/openbravo/scheduling/ProcessContext.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/scheduling/ProcessContext.java	Thu May 16 17:03:52 2019 +0200
@@ -11,24 +11,27 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.scheduling;
 
+import org.apache.commons.lang.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 
-import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.json.JettisonMappedXmlDriver;
-
 /**
  * @author awolski
  * 
  */
 public class ProcessContext {
 
+  private static final Logger log = LogManager.getLogger();
   public static final String KEY = "org.openbravo.base.secureApp.ObContext";
 
   private String user;
@@ -51,35 +54,65 @@
   private boolean roleSecurity;
 
   /**
-   * 
+   * Creates an empty ProcessContext.
    */
   public ProcessContext() {
 
   }
 
   /**
+   * Creates a ProcessContext using the information of VariablesSecureApp object.
+   * 
    * @param vars
+   *          a VariablesSecureApp object with the session information used to initialize the
+   *          ProcessContext properties.
    */
   public ProcessContext(VariablesSecureApp vars) {
-    this.user = vars.getUser();
-    this.role = vars.getRole();
-    this.language = vars.getLanguage();
-    this.theme = vars.getTheme();
-    this.client = vars.getClient();
-    this.organization = vars.getOrg();
-    this.warehouse = vars.getWarehouse();
-    this.command = vars.getCommand();
-    this.userClient = vars.getUserClient();
-    this.userOrganization = vars.getUserOrg();
-    this.dbSessionID = vars.getDBSession();
-    this.javaDateFormat = vars.getJavaDateFormat();
-    this.javaDateTimeFormat = vars.getJavaDataTimeFormat();
-    this.jsDateFormat = vars.getJsDateFormat();
-    this.sqlDateFormat = vars.getSqlDateFormat();
-    this.accessLevel = vars.getAccessLevel();
+    user = vars.getUser();
+    role = vars.getRole();
+    language = vars.getLanguage();
+    theme = vars.getTheme();
+    client = vars.getClient();
+    organization = vars.getOrg();
+    warehouse = vars.getWarehouse();
+    command = vars.getCommand();
+    userClient = vars.getUserClient();
+    userOrganization = vars.getUserOrg();
+    dbSessionID = vars.getDBSession();
+    javaDateFormat = vars.getJavaDateFormat();
+    javaDateTimeFormat = vars.getJavaDataTimeFormat();
+    jsDateFormat = vars.getJsDateFormat();
+    sqlDateFormat = vars.getSqlDateFormat();
+    accessLevel = vars.getAccessLevel();
+    roleSecurity = true;
+  }
 
-    this.roleSecurity = true;
+  private ProcessContext(JSONObject json) throws JSONException {
+    user = getStringProperty(json, "user");
+    role = getStringProperty(json, "role");
+    language = getStringProperty(json, "language");
+    theme = getStringProperty(json, "theme");
+    client = getStringProperty(json, "client");
+    organization = getStringProperty(json, "organization");
+    warehouse = getStringProperty(json, "warehouse");
+    command = getStringProperty(json, "command");
+    userClient = getStringProperty(json, "userClient");
+    userOrganization = getStringProperty(json, "userOrganization");
+    dbSessionID = getStringProperty(json, "dbSessionID");
+    javaDateFormat = getStringProperty(json, "javaDateFormat");
+    javaDateTimeFormat = getStringProperty(json, "javaDateTimeFormat");
+    jsDateFormat = getStringProperty(json, "jsDateFormat");
+    sqlDateFormat = getStringProperty(json, "sqlDateFormat");
+    accessLevel = getStringProperty(json, "accessLevel");
+    roleSecurity = getBooleanProperty(json, "roleSecurity");
+  }
 
+  private String getStringProperty(JSONObject json, String property) throws JSONException {
+    return json.has(property) ? json.getString(property) : null;
+  }
+
+  private boolean getBooleanProperty(JSONObject json, String property) throws JSONException {
+    return json.has(property) ? json.getBoolean(property) : false;
   }
 
   /**
@@ -227,25 +260,58 @@
   }
 
   /**
-   * @return a JSON string representation of this obContext
+   * @return a JSON string representation of this ProcessContext
    */
   @Override
   public String toString() {
-    XStream xstream = new XStream(new JettisonMappedXmlDriver());
-    return xstream.toXML(this);
+    return toJSON().toString();
+  }
+
+  private JSONObject toJSON() {
+    JSONObject jsonObject = new JSONObject();
+    try {
+      JSONObject properties = new JSONObject();
+      properties.put("user", user);
+      properties.put("role", role);
+      properties.put("language", language);
+      properties.put("theme", theme);
+      properties.put("client", client);
+      properties.put("organization", organization);
+      properties.put("warehouse", warehouse);
+      properties.put("command", command);
+      properties.put("userClient", userClient);
+      properties.put("userOrganization", userOrganization);
+      properties.put("dbSessionID", dbSessionID);
+      properties.put("javaDateFormat", javaDateFormat);
+      properties.put("javaDateTimeFormat", javaDateTimeFormat);
+      properties.put("jsDateFormat", jsDateFormat);
+      properties.put("sqlDateFormat", sqlDateFormat);
+      properties.put("accessLevel", accessLevel);
+      properties.put("roleSecurity", roleSecurity);
+      jsonObject.put(ProcessContext.class.getName(), properties);
+    } catch (JSONException ignore) {
+    }
+    return jsonObject;
   }
 
   /**
-   * @param arg0
-   *          the xml to create the process context from
-   * @return a new instance created from the string argument (an xml definition)
+   * @param processContext
+   *          a String with the JSON representation of a ProcessContext
+   * @return a new instance created from the provided JSON representation of a ProcessContext. This
+   *         method returns null if the provided String is null, empty or if it is an invalid JSON
+   *         definition of a ProcessContext.
    */
-  public synchronized static ProcessContext newInstance(String arg0) {
-    if (arg0 == null || arg0.trim().equals("")) {
+  public static ProcessContext newInstance(String processContext) {
+    if (StringUtils.isBlank(processContext)) {
       return null;
     }
-    XStream xstream = new XStream(new JettisonMappedXmlDriver());
-    return (ProcessContext) xstream.fromXML(arg0);
+    try {
+      JSONObject json = new JSONObject(processContext);
+      return new ProcessContext(json.getJSONObject(ProcessContext.class.getName()));
+    } catch (JSONException ex) {
+      log.error("Error creating ProcessContext from String representation: {}", processContext, ex);
+      return null;
+    }
   }
 
 }
--- a/src/org/openbravo/service/web/BaseWebServiceServlet.java	Tue May 14 00:54:35 2019 +0200
+++ b/src/org/openbravo/service/web/BaseWebServiceServlet.java	Thu May 16 17:03:52 2019 +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) 2008-2018 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2019 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -38,6 +38,7 @@
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.core.SessionHandler;
+import org.openbravo.database.SessionInfo;
 
 /**
  * This servlet has two main responsibilities: 1) authenticate, 2) set the correct {@link OBContext}
@@ -115,6 +116,9 @@
       log.debug("WS accessed by userId " + userId);
       OBContext.setOBContext(UserContextCache.getInstance().getCreateOBContext(userId));
       OBContext.setOBContextInSession(request, OBContext.getOBContext());
+      SessionInfo.setUserId(userId);
+      SessionInfo.setProcessType("WS");
+      SessionInfo.setProcessId("DAL");
       try {
         doService(request, response);
       } finally {