Merge temporary head for 3.0PR18Q4.1
authorRM packaging bot <staff.rm@openbravo.com>
Thu, 27 Dec 2018 10:43:52 +0000
changeset 35295 151d5fd98619
parent 35288 66e06419d62f (diff)
parent 35294 fc7b81f5ebb9 (current diff)
child 35296 5f484db5ed98
Merge temporary head for 3.0PR18Q4.1
.hgsigs
.hgtags
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java
modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
src-db/database/sourcedata/AD_MODULE.xml
src/org/openbravo/dal/service/OBDal.java
--- a/.hgignore	Wed Dec 26 06:46:29 2018 +0000
+++ b/.hgignore	Thu Dec 27 10:43:52 2018 +0000
@@ -26,7 +26,10 @@
 config/instance.revision
 config/eclipse/hibernate.cfg.xml
 src/result.xml
+config/log4j2.xml
+config/log4j2-web.xml
 
+src-test/src/log4j2-test.xml
 src-db/database/lib/dbmanager.jar
 src-db/database/formalChangesScript.xml
 src-core/lib/openbravo-core.jar
--- a/.hgsigs	Wed Dec 26 06:46:29 2018 +0000
+++ b/.hgsigs	Thu Dec 27 10:43:52 2018 +0000
@@ -233,6 +233,11 @@
 2121d856284cf0c4f26faef336bd2aa41ada151f 0 iEYEABECAAYFAlr8AykACgkQCX/oGf+2qkPKhQCfeQ+9S16IA3wZMgnoJjRRZRvG8SUAoIgKQPopjsjObnB6Qu1DyNgCByRt
 faeac12b1aad3dc7fb53f8ffda3ada9e3b7deaeb 0 iEYEABECAAYFAls/boQACgkQCX/oGf+2qkNdfACfaNh5oqLf0LzgGAYLmRWa97kbFj4AoL3KPdVDG0Mf6qKcxejAl7Kl12cd
 69fa322764529bb77cd3ef3b7b5dd33f6667e560 0 iEYEABECAAYFAlt1MD4ACgkQCX/oGf+2qkPU4wCgnCdQrG3eWxbDWbitjSsm6XvbQ6IAni9v1H03pkrhgPmaS97Ft9MOHVhO
+a3dec60771dbfb34de34e735d05f10fa7a0ba7f7 0 iEYEABECAAYFAlvW4j8ACgkQCX/oGf+2qkMXngCgktuuCJKOHrfxbcd0/Y89CN/NGP0AnAv1h6DqduuUlId9b288f61gCaZ2
 bbb6e342b4af3c81bd1a49418a01e63fcb09e3c5 0 iEYEABECAAYFAltpYMEACgkQCX/oGf+2qkMblgCffRsYLqTbeixIj19Lm3dm6iMqkv0AoM3iSQaEFeV7ff9nYRd3vz227Ir6
 51e0d0e9566b3a1e0e7e08e8bd089b77ae779688 0 iEYEABECAAYFAlukneUACgkQCX/oGf+2qkP8ngCgiC3Jo4cDL8F35HXpqHL3QtD46kUAn0znm6h/Ad3r0f/rJXf6dJli+zjK
+6a52d785570ecc2a63ba164aa50efa0b463917bd 0 iEYEABECAAYFAlvXCzAACgkQCX/oGf+2qkP3xQCgqKlwdDqMVRAsTFoEwi8gK16UtRIAnRVH6VaLpC/Yh7OgsjpO+rzj9AKp
+858933b8d4f0bd4ee7e278e2530a1b476a8e4fa9 0 iEYEABECAAYFAlv74bwACgkQCX/oGf+2qkNQCwCgl168atYYGOuVSkFeqvY6bAXC3m8An1eBFNK0jTdGC1TSahJ2gyQu/GOe
+6f6d0aa1ad00e1429e8c9c3322a4f2548ba485c4 0 iEYEABECAAYFAlwjGDMACgkQCX/oGf+2qkNG7ACg378s5KJSDSn+XVb/oX2psQa/UAEAoKTvf3TWRu6zu26eDxZCDIXPJCvp
+75b4bc3d1f6f172a24506f5f72ce3137fa23aa7b 0 iF0EABECAB0WIQQwlWrRXxlUdnEi7O8Jf+gZ/7aqQwUCXA380QAKCRAJf+gZ/7aqQz70AKCz/O6ZFoJ9ewfn1JayCUThy5+mrQCeMkwewiAYcsfmFxp16XA497wv158=
 e608a90d459c54db28903268ce5930e230af8e6f 0 iF0EABECAB0WIQQwlWrRXxlUdnEi7O8Jf+gZ/7aqQwUCXCMjxQAKCRAJf+gZ/7aqQzC/AJ9XbUfKrdRJWO2jbnBYCFGSeUQsDwCgiOfjBtc3k+hWxB6NWUPukzcduoo=
--- a/.hgtags	Wed Dec 26 06:46:29 2018 +0000
+++ b/.hgtags	Thu Dec 27 10:43:52 2018 +0000
@@ -244,6 +244,11 @@
 63c5e173ffdca0828d75476e5a48e2fae42ad9e9 3.0PR18Q1.3
 3f281a901fbbde5103faebca4df0c22b94ac5535 3.0PR18Q2.1
 72cf5779eb218bb25914b1aadade7fde01c67842 3.0PR18Q2.2
+26a3469df96bb87c3517889ba412bde73f17f3f7 3.0PR18Q2.3
 5cbef591aff09f80e8a73a92202d438b792ad40f 3.0PR18Q3
 2f706d7a458e736b7b6add7ca445132c5e0b9758 3.0PR18Q3.1
+b8cd708f773317970a8024f2e5b6c0ea4417e4b5 3.0PR18Q3.2
+5a97b89aa2f1202519525757dcfb699ec267e794 3.0PR18Q3.3
+9ea275f262ba099f339fa9f06a87836b605d6123 3.0PR18Q3.4
+9a7acd649cfcb6ea234c52263051d7e33e4ce333 3.0PR18Q4
 a67abc7a3690347038295600eeb97f92460cc742 3.0PR18Q4.1
--- a/build.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/build.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -234,6 +234,7 @@
     <fileset dir="${build.wad.lib}">
       <include name="openbravo-wad.jar" />
     </fileset>
+    <pathelement path="${base.config}" />
   </path>
 
   <path id="project.class.path">
@@ -241,6 +242,7 @@
       <include name="*/build/classes/" />
     </dirset>
     <pathelement path="${basedir}/src-util/modulescript/build/classes/" />
+    <pathelement path="${base.config}" />
     <pathelement path="${build}" />
     <pathelement path="${base.src}" />
     <fileset dir="${base.lib}">
@@ -275,6 +277,7 @@
     </dirset>
     <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
     <pathelement path="${build.apply.module}" />
+    <pathelement path="${base.config}" />
     <pathelement path="${base.src}" />
     <fileset dir="${base.lib}">
       <include name="**/*.jar" />
@@ -305,6 +308,7 @@
       <include name="*/build/classes/" />
     </dirset>
     <pathelement path="${basedir}/../../src-util/modulescript/build/classes/" />
+    <pathelement path="${base.config}" />
     <pathelement path="${build.apply.module}" />
     <pathelement path="${build}" />
     <pathelement path="${base.src}" />
@@ -426,11 +430,6 @@
     <ant dir="${base.db}" target="setApplied" inheritAll="true" inheritRefs="true" />
     <antcall target="build.deploy" />
     <updatesystemstatuswhennot v="RB51" previous="RB12"/>
-    <!-- only restart tomcat if the restart prop was set to true -->
-    <condition property="dorestart">
-      <istrue value="${restart}" />
-    </condition>
-    <antcall target="if.restart.tomcat" />
   </target>
 
   <target name="update.database.if.no.local" if="no.local">
@@ -459,10 +458,6 @@
     <antcall target="war" />
   </target>
 
-  <target name="if.restart.tomcat" if="dorestart">
-    <antcall target="tomcat.restart" />
-  </target>
-
   <target name="compile" depends="init,core.lib, wad.lib, trl.lib">
     <ant dir="${base.src}" target="compile" inheritAll="true" inheritRefs="true" />
   </target>
@@ -615,7 +610,6 @@
                   password="${bbdd.password}" 
                   stableDBdir="${stableDBdir}"
                   testDBdir="${basedir}"
-                  verbosity="${bbdd.verbosity}"
                   modules="${modules}"
     />    
   </target>
@@ -807,7 +801,7 @@
 		This task is called from the Openbravo ui, it spawns a java call which again
 		calls the restart.tomcat.do task as a spawned task.
 	-->
-  <target name="tomcat.restart" description="Restart the tomcat server process">
+  <target name="tomcat.restart">
     <echo message="Restarting tomcat..." />
     <java classname="org.openbravo.service.system.RestartTomcat" spawn="true" fork="true" maxmemory="${build.maxmemory}">
       <arg line="${base.src}" />
@@ -818,7 +812,7 @@
   <!--
 		Is called by the org.openbravo.service.system.RestartTomcat class.
 	-->
-  <target name="tomcat.restart.do" description="Restart the tomcat server process">
+  <target name="tomcat.restart.do">
     <echo message="Restarting Tomcat at ${env.CATALINA_HOME}" />
     <java classname="org.apache.catalina.startup.Bootstrap" fork="true">
       <classpath path=":${env.CATALINA_HOME}/bin/bootstrap.jar:${env.CATALINA_HOME}/bin/commons-logging-api.jar:${env.CATALINA_HOME}/bin/tomcat-juli.jar" />
@@ -844,25 +838,6 @@
     </java>
   </target>
 
-  <!-- 
-		This task is called from the Openbravo ui, it spawns a java call which again
-		calls the tomcat.reload.do task as a spawned task.
-	-->
-  <target name="tomcat.reload" description="Reload the Openbravo context">
-    <echo message="Reloading webapp..." />
-    <java classname="org.openbravo.service.system.ReloadContext" jvm="${env.JAVA_HOME}/bin/java" maxmemory="${build.maxmemory}" spawn="true" fork="true">
-      <arg line="${base.src}" />
-      <classpath refid="project.class.path" />
-    </java>
-  </target>
-
-  <target name="tomcat.reload.do">
-    <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask">
-      <classpath refid="project.class.path" />
-    </taskdef>
-    <reload url="${tomcat.manager.url}" username="${tomcat.manager.username}" password="${tomcat.manager.password}" path="/${context.name}" />
-  </target>
-
   <target name="tomcat.list">
     <taskdef name="list" classname="org.apache.catalina.ant.ListTask">
       <classpath refid="project.class.path" />
@@ -950,7 +925,7 @@
     <taskdef name="configurationApp" classname="org.openbravo.configuration.ConfigurationApp">
       <classpath refid="project.class.path" />
     </taskdef>
-    <configurationApp/>
+    <configurationApp nonInteractive="${nonInteractive}" acceptLicense="${acceptLicense}"/>
     </target>
   
   <target name="package.core" depends="init, set.version.number">
@@ -1022,7 +997,9 @@
       <arg line="'${base.config}/Openbravo.properties' ${logFileName}" />
       <classpath>
         <pathelement path="${build.core.lib}/openbravo-core.jar" />
-        <pathelement path="${base.lib}/runtime/log4j-1.2.16.jar" />
+        <pathelement path="${base.lib}/runtime/log4j-1.2-api-2.11.1.jar" />
+        <pathelement path="${base.lib}/runtime/log4j-api-2.11.1.jar" />
+        <pathelement path="${base.lib}/runtime/log4j-core-2.11.1.jar" />
         <pathelement path="${base.lib}/runtime/commons-pool-1.5.6.jar" />
         <pathelement path="${base.lib}/runtime/commons-dbcp-1.4.jar" />
         <pathelement path="${base.lib}/runtime/postgresql-42.2.2.jre7.jar" />
--- a/config/Openbravo.properties.template	Wed Dec 26 06:46:29 2018 +0000
+++ b/config/Openbravo.properties.template	Thu Dec 27 10:43:52 2018 +0000
@@ -119,7 +119,6 @@
 ##########################
 
 bbdd.outputscript=databasescript.sql
-bbdd.verbosity=INFO
 
 # use js/css minimization (in local-context and war-file)
 minimizeJSandCSS=yes
--- a/config/log4j.lcf.template	Wed Dec 26 06:46:29 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-# *************************************************************************
-# * 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) 2007-2013 Openbravo SLU
-# * All Rights Reserved. 
-# * Contributor(s):  ______________________________________.
-# ************************************************************************
-
-# to enable logging in i.e. eclipse console add ", C" to the line below
-log4j.rootCategory=INFO, R
-
-# Set our global levels
-log4j.category.org=WARN
-log4j.category.org.openbravo=INFO
-
-log4j.appender.R=org.apache.log4j.RollingFileAppender
-log4j.appender.R.File=${catalina.base}/logs/openbravo.log
-log4j.appender.R.MaxFileSize=10000KB
-
-# R uses PatternLayout.
-log4j.appender.R.layout=org.apache.log4j.PatternLayout
-log4j.appender.R.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c - %m%n
-
-# Keep one backup file
-log4j.appender.R.MaxBackupIndex=1
-
-# C is an optional ConsoleAppender for usage in i.e. Eclipse
-log4j.appender.C=org.apache.log4j.ConsoleAppender
-log4j.appender.C.layout=org.apache.log4j.PatternLayout
-log4j.appender.C.layout.ConversionPattern=%-4r [%t] %-5p %c - %m%n
-
-log4j.category.reloadXml=ERROR
-
-# To debug an specific class
-#log4j.category.org.openbravo.erpCommon.ad_process=DEBUG
-
-#****************************************************
-# Hibernate
-#****************************************************
-log4j.appender.HB=org.apache.log4j.RollingFileAppender
-log4j.appender.HB.File=${catalina.base}/logs/openbravo_hibernate.log
-log4j.appender.HB.MaxFileSize=10000KB
-
-# R uses PatternLayout.
-log4j.appender.HB.layout=org.apache.log4j.PatternLayout
-log4j.appender.HB.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c - %m%n
-
-# Keep one backup file
-log4j.appender.HB.MaxBackupIndex=1
-
-log4j.logger.org.hibernate=error, HB
-
-### log HQL query parser activity
-#log4j.logger.org.hibernate.hql.ast.AST=error, HB
-
-### log just the SQL
-log4j.logger.org.hibernate.SQL=error, HB
-
-### log JDBC bind parameters ###
-log4j.logger.org.hibernate.type=error, HB
-
-### log schema export/update ###
-log4j.logger.org.hibernate.tool.hbm2ddl=error, HB
-
-### log HQL parse trees
-log4j.logger.org.hibernate.hql=error, HB
-
-### log cache activity ###
-log4j.logger.org.hibernate.cache=error, HB
-
-### log transaction activity
-log4j.logger.org.hibernate.transaction=error, HB
-
-### log JDBC resource acquisition
-log4j.logger.org.hibernate.jdbc=error, HB
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/log4j2-web.xml.template	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *************************************************************************
+ * 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) 2018 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<!-- Logger configuration used when running as a web application in a container (e.g. Tomcat) -->
+<!-- Rebuild tasks executed from Module Management Window uses the build config file (log4j2.xml) -->
+<Configuration>
+  <Properties>
+    <Property name="logDir">${env:CATALINA_BASE}/logs</Property>
+  </Properties>
+
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="RollingFile"/>
+      <!-- Add this appender to show log messages in console i.e Eclipse: -->
+      <!-- <AppenderRef ref="Console"/> -->
+    </Root>
+
+    <Logger name="reloadXml" level="error"/>
+    <Logger name="org.hibernate" level="error"/>
+
+    <!-- To debug a specific class/package: -->
+    <!-- <Logger name="org.openbravo.erpCommon.ad_process" level="debug"/> -->
+  </Loggers>
+
+  <Appenders>
+    <RollingFile name="RollingFile" fileName="${logDir}/openbravo.log"
+                 filePattern="${logDir}/openbravo-%d{yyyyMMdd}-%i.log.gz">
+      <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
+      <Policies>
+        <SizeBasedTriggeringPolicy size="100MB" />
+        <TimeBasedTriggeringPolicy />
+      </Policies>
+      <DefaultRolloverStrategy max="30"/>
+    </RollingFile>
+
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c - %m%n"/>
+    </Console>
+  </Appenders>
+</Configuration>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/log4j2.xml.template	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *************************************************************************
+ * 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) 2018 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<!-- Logger configuration used in all build tasks -->
+<!-- Note that this config is also used in rebuild tasks executed from the Module Management window in the backoffice -->
+<Configuration packages="org.openbravo.utils">
+  <Loggers>
+    <Root level="info">
+      <AppenderRef ref="Console"/>
+
+      <!-- OBRebuildAppender is required for rebuilding from the GUI -->
+      <AppenderRef ref="OBRebuildAppender"/>
+    </Root>
+
+    <Logger name="org.hibernate" level="error"/>
+
+    <Logger name="reloadXml" level="error"/>
+
+    <!-- To debug a specific class/package: -->
+    <!-- <Logger name="org.openbravo.erpCommon.modules.ApplyModuleTask" level="debug"/> -->
+  </Loggers>
+
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%-5r [%t] %-5p %c - %m%n"/>
+    </Console>
+
+    <OBRebuildAppender name="OBRebuildAppender"/>
+  </Appenders>
+</Configuration>
--- a/legal/Licensing.txt	Wed Dec 26 06:46:29 2018 +0000
+++ b/legal/Licensing.txt	Thu Dec 27 10:43:52 2018 +0000
@@ -89,7 +89,6 @@
 Copyright (c) 2007, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: (http://developer.yahoo.net/yui/license.txt)
 
 # ant-1.9.2.jar
-# ant-apache-log4j-1.9.2.jar
 # ant-launcher-1.9.2.jar
 # ant-nodeps.jar
 # avalon-framework-4.1.5.jar
@@ -124,7 +123,11 @@
 # fop-1.1.jar
 # jakarta-oro-2.0.8.jar
 # jettison-1.3-patched.jar
-# log4j-1.2.16.jar
+# log4j-api-2.11.1.jar
+# log4j-core-2.11.1.jar
+# log4j-web-2.11.1.jar
+# log4j-slf4j-impl-2.11.1.jar
+# log4j-1.2-api-2.11.1.jar
 # quartz-1.6.2.jar
 # servlet-api.jar 
 # tika-core-0.9.jar
@@ -195,8 +198,7 @@
 # javassist-3.22.0-GA.jar
 Under MPL License (included as MPL-1.1.txt in this folder)
 
-# slf4j-api-1.6.1.jar
-# slf4j-log4j12-1.6.1.jar
+# slf4j-api-1.7.25.jar
 Under MIT license. (available at http://www.slf4j.org/license.html)
 
 # freemarker-2.3.16.jar
@@ -218,7 +220,7 @@
 Under the LGPL license (included as LGPL-2.1.txt in this folder)
 
 # cal10n-api-0.7.7.jar
-# slf4j-ext-1.6.1.jar
+# slf4j-ext-1.7.25.jar
 Under the MIT license (available at http://www.slf4j.org/license.html)
 
 # cdi-api.jar
Binary file lib/runtime/ant-apache-log4j-1.9.2.jar has changed
Binary file lib/runtime/log4j-1.2-api-2.11.1.jar has changed
Binary file lib/runtime/log4j-1.2.16.jar has changed
Binary file lib/runtime/log4j-api-2.11.1.jar has changed
Binary file lib/runtime/log4j-core-2.11.1.jar has changed
Binary file lib/runtime/log4j-slf4j-impl-2.11.1.jar has changed
Binary file lib/runtime/log4j-web-2.11.1.jar has changed
Binary file lib/runtime/slf4j-api-1.6.1.jar has changed
Binary file lib/runtime/slf4j-api-1.7.25.jar has changed
Binary file lib/runtime/slf4j-log4j12-1.6.1.jar has changed
--- a/log4j.lcf	Wed Dec 26 06:46:29 2018 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-# Set root category priority to DEBUG and its only appender to A1.
-log4j.rootCategory=WARN, A1
-  
-# A1 is set to be a ConsoleAppender. 
-log4j.appender.A1=org.apache.log4j.ConsoleAppender
-  
-# A1 uses PatternLayout.
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c - %m%n
-
-log4j.category.org.openbravo.wad=DEBUG
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -83,6 +83,8 @@
 v_PricePr NUMBER;
 v_isinvoicepaid CHAR(1):= 'N';
 v_IsCashVAT C_Invoice.IsCashVAT%TYPE;
+v_prepaymentamt NUMBER;
+v_hasPrepaymentToReturn BOOLEAN := false;
 
 TYPE RECORD IS REF CURSOR;
 Cur_Params RECORD;
@@ -126,13 +128,13 @@
       C_BPartner_ID, DateInvoiced, totallines, fin_paymentmethod_id,
       fin_payment_priority_id, documentNo, poreference,
       c_project_id, c_campaign_id, c_activity_id, user1_id, user2_id, c_costcenter_id,
-      IsCashVAT
+      IsCashVAT, prepaymentamt
   INTO v_Client_ID, v_Org_ID, v_DocTypeTarget_ID, v_IsSOTrx,
       v_GrandTotal, v_PaymentTerm, v_PaymentRule, v_Currency_ID,
       v_BPartner_ID, v_DateInvoiced, v_totallines, v_PaymentMethod,
       v_PaymentPriority, v_documentno, v_poreference,
       v_project_id, v_campaign_id, v_activity_id, v_user1, v_user2, v_costcenter,
-      v_IsCashVAT
+      v_IsCashVAT, v_prepaymentamt
   FROM c_invoice
   WHERE c_invoice_id=p_record_id;
   
@@ -265,11 +267,18 @@
       INTO v_ConsumedGranTotal
       FROM fin_payment_schedule ps
       WHERE ps.c_invoice_id = p_record_id;
+
+      --When the Total Amount of the Invoice is 0 and nothing has been consumed yet for the Invoice
+      --but there is already a prepayment made for a related Order
+      --Related to Issue https://issues.openbravo.com/view.php?id=39415
+      IF (v_GrandTotal = 0 AND v_ConsumedGranTotal = 0 AND v_prepaymentamt <> 0) THEN
+        v_hasPrepaymentToReturn := true;
+      END IF;
             
       --Insert Payment Schedules for Invoices
       v_pendingAmount := v_GrandTotal - coalesce(v_ConsumedGranTotal, 0);
 
-      IF (v_pendingAmount <> 0) THEN
+      IF (v_pendingAmount <> 0 OR v_hasPrepaymentToReturn) THEN
 
         --get number of payment schedules expected for the invoice
         SELECT count(*) INTO v_paymentcount
@@ -1168,8 +1177,6 @@
     END;
 
   ELSIF (p_docaction = 'RC') THEN
-    DECLARE
-      v_prepaymentamt NUMBER;
     BEGIN
       v_delete_paymentplan := TRUE;
       SELECT c_invoice_id INTO v_reversalinvoice_id
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></NAME>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.34849]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.35272]]></VERSION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements.
 If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP>
@@ -25,7 +25,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <UPDATEINFO><![CDATA[Fixed issue with document sequence numbers reset in case of applying dataset second time.
 Fixed issue 15305.]]></UPDATEINFO>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <REFERENCEDATAINFO><![CDATA[Document types and default algorithm for bank statement auto matching]]></REFERENCEDATAINFO>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A918E3331C404B889D69AA9BFAFB23AC--></AD_MODULE>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--B97FC854C6DD41E692161585645A900F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--B97FC854C6DD41E692161585645A900F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/TransactionsWithMissingDataData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/TransactionsWithMissingDataData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class TransactionsWithMissingDataData implements FieldProvider {
-static Logger log4j = Logger.getLogger(TransactionsWithMissingDataData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String documentno;
   public String finFinaccTransactionId;
--- a/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/UniquePaymentForTransactionData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/UniquePaymentForTransactionData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UniquePaymentForTransactionData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UniquePaymentForTransactionData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String documentno;
   public String finPaymentId;
--- a/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/UnpostRefundPaymentsData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/UnpostRefundPaymentsData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UnpostRefundPaymentsData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UnpostRefundPaymentsData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String adClientId;
   public String adOrgId;
--- a/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/WrongPaymentScheduleDetailsCheckData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/buildvalidation/src/src/org/openbravo/advpaymentmngt/buildvalidation/WrongPaymentScheduleDetailsCheckData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class WrongPaymentScheduleDetailsCheckData implements FieldProvider {
-static Logger log4j = Logger.getLogger(WrongPaymentScheduleDetailsCheckData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String client;
   public String documentno;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.UUID;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -31,7 +32,7 @@
 import org.openbravo.modulescript.OpenbravoVersion;
 
 public class CreateAccountingConfiguration extends ModuleScript {
-  private static final Logger log4j = Logger.getLogger(CreateAccountingConfiguration.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   @Override
   // Inserting:
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateDocumentNoSequence.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateDocumentNoSequence.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.UUID;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/DeleteWrongTransactions.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/DeleteWrongTransactions.java	Thu Dec 27 10:43:52 2018 +0000
@@ -18,7 +18,8 @@
  */
 package org.openbravo.advpaymentmngt.modulescript;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import java.sql.Connection;
 import org.openbravo.utils.FormatUtilities;
 import org.openbravo.database.ConnectionProvider;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/LinkCreditPayments.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/LinkCreditPayments.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,14 +22,15 @@
 
 import javax.servlet.ServletException;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.modulescript.ModuleScript;
 import org.openbravo.modulescript.ModuleScriptExecutionLimits;
 import org.openbravo.modulescript.OpenbravoVersion;
 
 public class LinkCreditPayments extends ModuleScript {
-  private static final Logger log4j = Logger.getLogger(LinkCreditPayments.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   @Override
   public void execute() {
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateGeneratedUsedCreditColumns.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateGeneratedUsedCreditColumns.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.UUID;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationProcessButtonValue.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationProcessButtonValue.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.UUID;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfigurationData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfigurationData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class CreateAccountingConfigurationData implements FieldProvider {
-static Logger log4j = Logger.getLogger(CreateAccountingConfigurationData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String cAcctschemaId;
   public String adClientId;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/CreateDocumentNoSequenceData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/CreateDocumentNoSequenceData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class CreateDocumentNoSequenceData implements FieldProvider {
-static Logger log4j = Logger.getLogger(CreateDocumentNoSequenceData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String tablename;
   public String client;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/DeleteWrongTransactionsData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/DeleteWrongTransactionsData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class DeleteWrongTransactionsData implements FieldProvider {
-static Logger log4j = Logger.getLogger(DeleteWrongTransactionsData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String finPaymentId;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/InitializeAPRMReadyPreferenceData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/InitializeAPRMReadyPreferenceData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class InitializeAPRMReadyPreferenceData implements FieldProvider {
-static Logger log4j = Logger.getLogger(InitializeAPRMReadyPreferenceData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String exist;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSDData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSDData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class Issue28591UpdatePSDData implements FieldProvider {
-static Logger log4j = Logger.getLogger(Issue28591UpdatePSDData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String finPaymentScheduledetailId;
   public String outstandingamt;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/LinkCreditPaymentsData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/LinkCreditPaymentsData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class LinkCreditPaymentsData implements FieldProvider {
-static Logger log4j = Logger.getLogger(LinkCreditPaymentsData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String finPaymentId;
   public String usedCredit;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalanceData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateCustomerBalanceData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdateCustomerBalanceData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateCustomerBalanceData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String cBpartnerId;
   public String customercredit;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateGeneratedUsedCreditColumnsData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateGeneratedUsedCreditColumnsData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdateGeneratedUsedCreditColumnsData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateGeneratedUsedCreditColumnsData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String rowCount;
   public String type;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateMatchedDocumentData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateMatchedDocumentData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -12,7 +13,7 @@
 import org.openbravo.data.UtilSql;
 
 class UpdateMatchedDocumentData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateMatchedDocumentData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String existpreference;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentProcessedValueData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentProcessedValueData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdatePaymentProcessedValueData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdatePaymentProcessedValueData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String name;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentScheduledetailData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdatePaymentScheduledetailData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdatePaymentScheduledetailData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdatePaymentScheduledetailData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String finPaymentScheduledetailId;
   public String outstandingamt;
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationProcessButtonValueData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationProcessButtonValueData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdateReconciliationProcessButtonValueData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateReconciliationProcessButtonValueData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String name;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationStatementProcessedValueData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateReconciliationStatementProcessedValueData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdateReconciliationStatementProcessedValueData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateReconciliationStatementProcessedValueData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String name;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2ValueData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2ValueData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdateRecordId2ValueData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateRecordId2ValueData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String name;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionBPExchangeRateData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionBPExchangeRateData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdateTransactionBPExchangeRateData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateTransactionBPExchangeRateData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String name;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateTransactionTypeTransactionTabData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class UpdateTransactionTypeTransactionTabData implements FieldProvider {
-static Logger log4j = Logger.getLogger(UpdateTransactionTypeTransactionTabData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String name;
 
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/WrongPaymentsFromJournalLineData.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/WrongPaymentsFromJournalLineData.java	Thu Dec 27 10:43:52 2018 +0000
@@ -3,7 +3,8 @@
 
 import java.sql.*;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import javax.servlet.ServletException;
 
@@ -13,7 +14,7 @@
 import java.util.*;
 
 class WrongPaymentsFromJournalLineData implements FieldProvider {
-static Logger log4j = Logger.getLogger(WrongPaymentsFromJournalLineData.class);
+static Logger log4j = LogManager.getLogger();
   private String InitRecordNumber="0";
   public String adClientId;
   public String paymentinfo;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/APRMActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/APRMActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -20,7 +20,8 @@
 
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+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.client.kernel.BaseActionHandler;
@@ -29,7 +30,7 @@
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 
 public class APRMActionHandler extends BaseActionHandler {
-  private static final Logger log = Logger.getLogger(APRMActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String BANK_TRANSITORY_CALLOUT_RESPONSE = "bankTransitoryCalloutResponse";
 
   @Override
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddMultiplePaymentsHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddMultiplePaymentsHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -19,10 +19,19 @@
 package org.openbravo.advpaymentmngt.actionHandler;
 
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import javax.enterprise.inject.Any;
+import javax.enterprise.inject.Instance;
+import javax.inject.Inject;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -39,9 +48,12 @@
 import org.openbravo.service.json.JsonUtils;
 
 public class AddMultiplePaymentsHandler extends BaseProcessActionHandler {
-  private static final Logger log = Logger.getLogger(AddMultiplePaymentsHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final SimpleDateFormat jsDateFormat = JsonUtils.createDateFormat();
   private static final String ACTION_PROCESS_TRANSACTION = "P";
+  @Inject
+  @Any
+  private Instance<AddMultiplePaymentsProcessAfterProcessHook> afterHooks;
 
   @Override
   protected JSONObject doExecute(Map<String, Object> parameters, String data) {
@@ -56,16 +68,33 @@
       final String strAccountId = jsonData.getString("Fin_Financial_Account_ID");
 
       int selectedPaymentsLength = selectedPayments.length();
-      if (selectedPaymentsLength == 0) {
-        // Validation error: No lines selected
-        return getErrorMessage(OBMessageUtils.messageBD("APRM_NO_PAYMENTS_SELECTED"));
-      }
 
       for (int i = 0; i < selectedPaymentsLength; i++) {
         final JSONObject paymentJS = selectedPayments.getJSONObject(i);
         createAndProcessTransactionFromPayment(paymentJS, statementDate, dateAcct, strAccountId);
         OBDal.getInstance().getSession().clear();
       }
+
+      List<AddMultiplePaymentsProcessAfterProcessHook> hooksPriority = new ArrayList<AddMultiplePaymentsProcessAfterProcessHook>();
+      for (AddMultiplePaymentsProcessAfterProcessHook hook : afterHooks) {
+        hooksPriority.add(hook);
+      }
+      Collections.sort(hooksPriority, new Comparator<AddMultiplePaymentsProcessAfterProcessHook>() {
+        @Override
+        public int compare(AddMultiplePaymentsProcessAfterProcessHook o1,
+            AddMultiplePaymentsProcessAfterProcessHook o2) {
+          return (int) Math.signum(o2.getPriority() - o1.getPriority());
+        }
+      });
+      for (AddMultiplePaymentsProcessAfterProcessHook hook : hooksPriority) {
+        selectedPaymentsLength = selectedPaymentsLength + hook.executeHook(jsonData);
+      }
+
+      if (selectedPaymentsLength == 0) {
+        // Validation error: No lines selected
+        return getErrorMessage(OBMessageUtils.messageBD("APRM_NO_PAYMENTS_SELECTED"));
+      }
+
       // Success Message
       return getSuccessMessage(String.format(
           OBMessageUtils.messageBD("APRM_MULTIPLE_TRANSACTIONS_ADDED"), selectedPaymentsLength));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddMultiplePaymentsProcessAfterProcessHook.java	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,31 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2016 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.advpaymentmngt.actionHandler;
+
+import org.codehaus.jettison.json.JSONObject;
+
+public abstract class AddMultiplePaymentsProcessAfterProcessHook {
+  private int priority = 100;
+
+  public abstract int executeHook(JSONObject data);
+
+  public int getPriority() {
+    return priority;
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -77,11 +77,11 @@
 import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.service.db.DbUtility;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddPaymentActionHandler extends BaseProcessActionHandler {
-  final private static Logger log = LoggerFactory.getLogger(AddPaymentActionHandler.class);
+  final private static Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject doExecute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentDisplayLogicActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentDisplayLogicActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -36,12 +36,11 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.service.db.DbUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddPaymentDisplayLogicActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddPaymentDisplayLogicActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected final JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentOnProcessActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentOnProcessActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -32,11 +32,11 @@
 import org.openbravo.model.common.businesspartner.BusinessPartner;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.service.db.DbUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddPaymentOnProcessActionHandler extends BaseActionHandler {
-  private static Logger log = LoggerFactory.getLogger(AddPaymentOnProcessActionHandler.class);
+  private static Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentReloadLabelsActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddPaymentReloadLabelsActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -34,12 +34,11 @@
 import org.openbravo.model.ad.ui.Element;
 import org.openbravo.model.ad.ui.ElementTrl;
 import org.openbravo.service.db.DbUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddPaymentReloadLabelsActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddPaymentReloadLabelsActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -52,11 +52,11 @@
 import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.service.db.DbUtility;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddTransactionActionHandler extends BaseProcessActionHandler {
-  private static final Logger log = LoggerFactory.getLogger(AddTransactionActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject doExecute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionOnChangePaymentActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/AddTransactionOnChangePaymentActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -28,8 +28,8 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Handler in Match Statement window | Add new transaction, that controls the Payment field on
@@ -37,8 +37,7 @@
  * 
  */
 public class AddTransactionOnChangePaymentActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddTransactionOnChangePaymentActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/CheckExistsOverissueBinForRFCShipmentWH.java	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,72 @@
+/*
+ *************************************************************************
+ * 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) 2018 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.advpaymentmngt.actionHandler;
+
+import java.util.Map;
+
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.client.kernel.BaseActionHandler;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
+import org.openbravo.model.common.enterprise.Locator;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+
+public class CheckExistsOverissueBinForRFCShipmentWH extends BaseActionHandler {
+  private static final Logger log = LogManager.getLogger();
+
+  @Override
+  protected JSONObject execute(Map<String, Object> parameters, String data) {
+    JSONObject result = new JSONObject();
+    JSONObject errorMessage = new JSONObject();
+    try {
+      final JSONObject jsonData = new JSONObject(data);
+      final String warehouseId = jsonData.getString("warehouseId");
+      Locator overIssueBin = getOverissueBinForWarehouse(warehouseId);
+      result.put("overissueBin", overIssueBin != null ? overIssueBin.getId() : "");
+      result
+          .put("storageBin$_identifier", overIssueBin != null ? overIssueBin.getIdentifier() : "");
+    } catch (Exception e) {
+      log.error("Error parsing JSON Object.", e);
+      try {
+        errorMessage = new JSONObject();
+        errorMessage.put("severity", "error");
+        errorMessage.put("title", "Error");
+        errorMessage.put("text", "");
+        result.put("message", errorMessage);
+        result.put("overissueBin", "");
+        result.put("storageBin$_identifier", "");
+      } catch (Exception e2) {
+        log.error("Message could not be built", e2);
+      }
+    }
+    return result;
+  }
+
+  private Locator getOverissueBinForWarehouse(String warehouseId) {
+    StringBuilder sbHQL = new StringBuilder(" as sb");
+    sbHQL.append(" where sb.warehouse.id = :warehouseId");
+    sbHQL.append(" and sb.inventoryStatus.overissue = true");
+    OBQuery<Locator> sbQuery = OBDal.getInstance().createQuery(Locator.class, sbHQL.toString());
+    sbQuery.setNamedParameter("warehouseId", warehouseId);
+    sbQuery.setMaxResult(1);
+    return sbQuery.uniqueResult();
+  }
+}
\ No newline at end of file
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/CheckRecordChangedActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/CheckRecordChangedActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -34,11 +34,11 @@
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class CheckRecordChangedActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory.getLogger(CheckRecordChangedActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/DoubtFulDebtPickEditLines.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/DoubtFulDebtPickEditLines.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,7 +25,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -48,7 +49,7 @@
 import org.openbravo.service.db.DbUtility;
 
 public class DoubtFulDebtPickEditLines extends BaseProcessActionHandler {
-  private static final Logger log = Logger.getLogger(DoubtFulDebtPickEditLines.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject doExecute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FindTransactionsToMatchActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FindTransactionsToMatchActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -34,12 +34,11 @@
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Reconciliation;
 import org.openbravo.service.db.DbUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class FindTransactionsToMatchActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(FindTransactionsToMatchActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FundsTransferActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FundsTransferActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -43,8 +43,8 @@
 import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This class implements the ability to transfer funds among financial accounts in a simple and
@@ -54,7 +54,7 @@
  */
 public class FundsTransferActionHandler extends BaseProcessActionHandler {
   private static final String ERROR_IN_PROCESS = "Error in process";
-  private static final Logger log = LoggerFactory.getLogger(FundsTransferActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String BP_DEPOSIT = "BPD";
   private static final String BP_WITHDRAWAL = "BPW";
   private static final String BANK_FEE = "BF";
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FundsTransferOnChangeDepositToActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FundsTransferOnChangeDepositToActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -24,12 +24,11 @@
 import org.openbravo.client.kernel.BaseActionHandler;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class FundsTransferOnChangeDepositToActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(FundsTransferOnChangeDepositToActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -34,11 +34,11 @@
 import org.openbravo.model.financialmgmt.payment.FIN_Reconciliation;
 import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.service.db.DbUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class MatchStatementActionHandler extends BaseProcessActionHandler {
-  private static final Logger log = LoggerFactory.getLogger(MatchStatementActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String OK_ACTION = "OK";
 
   @Override
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementOnLoadActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementOnLoadActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -40,12 +40,11 @@
 import org.openbravo.model.financialmgmt.payment.FIN_Reconciliation;
 import org.openbravo.model.financialmgmt.payment.MatchingAlgorithm;
 import org.openbravo.service.db.DbUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class MatchStatementOnLoadActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(MatchStatementOnLoadActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementOnLoadGetPreferenceActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/MatchStatementOnLoadGetPreferenceActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -27,12 +27,11 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.model.ad.domain.Preference;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class MatchStatementOnLoadGetPreferenceActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(MatchStatementOnLoadGetPreferenceActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/ModifyPaymentPlanActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/ModifyPaymentPlanActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -28,7 +28,8 @@
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -55,7 +56,7 @@
 public class ModifyPaymentPlanActionHandler extends BaseProcessActionHandler {
 
   private final AdvPaymentMngtDao dao = new AdvPaymentMngtDao();
-  private static final Logger log4j = Logger.getLogger(ModifyPaymentPlanActionHandler.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   @Override
   /**
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentProposalPickEditLines.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentProposalPickEditLines.java	Thu Dec 27 10:43:52 2018 +0000
@@ -24,7 +24,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -41,7 +42,7 @@
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
 
 public class PaymentProposalPickEditLines extends BaseProcessActionHandler {
-  private static Logger log = Logger.getLogger(PaymentProposalPickEditLines.class);
+  private static Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject doExecute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/UnMatchSelectedTransactionsActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/UnMatchSelectedTransactionsActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -40,12 +40,11 @@
 import org.openbravo.service.db.DbUtility;
 import org.openbravo.service.json.JsonUtils;
 import org.openbravo.service.json.OBStaleObjectException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class UnMatchSelectedTransactionsActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(UnMatchSelectedTransactionsActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/UnMatchTransactionActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/UnMatchTransactionActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -37,11 +37,11 @@
 import org.openbravo.service.db.DbUtility;
 import org.openbravo.service.json.JsonUtils;
 import org.openbravo.service.json.OBStaleObjectException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class UnMatchTransactionActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory.getLogger(UnMatchTransactionActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String data) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Thu Dec 27 10:43:52 2018 +0000
@@ -31,7 +31,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
+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.hibernate.criterion.Restrictions;
@@ -78,7 +79,7 @@
 public class AddTransaction extends HttpSecureAppServlet {
   private static final long serialVersionUID = 1L;
   private AdvPaymentMngtDao dao;
-  private static final Logger log = Logger.getLogger(AddTransaction.class);
+  private static final Logger log = LogManager.getLogger();
 
   public void doPost(HttpServletRequest request, HttpServletResponse response)
       throws ServletException, IOException {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/GLItemSelectorFilterExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/GLItemSelectorFilterExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -27,13 +27,13 @@
 import org.openbravo.client.application.FilterExpression;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.erpCommon.utility.Utility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class GLItemSelectorFilterExpression implements FilterExpression {
   private static final String INPAD_ORG_ID_PARAM = "inpadOrgId";
   private static final String AD_ORG_ID_PARAM = "ad_org_id";
-  private static final Logger log = LoggerFactory.getLogger(GLItemSelectorFilterExpression.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   public String getExpression(Map<String, String> requestMap) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/ReportReconciliation.java	Thu Dec 27 10:43:52 2018 +0000
@@ -29,7 +29,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.ProjectionList;
 import org.hibernate.criterion.Projections;
 import org.hibernate.criterion.Restrictions;
@@ -53,7 +54,7 @@
 
 public class ReportReconciliation extends HttpSecureAppServlet {
   private static final long serialVersionUID = 1L;
-  private static final Logger log = Logger.getLogger(ReportReconciliation.class);
+  private static final Logger log = LogManager.getLogger();
   final static String DETAIL = "DETAIL";
   final static String SUMMARY = "SUMMARY";
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/event/FIN_FinaccTransactionEventListener.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 import javax.enterprise.event.Observes;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.advpaymentmngt.utility.APRMConstants;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
@@ -39,7 +40,7 @@
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       FIN_FinaccTransaction.ENTITY_NAME) };
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
 
   @Override
   protected Entity[] getObservedEntities() {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddOrderOrInvoiceFilterExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddOrderOrInvoiceFilterExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -32,12 +32,11 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddOrderOrInvoiceFilterExpression implements FilterExpression {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddOrderOrInvoiceFilterExpression.class);
+  private static final Logger log = LogManager.getLogger();
   @Inject
   @Any
   private Instance<AddOrderOrInvoiceFilterExpressionHandler> addOrderOrInvoiceFilterExpressionHandlers;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddOrderOrInvoiceFilterExpressionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddOrderOrInvoiceFilterExpressionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -34,13 +34,12 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 @RequestScoped
 abstract class AddOrderOrInvoiceFilterExpressionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddOrderOrInvoiceFilterExpressionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   @Any
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDefaultValuesExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -33,12 +33,11 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddPaymentDefaultValuesExpression implements FilterExpression {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddPaymentDefaultValuesExpression.class);
+  private static final Logger log = LogManager.getLogger();
   @Inject
   @Any
   private Instance<AddPaymentDefaultValuesHandler> addPaymentFilterExpressionHandlers;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentDisplayLogicsExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -33,12 +33,11 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddPaymentDisplayLogicsExpression implements FilterExpression {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddPaymentDisplayLogicsExpression.class);
+  private static final Logger log = LogManager.getLogger();
   @Inject
   @Any
   private Instance<AddPaymentDisplayLogicsHandler> addPaymentFilterExpressionHandlers;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentReadOnlyLogicsExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentReadOnlyLogicsExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -33,12 +33,11 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class AddPaymentReadOnlyLogicsExpression implements FilterExpression {
-  private static final Logger log = LoggerFactory
-      .getLogger(AddPaymentReadOnlyLogicsExpression.class);
+  private static final Logger log = LogManager.getLogger();
   @Inject
   @Any
   private Instance<AddPaymentReadOnlyLogicsHandler> addPaymentFilterExpressionHandlers;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentReadOnlyLogicsHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddPaymentReadOnlyLogicsHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -31,15 +31,14 @@
 import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.erpCommon.utility.PropertyNotFoundException;
 import org.openbravo.model.ad.ui.Window;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 @RequestScoped
 // Public class to allow extend the functionality, for example Add Payment popup opening from menu
 public abstract class AddPaymentReadOnlyLogicsHandler {
 
-  private static final Logger logger = LoggerFactory
-      .getLogger(AddPaymentReadOnlyLogicsHandler.class);
+  private static final Logger logger = LogManager.getLogger();
 
   /**
    * boolean value to set document number read only logic
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -23,7 +23,8 @@
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+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.client.application.FilterExpression;
@@ -36,7 +37,7 @@
 //Public class to allow extend the functionality, for example Add Payment popup opening from menu
 public class AddTransactionFilterExpression implements FilterExpression {
 
-  private static final Logger log = Logger.getLogger(AddTransactionFilterExpression.class);
+  private static final Logger log = LogManager.getLogger();
   private Map<String, String> requestMap;
 
   @Override
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/BusinessPartnerCustomerFilterExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/BusinessPartnerCustomerFilterExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -2,14 +2,15 @@
 
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.client.application.FilterExpression;
 import org.openbravo.client.application.OBBindingsConstants;
 import org.openbravo.client.application.ParameterUtils;
 import org.openbravo.client.kernel.RequestContext;
 
 public class BusinessPartnerCustomerFilterExpression implements FilterExpression {
-  private Logger log = Logger.getLogger(BusinessPartnerCustomerFilterExpression.class);
+  private Logger log = LogManager.getLogger();
   private Map<String, String> requestMap;
   private String windowId;
   private String financialAccountWindowId = "94EAA455D2644E04AB25D93BE5157B6D";
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/BusinessPartnerVendorFilterExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/BusinessPartnerVendorFilterExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -2,14 +2,15 @@
 
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.client.application.FilterExpression;
 import org.openbravo.client.application.OBBindingsConstants;
 import org.openbravo.client.application.ParameterUtils;
 import org.openbravo.client.kernel.RequestContext;
 
 public class BusinessPartnerVendorFilterExpression implements FilterExpression {
-  private Logger log = Logger.getLogger(BusinessPartnerVendorFilterExpression.class);
+  private Logger log = LogManager.getLogger();
   private Map<String, String> requestMap;
   private String windowId;
   private String financialAccountWindowId = "94EAA455D2644E04AB25D93BE5157B6D";
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/FundsTransferGLItemDefaultValueExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/FundsTransferGLItemDefaultValueExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -29,8 +29,8 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.financialmgmt.gl.GLItem;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This class returns the default value for the GL Item Parameter of the Funds Transfer Process in
@@ -40,8 +40,7 @@
 public class FundsTransferGLItemDefaultValueExpression implements FilterExpression {
   private static final String INPAD_ORG_ID_PARAM = "inpadOrgId";
   private static final String AD_ORG_ID_PARAM = "ad_org_id";
-  private static final Logger log = LoggerFactory
-      .getLogger(FundsTransferGLItemDefaultValueExpression.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   public String getExpression(Map<String, String> requestMap) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/MatchStatementFilterExpression.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/MatchStatementFilterExpression.java	Thu Dec 27 10:43:52 2018 +0000
@@ -30,11 +30,11 @@
 import org.openbravo.client.application.FilterExpression;
 import org.openbravo.client.application.OBBindingsConstants;
 import org.openbravo.client.kernel.ComponentProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class MatchStatementFilterExpression implements FilterExpression {
-  private static final Logger log = LoggerFactory.getLogger(MatchStatementFilterExpression.class);
+  private static final Logger log = LogManager.getLogger();
   @Inject
   @Any
   private Instance<MatchStatementFilterExpressionHandler> matchStatementFilterExpressionHandlers;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/MatchStatementFilterExpressionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/MatchStatementFilterExpressionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -27,13 +27,12 @@
 
 import org.codehaus.jettison.json.JSONException;
 import org.openbravo.client.kernel.ComponentProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 @RequestScoped
 abstract class MatchStatementFilterExpressionHandler {
-  private static final Logger log = LoggerFactory
-      .getLogger(MatchStatementFilterExpressionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   @Any
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Thu Dec 27 10:43:52 2018 +0000
@@ -40,6 +40,7 @@
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.exception.OBException;
+import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.structure.BaseOBObject;
@@ -1389,14 +1390,16 @@
         firstDueDate = paymentSchedule.getDueDate();
     }
 
-    BigDecimal overdueAmount = calculateOverdueAmount(invoicePaymentSchedule);
-    invoice.setPercentageOverdue(overdueAmount.multiply(new BigDecimal("100"))
-        .divide(invoice.getGrandTotalAmount(), 2, RoundingMode.HALF_UP).longValue());
-
-    if (firstDueDate != null)
+    if (invoice.getGrandTotalAmount().compareTo(BigDecimal.ZERO) != 0) {
+      BigDecimal overdueAmount = calculateOverdueAmount(invoicePaymentSchedule);
+      invoice.setPercentageOverdue(overdueAmount.multiply(new BigDecimal("100"))
+          .divide(invoice.getGrandTotalAmount(), 2, RoundingMode.HALF_UP).longValue());
+    }
+    if (firstDueDate != null) {
       invoice.setDaysTillDue(FIN_Utility.getDaysToDue(firstDueDate));
-    else
+    } else {
       invoice.setDaysTillDue(0L);
+    }
     OBDal.getInstance().save(invoice);
   }
 
@@ -1737,4 +1740,62 @@
     }
     return BigDecimal.ZERO;
   }
+
+  /**
+   * Method to create a new Payment Schedule Detail (PSD)
+   * 
+   * @param amount
+   *          Amount of the PSD
+   * @param paymentSchedule
+   *          The PS that the PSD will belong to
+   * @param paymentScheduleInvoice
+   *          The PS Invoice that the PSD will belong to
+   * @param businessPartner
+   *          The BP of the PSD
+   * @return newPSD The newly created PSD
+   */
+  public static FIN_PaymentScheduleDetail createPSD(BigDecimal amount,
+      FIN_PaymentSchedule paymentSchedule, FIN_PaymentSchedule paymentScheduleInvoice,
+      Organization organization, BusinessPartner businessPartner) {
+    return createPSD(amount, paymentSchedule, paymentScheduleInvoice, null, organization,
+        businessPartner);
+  }
+
+  /**
+   * Method to create a new Payment Schedule Detail (PSD)
+   * 
+   * @param amount
+   *          Amount of the PSD
+   * @param paymentSchedule
+   *          The PS that the PSD will belong to
+   * @param paymentScheduleInvoice
+   *          The PS Invoice that the PSD will belong to
+   * @param paymentDetails
+   *          The PD to which the PSD will be related
+   * @param businessPartner
+   *          The BP of the PSD
+   * @return newPSD The newly created PSD
+   */
+  public static FIN_PaymentScheduleDetail createPSD(BigDecimal amount,
+      FIN_PaymentSchedule paymentSchedule, FIN_PaymentSchedule paymentScheduleInvoice,
+      FIN_PaymentDetail paymentDetails, Organization organization, BusinessPartner businessPartner) {
+    final FIN_PaymentScheduleDetail newPSD = OBProvider.getInstance().get(
+        FIN_PaymentScheduleDetail.class);
+    newPSD.setAmount(amount);
+    if (paymentSchedule != null) {
+      newPSD.setOrderPaymentSchedule(paymentSchedule);
+      paymentSchedule.getFINPaymentScheduleDetailOrderPaymentScheduleList().add(newPSD);
+    }
+    if (paymentScheduleInvoice != null) {
+      newPSD.setInvoicePaymentSchedule(paymentScheduleInvoice);
+      paymentScheduleInvoice.getFINPaymentScheduleDetailInvoicePaymentScheduleList().add(newPSD);
+    }
+    newPSD.setPaymentDetails(paymentDetails);
+    newPSD.setOrganization(organization);
+    newPSD.setBusinessPartner(businessPartner);
+    OBDal.getInstance().save(newPSD);
+
+    return newPSD;
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_BankStatementProcess.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_BankStatementProcess.java	Thu Dec 27 10:43:52 2018 +0000
@@ -24,7 +24,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.MatchTransactionDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
@@ -45,7 +46,7 @@
 
 public class FIN_BankStatementProcess implements org.openbravo.scheduling.Process {
 
-  private static final Logger log = Logger.getLogger(FIN_BankStatementProcess.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   public void execute(ProcessBundle bundle) throws Exception {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_DoubtfulDebtProcess.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_DoubtfulDebtProcess.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.secureApp.VariablesSecureApp;
@@ -39,7 +40,7 @@
 
 public class FIN_DoubtfulDebtProcess implements org.openbravo.scheduling.Process {
   private static AdvPaymentMngtDao dao;
-  private static final Logger log4j = Logger.getLogger(FIN_DoubtfulDebtProcess.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   public void execute(ProcessBundle bundle) throws Exception {
     dao = new AdvPaymentMngtDao();
@@ -132,16 +133,25 @@
 
   private void updateDoubtfulDebtScheduleDetails(FIN_PaymentSchedule salesInvoicePaymentSchedule,
       BigDecimal debtAmount) {
+    BigDecimal pendingDebtAmount = debtAmount;
     for (FIN_PaymentScheduleDetail psd : salesInvoicePaymentSchedule
         .getFINPaymentScheduleDetailInvoicePaymentScheduleList()) {
       if (psd.getPaymentDetails() == null) {
         // Pending amount should be greater or equals than the doubtful debt amount
-        if (psd.getAmount().compareTo(debtAmount) >= 0) {
-          psd.setDoubtfulDebtAmount(psd.getDoubtfulDebtAmount().add(debtAmount));
+        if (psd.getAmount().compareTo(pendingDebtAmount) >= 0) {
+          psd.setDoubtfulDebtAmount(psd.getDoubtfulDebtAmount().add(pendingDebtAmount));
+          OBDal.getInstance().save(psd);
+        } else {
+          psd.setDoubtfulDebtAmount(psd.getDoubtfulDebtAmount().add(psd.getAmount()));
+          pendingDebtAmount = getDifferenceOfAmountsOrZero(pendingDebtAmount, psd);
           OBDal.getInstance().save(psd);
         }
       }
     }
   }
 
+  private BigDecimal getDifferenceOfAmountsOrZero(BigDecimal debtAmountAux, FIN_PaymentScheduleDetail psd) {
+    return debtAmountAux.subtract(psd.getAmount()).compareTo(BigDecimal.ZERO) < 0 ? BigDecimal.ZERO
+        : debtAmountAux.subtract(psd.getAmount());
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_DoubtfulDebtRunProcess.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_DoubtfulDebtRunProcess.java	Thu Dec 27 10:43:52 2018 +0000
@@ -20,7 +20,8 @@
 
 import java.util.HashMap;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.secureApp.VariablesSecureApp;
@@ -35,7 +36,7 @@
 
 public class FIN_DoubtfulDebtRunProcess implements org.openbravo.scheduling.Process {
   private static AdvPaymentMngtDao dao;
-  private static final Logger log4j = Logger.getLogger(FIN_DoubtfulDebtRunProcess.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   public void execute(ProcessBundle bundle) throws Exception {
     dao = new AdvPaymentMngtDao();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,7 +25,8 @@
 import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.dao.TransactionsDao;
 import org.openbravo.advpaymentmngt.exception.NoExecutionProcessFoundException;
@@ -62,7 +63,7 @@
   private HashMap<String, String> parameters = new HashMap<String, String>();
   private HashMap<String, String> internalParameters = new HashMap<String, String>();
   private PaymentRun paymentRun;
-  private static final Logger log = Logger.getLogger(FIN_ExecutePayment.class);
+  private static final Logger log = LogManager.getLogger();
 
   public void init(String sourceType, PaymentExecutionProcess _executionProcess,
       List<FIN_Payment> payments, HashMap<String, String> _parameters, Organization organization)
@@ -190,7 +191,7 @@
             }
             paymentRunPayment.getPayment().setPosted("N");
             try {
-              OBContext.setAdminMode(true);
+              OBContext.setAdminMode(false);
               for (FIN_PaymentDetail pd : payment.getFINPaymentDetailList()) {
                 for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
                   if (pd.getGLItem() != null || psd.isInvoicePaid()) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu Dec 27 10:43:52 2018 +0000
@@ -64,14 +64,14 @@
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 import org.openbravo.model.financialmgmt.payment.PaymentExecutionProcess;
 import org.openbravo.scheduling.ProcessBundle;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class FIN_PaymentProcess implements org.openbravo.scheduling.Process {
   private static AdvPaymentMngtDao dao;
 
   public BigDecimal ZERO = BigDecimal.ZERO;
-  static Logger log4j = LoggerFactory.getLogger(FIN_PaymentProcess.class);
+  static Logger log4j = LogManager.getLogger();
 
   public void execute(ProcessBundle bundle) throws Exception {
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProposalProcess.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,7 +25,8 @@
 import java.util.HashMap;
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.exception.OBException;
@@ -53,11 +54,11 @@
 
   public static final String COMINGFROM_PAYMENTPROPOSALPROCESS = "PAYMENT_PROPOSAL";
 
-  private static final Logger log = Logger.getLogger(FIN_PaymentProposalProcess.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   public void execute(ProcessBundle bundle) throws Exception {
-    final Logger log4j = Logger.getLogger(this.getClass());
+    final Logger log4j = LogManager.getLogger();
     dao = new AdvPaymentMngtDao();
     OBError message = null;
     try {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ReconciliationProcess.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ReconciliationProcess.java	Thu Dec 27 10:43:52 2018 +0000
@@ -20,7 +20,8 @@
 
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Order;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
@@ -42,7 +43,7 @@
 
 public class FIN_ReconciliationProcess implements org.openbravo.scheduling.Process {
   private static AdvPaymentMngtDao dao;
-  private static final Logger log = Logger.getLogger(FIN_ReconciliationProcess.class);
+  private static final Logger log = LogManager.getLogger();
 
   public void execute(ProcessBundle bundle) throws Exception {
     dao = new AdvPaymentMngtDao();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionModify.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionModify.java	Thu Dec 27 10:43:52 2018 +0000
@@ -20,7 +20,8 @@
 
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
@@ -47,7 +48,7 @@
 
 public class FIN_TransactionModify implements org.openbravo.scheduling.Process {
   private static AdvPaymentMngtDao dao;
-  private static final Logger log = Logger.getLogger(FIN_TransactionModify.class);
+  private static final Logger log = LogManager.getLogger();
 
   public void execute(ProcessBundle bundle) throws Exception {
     dao = new AdvPaymentMngtDao();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,6 +22,8 @@
 import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.APRM_FinaccTransactionV;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
@@ -46,15 +48,13 @@
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
 import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
 import org.openbravo.scheduling.ProcessBundle;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class FIN_TransactionProcess implements org.openbravo.scheduling.Process {
   /** Transaction type - Financial Account */
   public static final String TRXTYPE_BPDeposit = "BPD";
   public static final String TRXTYPE_BPWithdrawal = "BPW";
   public static final String TRXTYPE_BankFee = "BF";
-  static Logger log4j = LoggerFactory.getLogger(FIN_TransactionProcess.class);
+  static Logger log4j = LogManager.getLogger();
 
   public void execute(ProcessBundle bundle) throws Exception {
     OBError msg = new OBError();
@@ -70,8 +70,8 @@
       if (recordID == null) {
         recordID = (String) bundle.getParams().get("Fin_Finacc_Transaction_ID");
       }
-      final FIN_FinaccTransaction transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class,
-          recordID);
+      final FIN_FinaccTransaction transaction = OBDal.getInstance().get(
+          FIN_FinaccTransaction.class, recordID);
       transactionProcess(strAction, transaction);
       bundle.setResult(msg);
     } catch (Exception e) {
@@ -102,12 +102,13 @@
         // ***********************
 
         boolean orgLegalWithAccounting = FIN_Utility.periodControlOpened(
-            FIN_FinaccTransaction.TABLE_NAME, transaction.getId(),
-            FIN_FinaccTransaction.TABLE_NAME + "_ID", "LE");
+            FIN_FinaccTransaction.TABLE_NAME, transaction.getId(), FIN_FinaccTransaction.TABLE_NAME
+                + "_ID", "LE");
         boolean documentEnabled = getDocumentConfirmation(transaction.getId());
-        if (documentEnabled && !FIN_Utility.isPeriodOpen(transaction.getClient().getId(),
-            AcctServer.DOCTYPE_FinAccTransaction, transaction.getOrganization().getId(),
-            OBDateUtils.formatDate(transaction.getDateAcct())) && orgLegalWithAccounting) {
+        if (documentEnabled
+            && !FIN_Utility.isPeriodOpen(transaction.getClient().getId(),
+                AcctServer.DOCTYPE_FinAccTransaction, transaction.getOrganization().getId(),
+                OBDateUtils.formatDate(transaction.getDateAcct())) && orgLegalWithAccounting) {
           msg = OBMessageUtils.messageBD("PeriodNotAvailable");
           throw new OBException(msg);
         }
@@ -153,27 +154,26 @@
             }
           }
 
-          if (!StringUtils.equals(transaction.getCurrency().getId(),
-              payment.getCurrency().getId())) {
+          if (!StringUtils.equals(transaction.getCurrency().getId(), payment.getCurrency().getId())) {
             transaction.setForeignCurrency(payment.getCurrency());
             transaction.setForeignConversionRate(payment.getFinancialTransactionConvertRate());
             transaction.setForeignAmount(payment.getAmount());
           }
 
         } else {
-          transaction.setStatus(
-              transaction.getDepositAmount().compareTo(transaction.getPaymentAmount()) > 0 ? "RDNC"
-                  : "PWNC");
+          transaction.setStatus(transaction.getDepositAmount().compareTo(
+              transaction.getPaymentAmount()) > 0 ? "RDNC" : "PWNC");
         }
         if (transaction.getForeignCurrency() != null
             && !transaction.getCurrency().equals(transaction.getForeignCurrency())
             && getConversionRateDocument(transaction).size() == 0) {
           insertConversionRateDocument(transaction);
         }
+
         FIN_FinancialAccount financialAccount = OBDal.getInstance().getObjectLockForNoKeyUpdate(
             transaction.getAccount());
-        financialAccount.setCurrentBalance(financialAccount.getCurrentBalance()
-            .add(transaction.getDepositAmount().subtract(transaction.getPaymentAmount())));
+        financialAccount.setCurrentBalance(financialAccount.getCurrentBalance().add(
+            transaction.getDepositAmount().subtract(transaction.getPaymentAmount())));
         transaction.setAprmProcessed("R");
         OBDal.getInstance().save(transaction);
 
@@ -194,18 +194,18 @@
         // Payment Method associated to payment not longer in financial account
         final FIN_Payment payment = transaction.getFinPayment();
         if (payment != null && FIN_Utility.invoicePaymentStatus(payment) == null) {
-          msg = String.format(OBMessageUtils.messageBD("APRM_NoPaymentMethod"),
-              payment.getPaymentMethod().getIdentifier(), payment.getDocumentNo(),
-              payment.getAccount().getName());
+          msg = String.format(OBMessageUtils.messageBD("APRM_NoPaymentMethod"), payment
+              .getPaymentMethod().getIdentifier(), payment.getDocumentNo(), payment.getAccount()
+              .getName());
           throw new OBException(msg);
         }
         // Remove conversion rate at document level for the given transaction
         OBContext.setAdminMode();
         try {
-          OBCriteria<ConversionRateDoc> obc = OBDal.getInstance()
-              .createCriteria(ConversionRateDoc.class);
-          obc.add(
-              Restrictions.eq(ConversionRateDoc.PROPERTY_FINANCIALACCOUNTTRANSACTION, transaction));
+          OBCriteria<ConversionRateDoc> obc = OBDal.getInstance().createCriteria(
+              ConversionRateDoc.class);
+          obc.add(Restrictions.eq(ConversionRateDoc.PROPERTY_FINANCIALACCOUNTTRANSACTION,
+              transaction));
           boolean dataRemoved = false;
           for (ConversionRateDoc conversionRateDoc : obc.list()) {
             dataRemoved = true;
@@ -226,9 +226,8 @@
             for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
               invoicePaidold = psd.isInvoicePaid();
               if (invoicePaidold) {
-                boolean restore = (FIN_Utility
-                    .seqnumberpaymentstatus(payment.getStatus())) == (FIN_Utility
-                        .seqnumberpaymentstatus(FIN_Utility.invoicePaymentStatus(payment)));
+                boolean restore = (FIN_Utility.seqnumberpaymentstatus(payment.getStatus())) == (FIN_Utility
+                    .seqnumberpaymentstatus(FIN_Utility.invoicePaymentStatus(payment)));
                 if (restore) {
                   FIN_Utility.restorePaidAmounts(psd);
                 }
@@ -239,9 +238,8 @@
           transaction.setStatus(payment.isReceipt() ? "RPR" : "PPM");
           OBDal.getInstance().save(payment);
         } else {
-          transaction.setStatus(
-              transaction.getDepositAmount().compareTo(transaction.getPaymentAmount()) > 0 ? "RPR"
-                  : "PPM");
+          transaction.setStatus(transaction.getDepositAmount().compareTo(
+              transaction.getPaymentAmount()) > 0 ? "RPR" : "PPM");
         }
         FIN_FinancialAccount financialAccount = OBDal.getInstance().getObjectLockForNoKeyUpdate(
             transaction.getAccount());
@@ -259,10 +257,9 @@
   private List<ConversionRateDoc> getConversionRateDocument(FIN_FinaccTransaction transaction) {
     OBContext.setAdminMode();
     try {
-      OBCriteria<ConversionRateDoc> obc = OBDal.getInstance()
-          .createCriteria(ConversionRateDoc.class);
-      obc.add(
-          Restrictions.eq(ConversionRateDoc.PROPERTY_CURRENCY, transaction.getForeignCurrency()));
+      OBCriteria<ConversionRateDoc> obc = OBDal.getInstance().createCriteria(
+          ConversionRateDoc.class);
+      obc.add(Restrictions.eq(ConversionRateDoc.PROPERTY_CURRENCY, transaction.getForeignCurrency()));
       obc.add(Restrictions.eq(ConversionRateDoc.PROPERTY_TOCURRENCY, transaction.getCurrency()));
       obc.add(Restrictions.eq(ConversionRateDoc.PROPERTY_FINANCIALACCOUNTTRANSACTION, transaction));
       return obc.list();
@@ -281,8 +278,8 @@
       newConversionRateDoc.setToCurrency(transaction.getCurrency());
       newConversionRateDoc.setRate(transaction.getForeignConversionRate());
       newConversionRateDoc.setForeignAmount(transaction.getForeignAmount());
-      newConversionRateDoc.setFinancialAccountTransaction(
-          OBDal.getInstance().get(APRM_FinaccTransactionV.class, transaction.getId()));
+      newConversionRateDoc.setFinancialAccountTransaction(OBDal.getInstance().get(
+          APRM_FinaccTransactionV.class, transaction.getId()));
       OBDal.getInstance().save(newConversionRateDoc);
       OBDal.getInstance().flush();
       return newConversionRateDoc;
@@ -308,10 +305,10 @@
           .getFINFinancialAccountAcctList();
       FIN_Payment payment = transaction.getFinPayment();
       if (payment != null) {
-        OBCriteria<FinAccPaymentMethod> obCriteria = OBDal.getInstance()
-            .createCriteria(FinAccPaymentMethod.class);
-        obCriteria
-            .add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT, transaction.getAccount()));
+        OBCriteria<FinAccPaymentMethod> obCriteria = OBDal.getInstance().createCriteria(
+            FinAccPaymentMethod.class);
+        obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT,
+            transaction.getAccount()));
         obCriteria.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD,
             payment.getPaymentMethod()));
         obCriteria.setFilterOnReadableClients(false);
@@ -353,12 +350,12 @@
         for (FIN_FinancialAccountAccounting account : accounts) {
           if (confirmation)
             return confirmation;
-          if ((TRXTYPE_BPDeposit.equals(transaction.getTransactionType())
-              && account.getDepositAccount() != null)
-              || (TRXTYPE_BPWithdrawal.equals(transaction.getTransactionType())
-                  && account.getWithdrawalAccount() != null)
-              || (TRXTYPE_BankFee.equals(transaction.getTransactionType())
-                  && account.getWithdrawalAccount() != null))
+          if ((TRXTYPE_BPDeposit.equals(transaction.getTransactionType()) && account
+              .getDepositAccount() != null)
+              || (TRXTYPE_BPWithdrawal.equals(transaction.getTransactionType()) && account
+                  .getWithdrawalAccount() != null)
+              || (TRXTYPE_BankFee.equals(transaction.getTransactionType()) && account
+                  .getWithdrawalAccount() != null))
             confirmation = true;
         }
       }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java	Thu Dec 27 10:43:52 2018 +0000
@@ -80,11 +80,11 @@
 import org.openbravo.scheduling.ProcessBundle;
 import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.service.db.DalConnectionProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class APRM_MatchingUtility {
-  private static final Logger log4j = LoggerFactory.getLogger(APRM_MatchingUtility.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   /**
    * Get reconciliation lines of a reconciliation that had been matched manually
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Thu Dec 27 10:43:52 2018 +0000
@@ -31,7 +31,8 @@
 
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.ScrollMode;
 import org.hibernate.ScrollableResults;
 import org.hibernate.criterion.Restrictions;
@@ -64,7 +65,7 @@
   private FIN_FinancialAccount financialAccount;
   OBError myError = null;
   String filename = "";
-  private static Logger log4j = Logger.getLogger(FIN_BankStatementImport.class);
+  private static Logger log4j = LogManager.getLogger();
 
   public static final String DOCUMENT_BankStatementFile = "BSF";
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Dec 27 10:43:52 2018 +0000
@@ -80,11 +80,11 @@
 import org.openbravo.service.db.CallStoredProcedure;
 import org.openbravo.service.db.DbUtility;
 import org.openbravo.utils.Replace;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class FIN_Utility {
-  private static final Logger log4j = LoggerFactory.getLogger(FIN_Utility.class);
+  private static final Logger log4j = LogManager.getLogger();
   private static AdvPaymentMngtDao dao;
 
   /**
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Thu Dec 27 10:43:52 2018 +0000
@@ -128,6 +128,8 @@
   orderInvoiceGrid.dataProperties.transformData = OB.APRM.AddPayment.ordInvTransformData;
   glitemGrid.removeRecordClick = OB.APRM.AddPayment.removeRecordClick;
   creditUseGrid.selectionChanged = OB.APRM.AddPayment.selectionChangedCredit;
+  creditUseGrid.userSelectAllRecords = OB.APRM.AddPayment.userSelectAllRecords;
+  creditUseGrid.deselectAllRecords = OB.APRM.AddPayment.deselectAllRecords;
   orderInvoiceGrid.dataArrived = OB.APRM.AddPayment.ordInvDataArrived;
 
   form.isCreditAllowed = form.getItem('received_from').getValue() !== undefined && form.getItem('received_from').getValue() !== null;
@@ -336,6 +338,9 @@
 
 OB.APRM.AddPayment.creditOnLoadGrid = function (grid) {
   grid.isReady = true;
+  if (grid.obaprmAllRecordsSelectedByUser) {
+    delete grid.obaprmAllRecordsSelectedByUser;
+  }
   OB.APRM.AddPayment.updateCreditTotal(this.view.theForm);
   OB.APRM.AddPayment.tryToUpdateActualExpected(this.view.theForm);
 };
@@ -843,10 +848,12 @@
   } else {
     grid.setEditValue(grid.getRecordIndex(record), amountField, '0');
   }
-  OB.APRM.AddPayment.updateCreditTotal(view.theForm);
-  OB.APRM.AddPayment.updateActualExpected(view.theForm);
-  if (issotrx) {
-    OB.APRM.AddPayment.distributeAmount(view, view.theForm, true);
+  if (!grid.obaprmAllRecordsSelectedByUser || (grid.obaprmAllRecordsSelectedByUser && (grid.getRecordIndex(record) === grid.getTotalRows() - 1))) {
+    OB.APRM.AddPayment.updateCreditTotal(view.theForm);
+    OB.APRM.AddPayment.updateActualExpected(view.theForm);
+    if (issotrx) {
+      OB.APRM.AddPayment.distributeAmount(view, view.theForm, true);
+    }
   }
 };
 
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Thu Dec 27 10:43:52 2018 +0000
@@ -52,7 +52,7 @@
       totalReceived = new BigDecimal("0"),
       totalOutstanding = new BigDecimal("0"),
       isNumber = isc.isA.Number,
-      invoiceOutstanding = new BigDecimal(String(item.grid.view.parentWindow.views[0].getParentRecord().outstandingAmount));
+      invoiceOutstanding = new BigDecimal(String(item.grid.view.parentWindow.activeView.getContextInfo(false, true, true, false).inpoutstandingamt));
 
   if (new BigDecimal(String(value)).compareTo(new BigDecimal("0")) !== 0 && (new BigDecimal(String(value)).compareTo(new BigDecimal("0")) !== invoiceOutstanding.compareTo(new BigDecimal("0")))) {
     if (!OB.APRM.validateMPPUserWarnedSign) {
@@ -160,7 +160,7 @@
     row = allRows[indRow];
     totalOutstanding = totalOutstanding.add(new BigDecimal(String(row.outstanding)));
   }
-  returnObject.outstanding = Number(new BigDecimal(String(selectedRecord.outstandingAmount)).subtract(totalOutstanding));
+  returnObject.outstanding = Number(new BigDecimal(String(grid.view.parentWindow.activeView.getContextInfo(false, true, true, false).inpoutstandingamt)).subtract(totalOutstanding));
   returnObject.received = 0;
   returnObject.expected = 0;
   returnObject.awaitingExecutionAmount = 0;
--- a/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--8A098711BB324335A19833286BDB093D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--8A098711BB324335A19833286BDB093D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8A098711BB324335A19833286BDB093D-->  <NAME><![CDATA[Apache External Connection Pool]]></NAME>
-<!--8A098711BB324335A19833286BDB093D-->  <VERSION><![CDATA[1.0.34849]]></VERSION>
+<!--8A098711BB324335A19833286BDB093D-->  <VERSION><![CDATA[1.0.35272]]></VERSION>
 <!--8A098711BB324335A19833286BDB093D-->  <DESCRIPTION><![CDATA[Apache External Connection Pool]]></DESCRIPTION>
 <!--8A098711BB324335A19833286BDB093D-->  <HELP><![CDATA[This module implements the Apache JDBC Connection Pool (http://wiki.openbravo.com/wiki/Modules:Apache_JDBC_Connection_Pool).]]></HELP>
 <!--8A098711BB324335A19833286BDB093D-->  <TYPE><![CDATA[M]]></TYPE>
@@ -20,7 +20,7 @@
 <!--8A098711BB324335A19833286BDB093D-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--8A098711BB324335A19833286BDB093D-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--8A098711BB324335A19833286BDB093D-->  <UPDATEINFO><![CDATA[fixed issue #26663: configuration is read from servlet context]]></UPDATEINFO>
-<!--8A098711BB324335A19833286BDB093D-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--8A098711BB324335A19833286BDB093D-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--8A098711BB324335A19833286BDB093D-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--8A098711BB324335A19833286BDB093D-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--8A098711BB324335A19833286BDB093D--></AD_MODULE>
--- a/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_MODULE_ID><![CDATA[8A098711BB324335A19833286BDB093D]]></AD_MODULE_ID>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,13 +21,12 @@
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
-import java.util.HashMap;
+import java.util.Map;
 import java.util.Properties;
 
 import org.apache.tomcat.jdbc.pool.ConnectionPool;
 import org.apache.tomcat.jdbc.pool.JdbcInterceptor;
 import org.apache.tomcat.jdbc.pool.PooledConnection;
-import org.openbravo.base.exception.OBException;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.database.PoolInterceptorProvider;
 import org.openbravo.database.SessionInfo;
@@ -52,51 +51,41 @@
    */
   @Override
   public void reset(ConnectionPool parent, PooledConnection con) {
-    if (con != null) {
-      boolean physicalConnectionChanged = hasPhysicalConnectionChanged(con);
+    if (con == null) {
+      return;
+    }
 
-      HashMap<Object, Object> attributes = con.getAttributes();
-      Boolean sessionInfoApplied = (Boolean) attributes.get(SESSION_CONFIG_APPLIED);
-      if (physicalConnectionChanged || sessionInfoApplied == null || !sessionInfoApplied) {
-        PreparedStatement pstmt = null;
-        try {
-          final Properties props = OBPropertiesProvider.getInstance().getOpenbravoProperties();
-          final String dbSessionConfig = props.getProperty("bbdd.sessionConfig");
-          pstmt = con.getConnection().prepareStatement(dbSessionConfig);
-          pstmt.executeQuery();
-        } catch (Exception e) {
-          throw new IllegalStateException(e);
-        } finally {
-          try {
-            if (pstmt != null && !pstmt.isClosed()) {
-              pstmt.close();
-            }
-          } catch (SQLException e) {
-            throw new OBException(e);
-          }
-        }
-        attributes.put(SESSION_CONFIG_APPLIED, true);
+    boolean physicalConnectionChanged = hasPhysicalConnectionChanged(con);
+
+    Map<Object, Object> attributes = con.getAttributes();
+    Boolean sessionInfoApplied = (Boolean) attributes.get(SESSION_CONFIG_APPLIED);
+    if (physicalConnectionChanged || sessionInfoApplied == null || !sessionInfoApplied) {
+      final Properties props = OBPropertiesProvider.getInstance().getOpenbravoProperties();
+      final String dbSessionConfig = props.getProperty("bbdd.sessionConfig");
+      try (PreparedStatement pstmt = con.getConnection().prepareStatement(dbSessionConfig)) {
+        pstmt.executeQuery();
+      } catch (SQLException e) {
+        throw new IllegalStateException(e);
       }
+      attributes.put(SESSION_CONFIG_APPLIED, true);
+    }
 
-      Boolean sessionInfoInitialized = (Boolean) attributes.get(SESSION_INFO_APPLIED);
-      if (physicalConnectionChanged || sessionInfoInitialized == null || !sessionInfoInitialized) {
-        boolean initialized = false;
-        if (isReadOnlyPool(parent)) {
-          initialized = true;
-        } else {
-          // SessionInfo will be initialized when the SessionListener ServletContextListener is
-          // invoked. That listener will check if there are audited tables and notify SessionInfo,
-          // from then on SessionInfo will know whether the ad_context_info table should be created
-          if (SessionInfo.isInitialized()) {
-            SessionInfo.initDB(con.getConnection(), rbdms);
-            initialized = true;
-          }
-        }
-        attributes.put(SESSION_INFO_APPLIED, initialized);
+    Boolean sessionInfoInitialized = (Boolean) attributes.get(SESSION_INFO_APPLIED);
+    if (physicalConnectionChanged || sessionInfoInitialized == null || !sessionInfoInitialized) {
+      boolean initialized = false;
+      if (isReadOnlyPool(parent)) {
+        initialized = true;
+      } else if (SessionInfo.isInitialized()) {
+        // SessionInfo will be initialized when the SessionListener ServletContextListener is
+        // invoked. That listener will check if there are audited tables and notify SessionInfo,
+        // from then on SessionInfo will know whether the ad_context_info table should be created
+        SessionInfo.initDB(con.getConnection(), rbdms);
+        initialized = true;
       }
+      attributes.put(SESSION_INFO_APPLIED, initialized);
+    }
 
-      cachePhysicalConnection(con);
-    }
+    cachePhysicalConnection(con);
   }
 
   /**
--- a/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java	Thu Dec 27 10:43:52 2018 +0000
@@ -39,8 +39,8 @@
 import org.openbravo.database.ExternalConnectionPool;
 import org.openbravo.database.PoolInterceptorProvider;
 import org.openbravo.jmx.MBeanRegistry;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * JdbcExternalConnectionPool manages all the functionality of the Apache JDBC Connection Pool. This
@@ -49,7 +49,7 @@
  * connection from a pool, close the different pools and other actions.
  */
 public class JdbcExternalConnectionPool extends ExternalConnectionPool {
-  final static private Logger log = LoggerFactory.getLogger(JdbcExternalConnectionPool.class);
+  final static private Logger log = LogManager.getLogger();
 
   private Map<String, DataSource> availableDataSources = null;
   private DataSource defaultDataSource = null;
Binary file modules/org.openbravo.base.weld/lib/runtime/slf4j-ext-1.6.1.jar has changed
Binary file modules/org.openbravo.base.weld/lib/runtime/slf4j-ext-1.7.25.jar has changed
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <NAME><![CDATA[JBoss Weld]]></NAME>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.34849]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.35272]]></VERSION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL>
@@ -22,7 +22,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <UPDATEINFO><![CDATA[Bug fixing.]]></UPDATEINFO>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--C70732EA90A14EC0916078B85CC33D2D--></AD_MODULE>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_MODULE_ID>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/ParameterCdiTestRule.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/ParameterCdiTestRule.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,8 +25,8 @@
 import org.junit.rules.MethodRule;
 import org.junit.runners.model.FrameworkMethod;
 import org.junit.runners.model.Statement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Rule to make possible to run parameterized test cases with Arquillian runner. The Rule field
@@ -40,7 +40,7 @@
  */
 public class ParameterCdiTestRule<T> implements MethodRule {
   private final List<T> params;
-  private static final Logger log = LoggerFactory.getLogger(ParameterCdiTestRule.class);
+  private static final Logger log = LogManager.getLogger();
 
   public ParameterCdiTestRule(List<T> params) {
     if (params == null || params.size() == 0) {
--- a/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.base.weld/src-test/org/openbravo/base/weld/test/WeldBaseTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -45,8 +45,8 @@
 import org.openbravo.dal.core.OBInterceptor;
 import org.openbravo.dal.core.SQLFunctionRegister;
 import org.openbravo.test.base.OBBaseTest;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Base test for weld, provides access to the weld container.
@@ -55,7 +55,7 @@
  */
 @RunWith(Arquillian.class)
 public class WeldBaseTest extends OBBaseTest {
-  private static final Logger log = LoggerFactory.getLogger(WeldBaseTest.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static boolean initialized = false;
   private static JavaArchive archive = null;
--- a/modules/org.openbravo.base.weld/src/org/openbravo/base/weld/WeldUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.base.weld/src/org/openbravo/base/weld/WeldUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -33,8 +33,8 @@
 
 import org.openbravo.base.exception.OBException;
 import org.openbravo.dal.core.DalContextListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Provides weld utilities.
@@ -45,7 +45,7 @@
 public class WeldUtils {
 
   private static BeanManager staticBeanManager = null;
-  private static final Logger log = LoggerFactory.getLogger(WeldUtils.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String BEAN_MANAGER_ATTRIBUTE_NAME = "org.jboss.weld.environment.servlet.javax.enterprise.inject.spi.BeanManager";
 
   public static BeanManager getStaticInstanceBeanManager() {
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -4005,6 +4005,43 @@
 <!--55250700311A4AB7A00E1DDECF209FF3-->  <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
 <!--55250700311A4AB7A00E1DDECF209FF3--></AD_COLUMN>
 
+<!--555D6DAB70824E5FB990905BEC22EEA7--><AD_COLUMN>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <AD_COLUMN_ID><![CDATA[555D6DAB70824E5FB990905BEC22EEA7]]></AD_COLUMN_ID>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <NAME><![CDATA[Logger]]></NAME>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <DESCRIPTION><![CDATA[Logger name]]></DESCRIPTION>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <HELP><![CDATA[Name used to identify a Logger. It usually corresponds to the name of the class being logged, but it can also be named using an arbitrary name.]]></HELP>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <COLUMNNAME><![CDATA[logger]]></COLUMNNAME>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <AD_TABLE_ID><![CDATA[ED87AD8D00DE4CC79B9BB66F3E90B78B]]></AD_TABLE_ID>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <FIELDLENGTH><![CDATA[200]]></FIELDLENGTH>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <AD_ELEMENT_ID><![CDATA[4F9B5A7E1E744830A7378CC67D3BCFD2]]></AD_ELEMENT_ID>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING>
+<!--555D6DAB70824E5FB990905BEC22EEA7-->  <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
+<!--555D6DAB70824E5FB990905BEC22EEA7--></AD_COLUMN>
+
 <!--55C1A4EE91644D1FB2A083FF546867BB--><AD_COLUMN>
 <!--55C1A4EE91644D1FB2A083FF546867BB-->  <AD_COLUMN_ID><![CDATA[55C1A4EE91644D1FB2A083FF546867BB]]></AD_COLUMN_ID>
 <!--55C1A4EE91644D1FB2A083FF546867BB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -5558,6 +5595,45 @@
 <!--7624A1EDFA5A48D4B33A00A5AD18FEB3-->  <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
 <!--7624A1EDFA5A48D4B33A00A5AD18FEB3--></AD_COLUMN>
 
+<!--780C755C3A81447ABBD830D22038D1CB--><AD_COLUMN>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_COLUMN_ID><![CDATA[780C755C3A81447ABBD830D22038D1CB]]></AD_COLUMN_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <NAME><![CDATA[Level]]></NAME>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <DESCRIPTION><![CDATA[Logger log level]]></DESCRIPTION>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <HELP><![CDATA[Indicates the minimum level events should have for this Logger to process them. By default this level is determined by
+the config files: it is inherited from the root logger unless an specific configuration for this class/package is defined.]]></HELP>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <COLUMNNAME><![CDATA[level]]></COLUMNNAME>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_TABLE_ID><![CDATA[ED87AD8D00DE4CC79B9BB66F3E90B78B]]></AD_TABLE_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_REFERENCE_VALUE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_VALUE_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_ELEMENT_ID><![CDATA[C453BC52FD694241864B69AE2C0F48FB]]></AD_ELEMENT_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING>
+<!--780C755C3A81447ABBD830D22038D1CB-->  <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
+<!--780C755C3A81447ABBD830D22038D1CB--></AD_COLUMN>
+
 <!--7908F76076C54215A06C9F3FA47C296E--><AD_COLUMN>
 <!--7908F76076C54215A06C9F3FA47C296E-->  <AD_COLUMN_ID><![CDATA[7908F76076C54215A06C9F3FA47C296E]]></AD_COLUMN_ID>
 <!--7908F76076C54215A06C9F3FA47C296E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9414,6 +9490,41 @@
 <!--ABEE9EA6CC8344789ADA2ABC532DA2FF-->  <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
 <!--ABEE9EA6CC8344789ADA2ABC532DA2FF--></AD_COLUMN>
 
+<!--AC10D2D19BA34F2384F87DC26F1595B9--><AD_COLUMN>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <AD_COLUMN_ID><![CDATA[AC10D2D19BA34F2384F87DC26F1595B9]]></AD_COLUMN_ID>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <NAME><![CDATA[id]]></NAME>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <COLUMNNAME><![CDATA[id]]></COLUMNNAME>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <AD_TABLE_ID><![CDATA[ED87AD8D00DE4CC79B9BB66F3E90B78B]]></AD_TABLE_ID>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <FIELDLENGTH><![CDATA[200]]></FIELDLENGTH>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISKEY><![CDATA[Y]]></ISKEY>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <AD_ELEMENT_ID><![CDATA[0203C4D611382746E050007F0100412C]]></AD_ELEMENT_ID>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING>
+<!--AC10D2D19BA34F2384F87DC26F1595B9-->  <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK>
+<!--AC10D2D19BA34F2384F87DC26F1595B9--></AD_COLUMN>
+
 <!--AC86B3B9E5E44263BE8B2814868E469A--><AD_COLUMN>
 <!--AC86B3B9E5E44263BE8B2814868E469A-->  <AD_COLUMN_ID><![CDATA[AC86B3B9E5E44263BE8B2814868E469A]]></AD_COLUMN_ID>
 <!--AC86B3B9E5E44263BE8B2814868E469A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -340,6 +340,20 @@
 <!--4F42DE67C7DE44F6AD3C24E7C3B13844-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--4F42DE67C7DE44F6AD3C24E7C3B13844--></AD_ELEMENT>
 
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2--><AD_ELEMENT>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <AD_ELEMENT_ID><![CDATA[4F9B5A7E1E744830A7378CC67D3BCFD2]]></AD_ELEMENT_ID>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <COLUMNNAME><![CDATA[logger]]></COLUMNNAME>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <NAME><![CDATA[Logger]]></NAME>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <PRINTNAME><![CDATA[Logger]]></PRINTNAME>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <DESCRIPTION><![CDATA[Logger name]]></DESCRIPTION>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <HELP><![CDATA[Name used to identify a Logger. It usually corresponds to the name of the class being logged, but it can also be named using an arbitrary name.]]></HELP>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--4F9B5A7E1E744830A7378CC67D3BCFD2--></AD_ELEMENT>
+
 <!--50069593057E4B64AE1FCF29E2898A74--><AD_ELEMENT>
 <!--50069593057E4B64AE1FCF29E2898A74-->  <AD_ELEMENT_ID><![CDATA[50069593057E4B64AE1FCF29E2898A74]]></AD_ELEMENT_ID>
 <!--50069593057E4B64AE1FCF29E2898A74-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -709,6 +723,18 @@
 <!--9EAE872F6F394DE3AB3BE9AE2B8C7E73-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--9EAE872F6F394DE3AB3BE9AE2B8C7E73--></AD_ELEMENT>
 
+<!--A31D6AEECD6542FB9E08940E7361E1A7--><AD_ELEMENT>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <AD_ELEMENT_ID><![CDATA[A31D6AEECD6542FB9E08940E7361E1A7]]></AD_ELEMENT_ID>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <COLUMNNAME><![CDATA[loggers]]></COLUMNNAME>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <NAME><![CDATA[Loggers]]></NAME>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <PRINTNAME><![CDATA[Loggers]]></PRINTNAME>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--A31D6AEECD6542FB9E08940E7361E1A7-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--A31D6AEECD6542FB9E08940E7361E1A7--></AD_ELEMENT>
+
 <!--A40E05056A904DD8970BFAB4F5AF7E37--><AD_ELEMENT>
 <!--A40E05056A904DD8970BFAB4F5AF7E37-->  <AD_ELEMENT_ID><![CDATA[A40E05056A904DD8970BFAB4F5AF7E37]]></AD_ELEMENT_ID>
 <!--A40E05056A904DD8970BFAB4F5AF7E37-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -877,6 +903,33 @@
 <!--C3D88F4BB67346D49C0E28A676D916AC-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--C3D88F4BB67346D49C0E28A676D916AC--></AD_ELEMENT>
 
+<!--C453BC52FD694241864B69AE2C0F48FB--><AD_ELEMENT>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <AD_ELEMENT_ID><![CDATA[C453BC52FD694241864B69AE2C0F48FB]]></AD_ELEMENT_ID>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <COLUMNNAME><![CDATA[level]]></COLUMNNAME>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <NAME><![CDATA[Log Level]]></NAME>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <PRINTNAME><![CDATA[Log Level]]></PRINTNAME>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <DESCRIPTION><![CDATA[Logger log level]]></DESCRIPTION>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <HELP><![CDATA[Indicates the minimum level events should have for this Logger to process them. By default this level is determined by
+the config files: it is inherited from the root logger unless an specific configuration for this class/package is defined.]]></HELP>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C453BC52FD694241864B69AE2C0F48FB-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--C453BC52FD694241864B69AE2C0F48FB--></AD_ELEMENT>
+
+<!--C4ED11B624E74BD5B78A9D2960A48B57--><AD_ELEMENT>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <AD_ELEMENT_ID><![CDATA[C4ED11B624E74BD5B78A9D2960A48B57]]></AD_ELEMENT_ID>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <COLUMNNAME><![CDATA[actions]]></COLUMNNAME>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <NAME><![CDATA[Actions]]></NAME>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <PRINTNAME><![CDATA[Actions]]></PRINTNAME>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C4ED11B624E74BD5B78A9D2960A48B57-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--C4ED11B624E74BD5B78A9D2960A48B57--></AD_ELEMENT>
+
 <!--C8856296F35940AF8E7808DF56118451--><AD_ELEMENT>
 <!--C8856296F35940AF8E7808DF56118451-->  <AD_ELEMENT_ID><![CDATA[C8856296F35940AF8E7808DF56118451]]></AD_ELEMENT_ID>
 <!--C8856296F35940AF8E7808DF56118451-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -946,6 +999,18 @@
 <!--DD25DA6ACBD5424B89E09A93A5D4656C-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--DD25DA6ACBD5424B89E09A93A5D4656C--></AD_ELEMENT>
 
+<!--DD92E8A46BAF43DFA4B02949487DC6CA--><AD_ELEMENT>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <AD_ELEMENT_ID><![CDATA[DD92E8A46BAF43DFA4B02949487DC6CA]]></AD_ELEMENT_ID>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <COLUMNNAME><![CDATA[loglevel]]></COLUMNNAME>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <NAME><![CDATA[Log Level]]></NAME>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <PRINTNAME><![CDATA[Log Level]]></PRINTNAME>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--DD92E8A46BAF43DFA4B02949487DC6CA--></AD_ELEMENT>
+
 <!--E726F553F3C04DE791C8E9C1752227F9--><AD_ELEMENT>
 <!--E726F553F3C04DE791C8E9C1752227F9-->  <AD_ELEMENT_ID><![CDATA[E726F553F3C04DE791C8E9C1752227F9]]></AD_ELEMENT_ID>
 <!--E726F553F3C04DE791C8E9C1752227F9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -2163,6 +2163,34 @@
 <!--2313C95040612193E050007F010068A2-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--2313C95040612193E050007F010068A2--></AD_FIELD>
 
+<!--242318520BF849FCBE9B0B4EAD9464EE--><AD_FIELD>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <AD_FIELD_ID><![CDATA[242318520BF849FCBE9B0B4EAD9464EE]]></AD_FIELD_ID>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <NAME><![CDATA[Logger]]></NAME>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <DESCRIPTION><![CDATA[Logger name]]></DESCRIPTION>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <HELP><![CDATA[Name used to identify a Logger. It usually corresponds to the name of the class being logged, but it can also be named using an arbitrary name.]]></HELP>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <AD_TAB_ID><![CDATA[5E3B722F8CBE4E5BBCEA1F785AC26514]]></AD_TAB_ID>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <AD_COLUMN_ID><![CDATA[555D6DAB70824E5FB990905BEC22EEA7]]></AD_COLUMN_ID>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <DISPLAYLENGTH><![CDATA[200]]></DISPLAYLENGTH>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--242318520BF849FCBE9B0B4EAD9464EE-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--242318520BF849FCBE9B0B4EAD9464EE--></AD_FIELD>
+
 <!--2667CF4C44DB40DAAB0EB19C2B1A864C--><AD_FIELD>
 <!--2667CF4C44DB40DAAB0EB19C2B1A864C-->  <AD_FIELD_ID><![CDATA[2667CF4C44DB40DAAB0EB19C2B1A864C]]></AD_FIELD_ID>
 <!--2667CF4C44DB40DAAB0EB19C2B1A864C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3531,6 +3559,32 @@
 <!--50FB7470536A44D69F0EB34B18B9D1FB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--50FB7470536A44D69F0EB34B18B9D1FB--></AD_FIELD>
 
+<!--50FD05116493409D8A41A62CBDB31769--><AD_FIELD>
+<!--50FD05116493409D8A41A62CBDB31769-->  <AD_FIELD_ID><![CDATA[50FD05116493409D8A41A62CBDB31769]]></AD_FIELD_ID>
+<!--50FD05116493409D8A41A62CBDB31769-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--50FD05116493409D8A41A62CBDB31769-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--50FD05116493409D8A41A62CBDB31769-->  <NAME><![CDATA[id]]></NAME>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--50FD05116493409D8A41A62CBDB31769-->  <AD_TAB_ID><![CDATA[5E3B722F8CBE4E5BBCEA1F785AC26514]]></AD_TAB_ID>
+<!--50FD05116493409D8A41A62CBDB31769-->  <AD_COLUMN_ID><![CDATA[AC10D2D19BA34F2384F87DC26F1595B9]]></AD_COLUMN_ID>
+<!--50FD05116493409D8A41A62CBDB31769-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--50FD05116493409D8A41A62CBDB31769-->  <DISPLAYLENGTH><![CDATA[200]]></DISPLAYLENGTH>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--50FD05116493409D8A41A62CBDB31769-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--50FD05116493409D8A41A62CBDB31769-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--50FD05116493409D8A41A62CBDB31769-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--50FD05116493409D8A41A62CBDB31769-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--50FD05116493409D8A41A62CBDB31769-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--50FD05116493409D8A41A62CBDB31769-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--50FD05116493409D8A41A62CBDB31769-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--50FD05116493409D8A41A62CBDB31769--></AD_FIELD>
+
 <!--516959378C7148DDA982C5C655796CBB--><AD_FIELD>
 <!--516959378C7148DDA982C5C655796CBB-->  <AD_FIELD_ID><![CDATA[516959378C7148DDA982C5C655796CBB]]></AD_FIELD_ID>
 <!--516959378C7148DDA982C5C655796CBB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -6956,6 +7010,35 @@
 <!--C01F38E0BD9F431EB6336286E17A433C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--C01F38E0BD9F431EB6336286E17A433C--></AD_FIELD>
 
+<!--C20EC5D0923B4B279882D7F44350C687--><AD_FIELD>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <AD_FIELD_ID><![CDATA[C20EC5D0923B4B279882D7F44350C687]]></AD_FIELD_ID>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <NAME><![CDATA[Log Level]]></NAME>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <DESCRIPTION><![CDATA[Logger log level]]></DESCRIPTION>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <HELP><![CDATA[Indicates the minimum level events should have for this Logger to process them. By default this level is determined by
+the config files: it is inherited from the root logger unless an specific configuration for this class/package is defined.]]></HELP>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <AD_TAB_ID><![CDATA[5E3B722F8CBE4E5BBCEA1F785AC26514]]></AD_TAB_ID>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <AD_COLUMN_ID><![CDATA[780C755C3A81447ABBD830D22038D1CB]]></AD_COLUMN_ID>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <DISPLAYLENGTH><![CDATA[0]]></DISPLAYLENGTH>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--C20EC5D0923B4B279882D7F44350C687-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--C20EC5D0923B4B279882D7F44350C687--></AD_FIELD>
+
 <!--C216C156DB954876BB6F0B830038E599--><AD_FIELD>
 <!--C216C156DB954876BB6F0B830038E599-->  <AD_FIELD_ID><![CDATA[C216C156DB954876BB6F0B830038E599]]></AD_FIELD_ID>
 <!--C216C156DB954876BB6F0B830038E599-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -14,6 +14,21 @@
 <!--53A93D1C7EB84409B05847A8691FA9AB-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
 <!--53A93D1C7EB84409B05847A8691FA9AB--></AD_MENU>
 
+<!--6011C7160F164247B4AEE7E45D466442--><AD_MENU>
+<!--6011C7160F164247B4AEE7E45D466442-->  <AD_MENU_ID><![CDATA[6011C7160F164247B4AEE7E45D466442]]></AD_MENU_ID>
+<!--6011C7160F164247B4AEE7E45D466442-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--6011C7160F164247B4AEE7E45D466442-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--6011C7160F164247B4AEE7E45D466442-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--6011C7160F164247B4AEE7E45D466442-->  <NAME><![CDATA[Log Management]]></NAME>
+<!--6011C7160F164247B4AEE7E45D466442-->  <DESCRIPTION><![CDATA[Manage active Loggers]]></DESCRIPTION>
+<!--6011C7160F164247B4AEE7E45D466442-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
+<!--6011C7160F164247B4AEE7E45D466442-->  <ACTION><![CDATA[OBUIAPP_Process]]></ACTION>
+<!--6011C7160F164247B4AEE7E45D466442-->  <AD_WINDOW_ID><![CDATA[DCA855BFACF94A8CAB1F66E825D9076B]]></AD_WINDOW_ID>
+<!--6011C7160F164247B4AEE7E45D466442-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--6011C7160F164247B4AEE7E45D466442-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
+<!--6011C7160F164247B4AEE7E45D466442-->  <EM_OBUIAPP_PROCESS_ID><![CDATA[FF1893F761AF46E893E37CB4EF1DFCB1]]></EM_OBUIAPP_PROCESS_ID>
+<!--6011C7160F164247B4AEE7E45D466442--></AD_MENU>
+
 <!--6FD97ECD72B4405FA1442FD8673AE571--><AD_MENU>
 <!--6FD97ECD72B4405FA1442FD8673AE571-->  <AD_MENU_ID><![CDATA[6FD97ECD72B4405FA1442FD8673AE571]]></AD_MENU_ID>
 <!--6FD97ECD72B4405FA1442FD8673AE571-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -482,6 +482,18 @@
 <!--2C8A8843F1E04317AD38623A3C52F978-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--2C8A8843F1E04317AD38623A3C52F978--></AD_MESSAGE>
 
+<!--2E7A7ADA901742CE935C04E1861A0988--><AD_MESSAGE>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <AD_MESSAGE_ID><![CDATA[2E7A7ADA901742CE935C04E1861A0988]]></AD_MESSAGE_ID>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <VALUE><![CDATA[OBUIAPP_LogLevelChanged]]></VALUE>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <MSGTEXT><![CDATA[Log Level changed for the selected entries]]></MSGTEXT>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <MSGTYPE><![CDATA[S]]></MSGTYPE>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--2E7A7ADA901742CE935C04E1861A0988-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--2E7A7ADA901742CE935C04E1861A0988--></AD_MESSAGE>
+
 <!--2EEFD14AC47C4C2ABB4218DFB2F12564--><AD_MESSAGE>
 <!--2EEFD14AC47C4C2ABB4218DFB2F12564-->  <AD_MESSAGE_ID><![CDATA[2EEFD14AC47C4C2ABB4218DFB2F12564]]></AD_MESSAGE_ID>
 <!--2EEFD14AC47C4C2ABB4218DFB2F12564-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <NAME><![CDATA[User Interface Application]]></NAME>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.34849]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.35272]]></VERSION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <DESCRIPTION><![CDATA[Provides the main application components for the openbravo user interface]]></DESCRIPTION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HELP><![CDATA[Provides the main application components for the openbravo user interface. The main layout incorporates a navigation bar and a main view area.]]></HELP>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <URL><![CDATA[http://forge.openbravo.com/projects/clientapplication]]></URL>
@@ -22,7 +22,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--9BA0836A3CD74EE4AB48753A47211BCC--></AD_MODULE>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--60A170212F36499D83B8AD38D01F46B3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.34849]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.35272]]></STARTVERSION>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REFERENCE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REFERENCE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -44,6 +44,18 @@
 <!--1AC7885279E44C4F976267C28270E1F9-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--1AC7885279E44C4F976267C28270E1F9--></AD_REFERENCE>
 
+<!--796D78C416C042DB8BF4D2FE64A7E95E--><AD_REFERENCE>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <AD_REFERENCE_ID><![CDATA[796D78C416C042DB8BF4D2FE64A7E95E]]></AD_REFERENCE_ID>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <NAME><![CDATA[OBUIAPP_LogManagementButtonList]]></NAME>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <PARENTREFERENCE_ID><![CDATA[FF80818132F94B500132F9575619000A]]></PARENTREFERENCE_ID>
+<!--796D78C416C042DB8BF4D2FE64A7E95E-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--796D78C416C042DB8BF4D2FE64A7E95E--></AD_REFERENCE>
+
 <!--892231CFE03848758D74B0209B801C14--><AD_REFERENCE>
 <!--892231CFE03848758D74B0209B801C14-->  <AD_REFERENCE_ID><![CDATA[892231CFE03848758D74B0209B801C14]]></AD_REFERENCE_ID>
 <!--892231CFE03848758D74B0209B801C14-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -82,6 +94,19 @@
 <!--BCDF0DC3ECD14B07AC54287DCB1276D2-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--BCDF0DC3ECD14B07AC54287DCB1276D2--></AD_REFERENCE>
 
+<!--BEB937C8808C4EFA977887CADDAC4E07--><AD_REFERENCE>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <AD_REFERENCE_ID><![CDATA[BEB937C8808C4EFA977887CADDAC4E07]]></AD_REFERENCE_ID>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <NAME><![CDATA[Loggers]]></NAME>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <DESCRIPTION><![CDATA[Active loggers window]]></DESCRIPTION>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <PARENTREFERENCE_ID><![CDATA[FF80818132D8F0F30132D9BC395D0038]]></PARENTREFERENCE_ID>
+<!--BEB937C8808C4EFA977887CADDAC4E07-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--BEB937C8808C4EFA977887CADDAC4E07--></AD_REFERENCE>
+
 <!--BF6302EFCC854FA3B75658737442CEC9--><AD_REFERENCE>
 <!--BF6302EFCC854FA3B75658737442CEC9-->  <AD_REFERENCE_ID><![CDATA[BF6302EFCC854FA3B75658737442CEC9]]></AD_REFERENCE_ID>
 <!--BF6302EFCC854FA3B75658737442CEC9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -96,6 +121,20 @@
 <!--BF6302EFCC854FA3B75658737442CEC9-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--BF6302EFCC854FA3B75658737442CEC9--></AD_REFERENCE>
 
+<!--CF8CB8C4E798423081CE42078CA6BD7C--><AD_REFERENCE>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <NAME><![CDATA[Log Level]]></NAME>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <DESCRIPTION><![CDATA[Log levels supported by logger]]></DESCRIPTION>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <HELP><![CDATA[Contains all log levels supported by the logging library]]></HELP>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--CF8CB8C4E798423081CE42078CA6BD7C-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--CF8CB8C4E798423081CE42078CA6BD7C--></AD_REFERENCE>
+
 <!--D6193AA7FAB6429C8F34249FBF5A5F50--><AD_REFERENCE>
 <!--D6193AA7FAB6429C8F34249FBF5A5F50-->  <AD_REFERENCE_ID><![CDATA[D6193AA7FAB6429C8F34249FBF5A5F50]]></AD_REFERENCE_ID>
 <!--D6193AA7FAB6429C8F34249FBF5A5F50-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REF_LIST.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -47,6 +47,18 @@
 <!--18ECDF9EC67E405BBEA050F45BA8D0CD-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--18ECDF9EC67E405BBEA050F45BA8D0CD--></AD_REF_LIST>
 
+<!--1D1B003A749F412D88EF43BA5AF9C743--><AD_REF_LIST>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <AD_REF_LIST_ID><![CDATA[1D1B003A749F412D88EF43BA5AF9C743]]></AD_REF_LIST_ID>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <VALUE><![CDATA[FATAL]]></VALUE>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <NAME><![CDATA[FATAL]]></NAME>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--1D1B003A749F412D88EF43BA5AF9C743-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--1D1B003A749F412D88EF43BA5AF9C743--></AD_REF_LIST>
+
 <!--1E1929CEE0024199A910E33A61678F60--><AD_REF_LIST>
 <!--1E1929CEE0024199A910E33A61678F60-->  <AD_REF_LIST_ID><![CDATA[1E1929CEE0024199A910E33A61678F60]]></AD_REF_LIST_ID>
 <!--1E1929CEE0024199A910E33A61678F60-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -92,6 +104,19 @@
 <!--3A347A8CAF7347B1A7097634F7559011-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--3A347A8CAF7347B1A7097634F7559011--></AD_REF_LIST>
 
+<!--3B90BB8348CD4F64980355F35204FF22--><AD_REF_LIST>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <AD_REF_LIST_ID><![CDATA[3B90BB8348CD4F64980355F35204FF22]]></AD_REF_LIST_ID>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <VALUE><![CDATA[OFF]]></VALUE>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <NAME><![CDATA[OFF]]></NAME>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <DESCRIPTION><![CDATA[Logger is off. No log will be shown for this logger]]></DESCRIPTION>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--3B90BB8348CD4F64980355F35204FF22-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--3B90BB8348CD4F64980355F35204FF22--></AD_REF_LIST>
+
 <!--3D9CA94C564A46A6A0C4E4B31CDC20F9--><AD_REF_LIST>
 <!--3D9CA94C564A46A6A0C4E4B31CDC20F9-->  <AD_REF_LIST_ID><![CDATA[3D9CA94C564A46A6A0C4E4B31CDC20F9]]></AD_REF_LIST_ID>
 <!--3D9CA94C564A46A6A0C4E4B31CDC20F9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -140,6 +165,18 @@
 <!--4C0466BB94BD413BB8D523C3FADB4E4C-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--4C0466BB94BD413BB8D523C3FADB4E4C--></AD_REF_LIST>
 
+<!--54970D90B5F14AA48756C3CE1FE30994--><AD_REF_LIST>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <AD_REF_LIST_ID><![CDATA[54970D90B5F14AA48756C3CE1FE30994]]></AD_REF_LIST_ID>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <VALUE><![CDATA[ERROR]]></VALUE>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <NAME><![CDATA[ERROR]]></NAME>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--54970D90B5F14AA48756C3CE1FE30994-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--54970D90B5F14AA48756C3CE1FE30994--></AD_REF_LIST>
+
 <!--557BFB777B164892BB8BC97772EEA71A--><AD_REF_LIST>
 <!--557BFB777B164892BB8BC97772EEA71A-->  <AD_REF_LIST_ID><![CDATA[557BFB777B164892BB8BC97772EEA71A]]></AD_REF_LIST_ID>
 <!--557BFB777B164892BB8BC97772EEA71A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -175,6 +212,18 @@
 <!--67C9AE863A644F46BC21F563E4910F6C-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--67C9AE863A644F46BC21F563E4910F6C--></AD_REF_LIST>
 
+<!--690FF92F61234B8B8A18EA60FD7C8C4A--><AD_REF_LIST>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <AD_REF_LIST_ID><![CDATA[690FF92F61234B8B8A18EA60FD7C8C4A]]></AD_REF_LIST_ID>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <VALUE><![CDATA[DEBUG]]></VALUE>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <NAME><![CDATA[DEBUG]]></NAME>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--690FF92F61234B8B8A18EA60FD7C8C4A--></AD_REF_LIST>
+
 <!--6D7755B77E254D83AAC62B93D3A62ED9--><AD_REF_LIST>
 <!--6D7755B77E254D83AAC62B93D3A62ED9-->  <AD_REF_LIST_ID><![CDATA[6D7755B77E254D83AAC62B93D3A62ED9]]></AD_REF_LIST_ID>
 <!--6D7755B77E254D83AAC62B93D3A62ED9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -223,6 +272,18 @@
 <!--7BA6CC6144AC411BA76447FBECFD801C-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--7BA6CC6144AC411BA76447FBECFD801C--></AD_REF_LIST>
 
+<!--7C65C327A4B141CF9E20C82A7393C1C2--><AD_REF_LIST>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <AD_REF_LIST_ID><![CDATA[7C65C327A4B141CF9E20C82A7393C1C2]]></AD_REF_LIST_ID>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <VALUE><![CDATA[INFO]]></VALUE>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <NAME><![CDATA[INFO]]></NAME>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--7C65C327A4B141CF9E20C82A7393C1C2-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--7C65C327A4B141CF9E20C82A7393C1C2--></AD_REF_LIST>
+
 <!--7ED34AAD4A1746FBAF149C03BCBF53B7--><AD_REF_LIST>
 <!--7ED34AAD4A1746FBAF149C03BCBF53B7-->  <AD_REF_LIST_ID><![CDATA[7ED34AAD4A1746FBAF149C03BCBF53B7]]></AD_REF_LIST_ID>
 <!--7ED34AAD4A1746FBAF149C03BCBF53B7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -363,6 +424,18 @@
 <!--BFCEC56FA0014475BC33E1E0CA310A15-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--BFCEC56FA0014475BC33E1E0CA310A15--></AD_REF_LIST>
 
+<!--C0E1AAAEB441463FA3FF6AF64C946D15--><AD_REF_LIST>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <AD_REF_LIST_ID><![CDATA[C0E1AAAEB441463FA3FF6AF64C946D15]]></AD_REF_LIST_ID>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <VALUE><![CDATA[TRACE]]></VALUE>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <NAME><![CDATA[TRACE]]></NAME>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--C0E1AAAEB441463FA3FF6AF64C946D15--></AD_REF_LIST>
+
 <!--C1990DC063B94C7EBCA8402777A9B4DC--><AD_REF_LIST>
 <!--C1990DC063B94C7EBCA8402777A9B4DC-->  <AD_REF_LIST_ID><![CDATA[C1990DC063B94C7EBCA8402777A9B4DC]]></AD_REF_LIST_ID>
 <!--C1990DC063B94C7EBCA8402777A9B4DC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -375,6 +448,18 @@
 <!--C1990DC063B94C7EBCA8402777A9B4DC-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--C1990DC063B94C7EBCA8402777A9B4DC--></AD_REF_LIST>
 
+<!--C2B98F5FB8D849D78D26A34103E44D1A--><AD_REF_LIST>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <AD_REF_LIST_ID><![CDATA[C2B98F5FB8D849D78D26A34103E44D1A]]></AD_REF_LIST_ID>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <VALUE><![CDATA[WARN]]></VALUE>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <NAME><![CDATA[WARNING]]></NAME>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C2B98F5FB8D849D78D26A34103E44D1A-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--C2B98F5FB8D849D78D26A34103E44D1A--></AD_REF_LIST>
+
 <!--C305601E197949A5A07257C701CFA04C--><AD_REF_LIST>
 <!--C305601E197949A5A07257C701CFA04C-->  <AD_REF_LIST_ID><![CDATA[C305601E197949A5A07257C701CFA04C]]></AD_REF_LIST_ID>
 <!--C305601E197949A5A07257C701CFA04C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -423,6 +508,31 @@
 <!--CA687B03F0984309BAF3E7592C0AE77C-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--CA687B03F0984309BAF3E7592C0AE77C--></AD_REF_LIST>
 
+<!--D7700C87728241AC8FB79D85DD3E1B14--><AD_REF_LIST>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <AD_REF_LIST_ID><![CDATA[D7700C87728241AC8FB79D85DD3E1B14]]></AD_REF_LIST_ID>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <VALUE><![CDATA[apply]]></VALUE>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <NAME><![CDATA[Apply]]></NAME>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <AD_REFERENCE_ID><![CDATA[796D78C416C042DB8BF4D2FE64A7E95E]]></AD_REFERENCE_ID>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--D7700C87728241AC8FB79D85DD3E1B14-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--D7700C87728241AC8FB79D85DD3E1B14--></AD_REF_LIST>
+
+<!--E229E56F4A3E4677B5F5FBED9D7E5876--><AD_REF_LIST>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <AD_REF_LIST_ID><![CDATA[E229E56F4A3E4677B5F5FBED9D7E5876]]></AD_REF_LIST_ID>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <VALUE><![CDATA[ALL]]></VALUE>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <NAME><![CDATA[ALL]]></NAME>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <DESCRIPTION><![CDATA[All logs will be shown regardless of its level]]></DESCRIPTION>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <AD_REFERENCE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_ID>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--E229E56F4A3E4677B5F5FBED9D7E5876--></AD_REF_LIST>
+
 <!--E53EC9857A5042E3A7C3534AA8F642DD--><AD_REF_LIST>
 <!--E53EC9857A5042E3A7C3534AA8F642DD-->  <AD_REF_LIST_ID><![CDATA[E53EC9857A5042E3A7C3534AA8F642DD]]></AD_REF_LIST_ID>
 <!--E53EC9857A5042E3A7C3534AA8F642DD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TAB.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TAB.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -153,6 +153,37 @@
 <!--4F5C5D438DAF47D4AE8DD48C44D4FE04-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
 <!--4F5C5D438DAF47D4AE8DD48C44D4FE04--></AD_TAB>
 
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514--><AD_TAB>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <AD_TAB_ID><![CDATA[5E3B722F8CBE4E5BBCEA1F785AC26514]]></AD_TAB_ID>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <NAME><![CDATA[Header]]></NAME>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <DESCRIPTION><![CDATA[List available Loggers]]></DESCRIPTION>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <HELP><![CDATA[List available Loggers]]></HELP>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <AD_TABLE_ID><![CDATA[ED87AD8D00DE4CC79B9BB66F3E90B78B]]></AD_TABLE_ID>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <AD_WINDOW_ID><![CDATA[DCA855BFACF94A8CAB1F66E825D9076B]]></AD_WINDOW_ID>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <TABLEVEL><![CDATA[0]]></TABLEVEL>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISSINGLEROW><![CDATA[N]]></ISSINGLEROW>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISINFOTAB><![CDATA[N]]></ISINFOTAB>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISTRANSLATIONTAB><![CDATA[N]]></ISTRANSLATIONTAB>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <HASTREE><![CDATA[N]]></HASTREE>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <PROCESSING><![CDATA[N]]></PROCESSING>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
+<!--5E3B722F8CBE4E5BBCEA1F785AC26514--></AD_TAB>
+
 <!--6D732D027FFA4FB1BD0140ED3B606C0E--><AD_TAB>
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <AD_TAB_ID><![CDATA[6D732D027FFA4FB1BD0140ED3B606C0E]]></AD_TAB_ID>
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TABLE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TABLE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -360,6 +360,30 @@
 <!--E6F29F8A30BC4603B1D1195051C4F3A6-->  <ISTREE><![CDATA[N]]></ISTREE>
 <!--E6F29F8A30BC4603B1D1195051C4F3A6--></AD_TABLE>
 
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B--><AD_TABLE>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <AD_TABLE_ID><![CDATA[ED87AD8D00DE4CC79B9BB66F3E90B78B]]></AD_TABLE_ID>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <NAME><![CDATA[OBUIAPP_LoggerManagement]]></NAME>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <DESCRIPTION><![CDATA[Logger log level management]]></DESCRIPTION>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <HELP><![CDATA[Shows all registered Loggers and their assigned log level based on the current configuration.]]></HELP>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <TABLENAME><![CDATA[OBUIAPP_LoggerManagement]]></TABLENAME>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISVIEW><![CDATA[N]]></ISVIEW>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ACCESSLEVEL><![CDATA[4]]></ACCESSLEVEL>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISDELETEABLE><![CDATA[Y]]></ISDELETEABLE>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <AD_PACKAGE_ID><![CDATA[BA250A68426F4D71BACAE830EF4EC696]]></AD_PACKAGE_ID>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <DATAORIGINTYPE><![CDATA[Datasource]]></DATAORIGINTYPE>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <OBSERDS_DATASOURCE_ID><![CDATA[F6DCA62BC0694DACA9CC84748C119FC5]]></OBSERDS_DATASOURCE_ID>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B-->  <ISTREE><![CDATA[N]]></ISTREE>
+<!--ED87AD8D00DE4CC79B9BB66F3E90B78B--></AD_TABLE>
+
 <!--F167EB822B8A4284AC37D5B40B785D51--><AD_TABLE>
 <!--F167EB822B8A4284AC37D5B40B785D51-->  <AD_TABLE_ID><![CDATA[F167EB822B8A4284AC37D5B40B785D51]]></AD_TABLE_ID>
 <!--F167EB822B8A4284AC37D5B40B785D51-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TREENODE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TREENODE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -22,6 +22,17 @@
 <!--258D19F188E94196936EF06CF608664C-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--258D19F188E94196936EF06CF608664C--></AD_TREENODE>
 
+<!--58165452E5B64A4DAC6D22D624D8117B--><AD_TREENODE>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <AD_TREENODE_ID><![CDATA[58165452E5B64A4DAC6D22D624D8117B]]></AD_TREENODE_ID>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <AD_TREE_ID><![CDATA[10]]></AD_TREE_ID>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <NODE_ID><![CDATA[6011C7160F164247B4AEE7E45D466442]]></NODE_ID>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <PARENT_ID><![CDATA[161]]></PARENT_ID>
+<!--58165452E5B64A4DAC6D22D624D8117B-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--58165452E5B64A4DAC6D22D624D8117B--></AD_TREENODE>
+
 <!--76DC645312694D7A8E686BF48C3B490C--><AD_TREENODE>
 <!--76DC645312694D7A8E686BF48C3B490C-->  <AD_TREENODE_ID><![CDATA[76DC645312694D7A8E686BF48C3B490C]]></AD_TREENODE_ID>
 <!--76DC645312694D7A8E686BF48C3B490C-->  <AD_TREE_ID><![CDATA[10]]></AD_TREE_ID>
@@ -63,7 +74,7 @@
 <!--B83877C5FBFF4DF495E4A2F4DE15E2D1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--B83877C5FBFF4DF495E4A2F4DE15E2D1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B83877C5FBFF4DF495E4A2F4DE15E2D1-->  <PARENT_ID><![CDATA[161]]></PARENT_ID>
-<!--B83877C5FBFF4DF495E4A2F4DE15E2D1-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--B83877C5FBFF4DF495E4A2F4DE15E2D1-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--B83877C5FBFF4DF495E4A2F4DE15E2D1--></AD_TREENODE>
 
 <!--CDB4E2EADAAA4C63946C2EC2D8031CAF--><AD_TREENODE>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_WINDOW.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_WINDOW.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -51,6 +51,23 @@
 <!--7E72F3A16C704449BC50FCE1512C3805-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
 <!--7E72F3A16C704449BC50FCE1512C3805--></AD_WINDOW>
 
+<!--DCA855BFACF94A8CAB1F66E825D9076B--><AD_WINDOW>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <AD_WINDOW_ID><![CDATA[DCA855BFACF94A8CAB1F66E825D9076B]]></AD_WINDOW_ID>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <NAME><![CDATA[Log Management]]></NAME>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <DESCRIPTION><![CDATA[Manage active Loggers]]></DESCRIPTION>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <HELP><![CDATA[Shows all registered Loggers and let change the log level of one or more loggers.]]></HELP>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <WINDOWTYPE><![CDATA[OBUIAPP_PickAndExecute]]></WINDOWTYPE>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <ISSOTRX><![CDATA[N]]></ISSOTRX>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <PROCESSING><![CDATA[N]]></PROCESSING>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <ISDEFAULT><![CDATA[N]]></ISDEFAULT>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <ISTHREADSAFE><![CDATA[N]]></ISTHREADSAFE>
+<!--DCA855BFACF94A8CAB1F66E825D9076B-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--DCA855BFACF94A8CAB1F66E825D9076B--></AD_WINDOW>
+
 <!--EBA40241D46D4FA4A24E4A09C61994AA--><AD_WINDOW>
 <!--EBA40241D46D4FA4A24E4A09C61994AA-->  <AD_WINDOW_ID><![CDATA[EBA40241D46D4FA4A24E4A09C61994AA]]></AD_WINDOW_ID>
 <!--EBA40241D46D4FA4A24E4A09C61994AA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/OBSERDS_DATASOURCE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/OBSERDS_DATASOURCE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -41,4 +41,18 @@
 <!--DB9F062472294F12A0291A7BD203F922-->  <IDFKFILTERING><![CDATA[Y]]></IDFKFILTERING>
 <!--DB9F062472294F12A0291A7BD203F922--></OBSERDS_DATASOURCE>
 
+<!--F6DCA62BC0694DACA9CC84748C119FC5--><OBSERDS_DATASOURCE>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <OBSERDS_DATASOURCE_ID><![CDATA[F6DCA62BC0694DACA9CC84748C119FC5]]></OBSERDS_DATASOURCE_ID>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <NAME><![CDATA[Log Management Datasource]]></NAME>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <DESCRIPTION><![CDATA[Datasource that shows all classes that have a logger configured]]></DESCRIPTION>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <CLASSNAME><![CDATA[org.openbravo.client.application.logmanagement.LogDatasource]]></CLASSNAME>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <OBCLKER_TEMPLATE_ID><![CDATA[2BAD445C2A0343C58E455F9BD379C690]]></OBCLKER_TEMPLATE_ID>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <USEASTABLEDATAORIGIN><![CDATA[Y]]></USEASTABLEDATAORIGIN>
+<!--F6DCA62BC0694DACA9CC84748C119FC5-->  <IDFKFILTERING><![CDATA[N]]></IDFKFILTERING>
+<!--F6DCA62BC0694DACA9CC84748C119FC5--></OBSERDS_DATASOURCE>
+
 </data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,76 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--4AE8686060B7439A8EE170BFB3FA078B--><OBUIAPP_PARAMETER>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <OBUIAPP_PARAMETER_ID><![CDATA[4AE8686060B7439A8EE170BFB3FA078B]]></OBUIAPP_PARAMETER_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <NAME><![CDATA[Log Level]]></NAME>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <AD_REFERENCE_VALUE_ID><![CDATA[CF8CB8C4E798423081CE42078CA6BD7C]]></AD_REFERENCE_VALUE_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <COLUMNNAME><![CDATA[loglevel]]></COLUMNNAME>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <DEFAULTVALUE><![CDATA["INFO"]]></DEFAULTVALUE>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <AD_ELEMENT_ID><![CDATA[DD92E8A46BAF43DFA4B02949487DC6CA]]></AD_ELEMENT_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <OBUIAPP_PROCESS_ID><![CDATA[FF1893F761AF46E893E37CB4EF1DFCB1]]></OBUIAPP_PROCESS_ID>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--4AE8686060B7439A8EE170BFB3FA078B-->  <ATT_SHOWINDESCRIPTION><![CDATA[N]]></ATT_SHOWINDESCRIPTION>
+<!--4AE8686060B7439A8EE170BFB3FA078B--></OBUIAPP_PARAMETER>
+
+<!--C8A1D70CDE4A4500873C85A419CFE0B7--><OBUIAPP_PARAMETER>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <OBUIAPP_PARAMETER_ID><![CDATA[C8A1D70CDE4A4500873C85A419CFE0B7]]></OBUIAPP_PARAMETER_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <NAME><![CDATA[Loggers]]></NAME>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <AD_REFERENCE_ID><![CDATA[FF80818132D8F0F30132D9BC395D0038]]></AD_REFERENCE_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <AD_REFERENCE_VALUE_ID><![CDATA[BEB937C8808C4EFA977887CADDAC4E07]]></AD_REFERENCE_VALUE_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <COLUMNNAME><![CDATA[loggers]]></COLUMNNAME>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <AD_ELEMENT_ID><![CDATA[A31D6AEECD6542FB9E08940E7361E1A7]]></AD_ELEMENT_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <OBUIAPP_PROCESS_ID><![CDATA[FF1893F761AF46E893E37CB4EF1DFCB1]]></OBUIAPP_PROCESS_ID>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <DISPLAYEDROWS><![CDATA[15]]></DISPLAYEDROWS>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7-->  <ATT_SHOWINDESCRIPTION><![CDATA[N]]></ATT_SHOWINDESCRIPTION>
+<!--C8A1D70CDE4A4500873C85A419CFE0B7--></OBUIAPP_PARAMETER>
+
+<!--CE1CE26CDB9241B3B036C47013226501--><OBUIAPP_PARAMETER>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <OBUIAPP_PARAMETER_ID><![CDATA[CE1CE26CDB9241B3B036C47013226501]]></OBUIAPP_PARAMETER_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <NAME><![CDATA[Actions]]></NAME>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <AD_REFERENCE_ID><![CDATA[FF80818132F94B500132F9575619000A]]></AD_REFERENCE_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <AD_REFERENCE_VALUE_ID><![CDATA[796D78C416C042DB8BF4D2FE64A7E95E]]></AD_REFERENCE_VALUE_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <COLUMNNAME><![CDATA[actions]]></COLUMNNAME>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <AD_ELEMENT_ID><![CDATA[C4ED11B624E74BD5B78A9D2960A48B57]]></AD_ELEMENT_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <ISFIXED><![CDATA[N]]></ISFIXED>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <OBUIAPP_PROCESS_ID><![CDATA[FF1893F761AF46E893E37CB4EF1DFCB1]]></OBUIAPP_PROCESS_ID>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <DISPLAYTITLE><![CDATA[Y]]></DISPLAYTITLE>
+<!--CE1CE26CDB9241B3B036C47013226501-->  <ATT_SHOWINDESCRIPTION><![CDATA[N]]></ATT_SHOWINDESCRIPTION>
+<!--CE1CE26CDB9241B3B036C47013226501--></OBUIAPP_PARAMETER>
+
+</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/OBUIAPP_PROCESS.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,23 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1--><OBUIAPP_PROCESS>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <OBUIAPP_PROCESS_ID><![CDATA[FF1893F761AF46E893E37CB4EF1DFCB1]]></OBUIAPP_PROCESS_ID>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <VALUE><![CDATA[LogManagement]]></VALUE>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <NAME><![CDATA[Log Management]]></NAME>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <DESCRIPTION><![CDATA[Update the log level of the given Loggers]]></DESCRIPTION>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <HELP><![CDATA[This action updates the log level of the given loggers, overwriting their default configuration. Note that this changes will be reverted if Tomcat is restarted so consider editing the log4j config files if changes are meant to be permanent.]]></HELP>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <ACCESSLEVEL><![CDATA[4]]></ACCESSLEVEL>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <CLASSNAME><![CDATA[org.openbravo.client.application.logmanagement.LogManagementActionHandler]]></CLASSNAME>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <ISBACKGROUND><![CDATA[N]]></ISBACKGROUND>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <UIPATTERN><![CDATA[OBUIAPP_PickAndExecute]]></UIPATTERN>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <ISMULTIRECORD><![CDATA[Y]]></ISMULTIRECORD>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <IS_EXPLICIT_ACCESS><![CDATA[N]]></IS_EXPLICIT_ACCESS>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <ISGRIDLEGACY><![CDATA[N]]></ISGRIDLEGACY>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1-->  <ISCANADDRECORDSTOSELECTOR><![CDATA[N]]></ISCANADDRECORDSTOSELECTOR>
+<!--FF1893F761AF46E893E37CB4EF1DFCB1--></OBUIAPP_PROCESS>
+
+</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/OBUIAPP_REF_WINDOW.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--517600D185E04A3CBBB9BDA7C86A6500--><OBUIAPP_REF_WINDOW>
+<!--517600D185E04A3CBBB9BDA7C86A6500-->  <OBUIAPP_REF_WINDOW_ID><![CDATA[517600D185E04A3CBBB9BDA7C86A6500]]></OBUIAPP_REF_WINDOW_ID>
+<!--517600D185E04A3CBBB9BDA7C86A6500-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--517600D185E04A3CBBB9BDA7C86A6500-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--517600D185E04A3CBBB9BDA7C86A6500-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--517600D185E04A3CBBB9BDA7C86A6500-->  <AD_REFERENCE_ID><![CDATA[BEB937C8808C4EFA977887CADDAC4E07]]></AD_REFERENCE_ID>
+<!--517600D185E04A3CBBB9BDA7C86A6500-->  <AD_WINDOW_ID><![CDATA[DCA855BFACF94A8CAB1F66E825D9076B]]></AD_WINDOW_ID>
+<!--517600D185E04A3CBBB9BDA7C86A6500--></OBUIAPP_REF_WINDOW>
+
+</data>
--- a/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/ADCSInitialization.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/ADCSInitialization.java	Thu Dec 27 10:43:52 2018 +0000
@@ -42,8 +42,8 @@
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.utility.AttachmentMethod;
 import org.openbravo.test.base.mock.HttpServletRequestMock;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Test cases to ensure correct concurrent initialization of ADCS.
@@ -52,7 +52,7 @@
  *
  */
 public class ADCSInitialization extends WeldBaseTest {
-  private static final Logger log = LoggerFactory.getLogger(ADCSInitialization.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   ApplicationDictionaryCachedStructures adcs;
--- a/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/GenerateTypesJSTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/GenerateTypesJSTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -30,8 +30,8 @@
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.userinterface.smartclient.SmartClientComponentProvider;
 import org.openbravo.userinterface.smartclient.TypesComponent;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Test the {@link TypesComponent} and its template.
@@ -39,7 +39,7 @@
  * @author mtaal
  */
 public class GenerateTypesJSTest extends WeldBaseTest {
-  private static final Logger log = LoggerFactory.getLogger(GenerateTypesJSTest.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   @ComponentProvider.Qualifier(SmartClientComponentProvider.QUALIFIER)
--- a/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/MenuTemplateTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/MenuTemplateTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -27,8 +27,8 @@
 import org.openbravo.client.application.MainLayoutComponent;
 import org.openbravo.client.kernel.JSCompressor;
 import org.openbravo.client.kernel.JSLintChecker;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Tests the generating of the menu through a template, menu is part of the MainLayoutComponent, so
@@ -37,7 +37,7 @@
  * @author mtaal
  */
 public class MenuTemplateTest extends WeldBaseTest {
-  private static final Logger log = LoggerFactory.getLogger(MenuTemplateTest.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   private MainLayoutComponent mainLayoutComponent;
--- a/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/MenuTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/MenuTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -26,8 +26,8 @@
 import org.openbravo.base.weld.test.WeldBaseTest;
 import org.openbravo.client.application.MenuManager;
 import org.openbravo.client.application.MenuManager.MenuOption;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Tests the reading of the menu in memory
@@ -35,7 +35,7 @@
  * @author iperdomo
  */
 public class MenuTest extends WeldBaseTest {
-  private static final Logger log = LoggerFactory.getLogger(MenuTest.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   private MenuManager menuManager;
--- a/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/StandardWindowTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src-test/org/openbravo/client/application/test/StandardWindowTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -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-2017 Openbravo SLU
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -24,7 +24,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.log4j.Level;
+import org.apache.logging.log4j.Level;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.openbravo.base.weld.test.WeldBaseTest;
@@ -35,8 +35,8 @@
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.test.base.mock.HttpServletRequestMock;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Tests generation of the javascript for standard windows
@@ -44,7 +44,7 @@
  * @author iperdomo
  */
 public class StandardWindowTest extends WeldBaseTest {
-  private static final Logger log = LoggerFactory.getLogger(StandardWindowTest.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String USER_INTERFACE_APP_MOD = "9BA0836A3CD74EE4AB48753A47211BCC";
 
   /**
@@ -71,7 +71,7 @@
       List<String> errors = new ArrayList<>();
       for (Window window : allWindows) {
         if (hasAtLeastOneActiveTab(window)) {
-          log.info("window {} of {}: {}", new Object[] { ++i, allWindows.size(), window.getName() });
+          log.info("window {} of {}: {}", ++i, allWindows.size(), window.getName());
           try {
             generateForWindow(window);
           } catch (Throwable t) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ADAlertDatasourceService.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ADAlertDatasourceService.java	Thu Dec 27 10:43:52 2018 +0000
@@ -40,8 +40,8 @@
 import org.openbravo.erpCommon.utility.UsedByLink;
 import org.openbravo.service.datasource.DefaultDataSourceService;
 import org.openbravo.service.json.JsonConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Datasource used by the Alert Management window
@@ -52,7 +52,7 @@
   private static final String ALERT_RULE_TAB = "alertRule.tab.id";
   private static final int ALERT_RULE_ID = 0;
   private static final int ALERT_RULE_FILTERCLAUSE = 1;
-  private static final Logger log = LoggerFactory.getLogger(ADAlertDatasourceService.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   public Entity getEntity() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -35,7 +35,8 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.apache.log4j.Logger;
+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.hibernate.query.Query;
@@ -62,7 +63,7 @@
  */
 @ApplicationScoped
 public class AlertActionHandler extends BaseActionHandler implements PortalAccessible {
-  private static final Logger log4j = Logger.getLogger(AlertActionHandler.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   /*
    * (non-Javadoc)
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertManagementActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertManagementActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -31,8 +31,8 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.dal.service.OBDao;
 import org.openbravo.model.ad.alert.Alert;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * @author gorkaion
@@ -40,7 +40,7 @@
  */
 @ApplicationScoped
 public class AlertManagementActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory.getLogger(AlertManagementActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String MOVE_TO_STATUS = "moveToStatus";
 
   /*
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -45,7 +46,7 @@
  */
 public class ApplicationUtils {
 
-  private static Logger log = Logger.getLogger(ApplicationUtils.class);
+  private static Logger log = LogManager.getLogger();
   private static final String BUTTON_REFERENCE = "28";
 
   /**
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/CachedPreference.java	Thu Dec 27 10:43:52 2018 +0000
@@ -33,8 +33,8 @@
 import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.common.enterprise.Organization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This class is used to keep the value of some preferences in cache during the life cycle of a
@@ -46,7 +46,7 @@
 public class CachedPreference implements Serializable {
 
   private static final long serialVersionUID = 1L;
-  private static final Logger log = LoggerFactory.getLogger(CachedPreference.class);
+  private static final Logger log = LogManager.getLogger();
 
   public static final String ALLOW_UNPAGED_DS_MANUAL_REQUEST = "OBJSON_AllowUnpagedDatasourceManualRequest";
   public static final String ALLOW_UNSECURED_DS_REQUEST = "OBSERDS_AllowUnsecuredDatasourceRequest";
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java	Thu Dec 27 10:43:52 2018 +0000
@@ -43,8 +43,8 @@
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.utility.Tree;
 import org.openbravo.model.ad.utility.TreeNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * 
@@ -55,7 +55,7 @@
  */
 @ApplicationScoped
 public class GlobalMenu {
-  private static final Logger log = LoggerFactory.getLogger(GlobalMenu.class);
+  private static final Logger log = LogManager.getLogger();
 
   private Map<String, List<MenuOption>> menuOptionsByLangAndTree = null;
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/HeartBeatPopUpComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/HeartBeatPopUpComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -39,8 +39,8 @@
 import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.model.ad.module.Module;
 import org.openbravo.service.db.DalConnectionProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * The component responsible for generating the content of the function used to determine if the
@@ -49,7 +49,7 @@
  */
 public class HeartBeatPopUpComponent extends SessionDynamicTemplateComponent {
 
-  private static final Logger log = LoggerFactory.getLogger(HeartBeatPopUpComponent.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String APRM_MIGRATION_TOOL_ID = "4BD3D4B262B048518FE62496EF09D549";
   private static final String COMPONENT_ID = "HeartbeatRegistration";
   private static final String TEMPLATE_ID = "EE5CEC203AEA4B039CCDAD0BE8E07E3C";
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java	Thu Dec 27 10:43:52 2018 +0000
@@ -40,8 +40,8 @@
 import org.openbravo.model.ad.ui.MenuTrl;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.utility.TreeNode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Configures cached global menu (@see {@link GlobalMenu}) to adapt it to the current session's
@@ -51,7 +51,7 @@
  */
 @RequestScoped
 public class MenuManager {
-  private static final Logger log = LoggerFactory.getLogger(MenuManager.class);
+  private static final Logger log = LogManager.getLogger();
 
   public static enum MenuEntryType {
     Window, Process, ProcessManual, Report, Form, External, Summary, View, ProcessDefinition
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/OBBindings.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/OBBindings.java	Thu Dec 27 10:43:52 2018 +0000
@@ -35,8 +35,8 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * JS - Java binding to use in JavaScript expressions.
@@ -45,7 +45,7 @@
  */
 public class OBBindings {
 
-  private static final Logger log = LoggerFactory.getLogger(OBBindings.class);
+  private static final Logger log = LogManager.getLogger();
 
   private OBContext context;
   private Map<String, String> requestMap;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ParameterUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ParameterUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -29,7 +29,8 @@
 import javax.servlet.http.HttpSession;
 
 import org.apache.axis.utils.StringUtils;
-import org.apache.log4j.Logger;
+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.expression.OBScriptEngine;
@@ -59,7 +60,7 @@
  */
 public class ParameterUtils {
 
-  private static Logger log = Logger.getLogger(ParameterUtils.class);
+  private static Logger log = LogManager.getLogger();
 
   public static void setParameterValue(ParameterValue parameterValue, JSONObject requestValue) {
     try {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ParametersActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.provider.OBProvider;
@@ -41,7 +42,7 @@
  */
 @ApplicationScoped
 public class ParametersActionHandler extends BaseActionHandler implements PortalAccessible {
-  private static Logger log = Logger.getLogger(ParametersActionHandler.class);
+  private static Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/PropertiesComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/PropertiesComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.client.kernel.SessionDynamicTemplateComponent;
@@ -36,7 +37,7 @@
  * @author mtaal
  */
 public class PropertiesComponent extends SessionDynamicTemplateComponent {
-  private static final Logger log = Logger.getLogger(PropertiesComponent.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   public String getId() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/StorePropertyActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/StorePropertyActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.client.kernel.BaseActionHandler;
 import org.openbravo.client.kernel.StaticResourceComponent;
@@ -45,7 +46,7 @@
  */
 @ApplicationScoped
 public class StorePropertyActionHandler extends BaseActionHandler implements PortalAccessible {
-  private static final Logger log = Logger.getLogger(StorePropertyActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   protected JSONObject execute(Map<String, Object> parameters, String data) {
     OBContext.setAdminMode();
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ViewComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ViewComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -18,6 +18,7 @@
  */
 package org.openbravo.client.application;
 
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
@@ -53,8 +54,8 @@
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.model.ad.utility.AttachmentMethod;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Reads the view and generates it.
@@ -63,7 +64,7 @@
  */
 @RequestScoped
 public class ViewComponent extends BaseComponent {
-  private static Logger log = LoggerFactory.getLogger(ViewComponent.class);
+  private static Logger log = LogManager.getLogger();
 
   @Inject
   private StandardWindowComponent standardWindowComponent;
@@ -88,7 +89,7 @@
     try {
       OBContext.setAdminMode();
 
-      final Window window = OBDal.getInstance().get(Window.class, correctViewId(viewId));
+      final Window window = adcs.getWindow(correctViewId(viewId));
 
       if (window != null) {
         FeatureRestriction featureRestriction = ActivationKey.getInstance().hasLicenseAccess("MW",
@@ -109,7 +110,13 @@
       } else {
         return generateView(viewId);
       }
+    } catch (Exception e) {
+      log.error("Error generating view {}", viewId, e);
+      throw e;
     } finally {
+      // view generation is read only, remove from session whatever DAL loaded to make faster flush
+      OBDal.getInstance().getSession().clear();
+
       OBContext.restorePreviousMode();
       log.debug("View {} generated in {} ms", viewId, System.currentTimeMillis() - t);
     }
@@ -159,7 +166,7 @@
   protected String generateAttachment(String viewId) {
     String[] keys = viewId.split(KernelConstants.ID_PREFIX);
     String tabId = keys[1];
-    Tab tab = OBDal.getInstance().get(Tab.class, tabId);
+    Tab tab = adcs.getTab(tabId);
     if (tab == null) {
       throw new IllegalArgumentException("Not found process definition with ID " + tabId);
     }
@@ -198,7 +205,7 @@
   @Override
   public Module getModule() {
     final String id = getParameter("viewId");
-    final Window window = OBDal.getInstance().get(Window.class, correctViewId(id));
+    final Window window = adcs.getWindow(correctViewId(id));
     if (window != null) {
       return window.getModule();
     } else if (id.startsWith("processDefinition_")) {
@@ -211,7 +218,7 @@
     } else if (id.startsWith("attachment_")) {
       String[] keys = id.split(KernelConstants.ID_PREFIX);
       String tabId = keys[1];
-      Tab tab = OBDal.getInstance().get(Tab.class, tabId);
+      Tab tab = adcs.getTab(tabId);
       if (tab == null) {
         throw new IllegalArgumentException("Not found tab with ID " + tabId);
       }
@@ -295,17 +302,19 @@
     final String viewId = getParameter("viewId");
     OBContext.setAdminMode();
     try {
-      Window window = OBDal.getInstance().get(Window.class, correctViewId(viewId));
+      String fixedViewId = correctViewId(viewId);
+      Window window = null;
+      if (!"processDefinition".equals(fixedViewId)) {
+        window = adcs.getWindow(correctViewId(viewId));
+      }
       if (window == null) {
         return "";
       }
 
       StringBuilder viewVersions = new StringBuilder();
-      for (Tab t : window.getADTabList()) {
-        viewVersions.append(t.getTable().isFullyAudited()).append("|");
-      }
-      viewVersions.append(getLastGridConfigurationChange(window)).append("|");
-      viewVersions.append(getLastSystemPreferenceChange(window)).append("|");
+      viewVersions.append(getAuditStatus(window)) //
+          .append(getLastGridConfigurationChange(window)).append("|") //
+          .append(getLastSystemPreferenceChange(window));
       return DigestUtils.md5Hex(viewVersions.toString());
     } finally {
       OBContext.restorePreviousMode();
@@ -328,37 +337,46 @@
   }
 
   private List<String> getFieldsWithDisplayLogicAtServerLevel(String windowID) {
-    StringBuilder where = new StringBuilder();
-    where.append(" select displayLogicEvaluatedInTheServer");
-    where.append(" from ADField as f");
-    where.append(" where f.displayLogicEvaluatedInTheServer is not null");
-    where.append(" and f.tab.id in (select t.id");
-    where.append("                  from ADTab t");
-    where.append("                  where t.window.id = :windowId)");
+    String where = " select displayLogicEvaluatedInTheServer" //
+        + " from ADField as f" //
+        + " where f.displayLogicEvaluatedInTheServer is not null" //
+        + " and f.tab.id in (select t.id" //
+        + "                  from ADTab t" //
+        + "                  where t.window.id = :windowId)";
 
     Session session = OBDal.getInstance().getSession();
-    Query<String> query = session.createQuery(where.toString(), String.class);
+    Query<String> query = session.createQuery(where, String.class);
     query.setParameter("windowId", windowID);
 
     return query.list();
   }
 
   private Date getLastUpdated(Set<String> preferenceSet) {
-    StringBuilder where = new StringBuilder();
-    where.append(" select max(p.updated)");
-    where.append(" from ADPreference p");
-    where.append(" where p.propertyList = true");
-    where.append(" and p.property in :properties");
-    where.append(" and p.client.id = '0'");
-    where.append(" and p.organization = '0'");
-    where.append(" and coalesce(p.visibleAtClient, '0') = '0'");
-    where.append(" and coalesce(p.visibleAtOrganization, '0') = '0'");
+    String where = " select max(p.updated)" //
+        + " from ADPreference p" //
+        + " where p.propertyList = true" //
+        + " and p.property in :properties" //
+        + " and p.client.id = '0'" //
+        + " and p.organization = '0'" //
+        + " and coalesce(p.visibleAtClient, '0') = '0'" //
+        + " and coalesce(p.visibleAtOrganization, '0') = '0'";
 
     Session session = OBDal.getInstance().getSession();
-    Query<Date> query = session.createQuery(where.toString(), Date.class);
+    Query<Date> query = session.createQuery(where, Date.class);
     query.setParameterList("properties", preferenceSet);
     Date lastUpdated = query.uniqueResult();
 
     return lastUpdated;
   }
+
+  private String getAuditStatus(Window window) {
+    String where = "select t.table.isFullyAudited " //
+        + "  from ADTab t " //
+        + " where t.window = :window " //
+        + " order by t.sequenceNumber, t.id"; //
+    Query<Boolean> q = OBDal.getInstance().getSession().createQuery(where, Boolean.class);
+    q.setParameter("window", window);
+
+    return Arrays.asList(q.list()).toString();
+  }
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -53,8 +53,8 @@
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.service.db.DalConnectionProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Computes different settings which may be user/role specific for a certain window.
@@ -64,7 +64,7 @@
  */
 @ApplicationScoped
 public class WindowSettingsActionHandler extends BaseActionHandler {
-  private static final Logger log = LoggerFactory.getLogger(WindowSettingsActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   public static final String EXTRA_CALLBACKS = "extraCallbacks";
 
   @Inject
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachImplementationManager.java	Thu Dec 27 10:43:52 2018 +0000
@@ -70,8 +70,8 @@
 import org.openbravo.model.ad.utility.AttachmentMethod;
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Class that centralizes the Attachment Management. Any action to manage an attachment in Openbravo
@@ -82,7 +82,7 @@
  */
 public class AttachImplementationManager {
 
-  private static final Logger log = LoggerFactory.getLogger(AttachImplementationManager.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String TEMP_DIR = System.getProperty("java.io.tmpdir");
 
   public static final String REFERENCE_LIST = "17";
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentAH.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentAH.java	Thu Dec 27 10:43:52 2018 +0000
@@ -41,8 +41,8 @@
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.utility.Attachment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Action handler to manage attachments.<br>
@@ -53,7 +53,7 @@
  */
 public class AttachmentAH extends BaseActionHandler {
 
-  private static final Logger log = LoggerFactory.getLogger(AttachmentAH.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   private AttachImplementationManager aim;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentConfigEventHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentConfigEventHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2015-2016 Openbravo SLU
+ * All portions are Copyright (C) 2015-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -33,8 +33,8 @@
 import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.model.ad.utility.AttachmentConfig;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Event Handler on AttachmentConfig entity that manages the changes on the Attachment Method used
@@ -43,7 +43,7 @@
  * AttachmentUtils.
  */
 public class AttachmentConfigEventHandler extends EntityPersistenceEventObserver {
-  private static final Logger logger = LoggerFactory.getLogger(AttachmentConfigEventHandler.class);
+  private static final Logger logger = LogManager.getLogger();
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       AttachmentConfig.ENTITY_NAME) };
@@ -115,8 +115,9 @@
       return;
     }
     final OBQuery<AttachmentConfig> attachmentConfigQuery = OBDal.getInstance().createQuery(
-        AttachmentConfig.class, "id!=:id");
+        AttachmentConfig.class, "id!=:id and client.id=:clientId");
     attachmentConfigQuery.setNamedParameter("id", newAttachmentConfig.getId());
+    attachmentConfigQuery.setNamedParameter("clientId", newAttachmentConfig.getClient().getId());
     // Ensure that filtering by client and active is done.
     attachmentConfigQuery.setFilterOnReadableClients(true);
     attachmentConfigQuery.setFilterOnActive(true);
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentWindowComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/AttachmentWindowComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2016 Openbravo SLU
+ * All portions are Copyright (C) 2012-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -29,7 +29,6 @@
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.client.application.Parameter;
-import org.openbravo.client.application.window.ApplicationDictionaryCachedStructures;
 import org.openbravo.client.application.window.OBViewParameterHandler;
 import org.openbravo.client.kernel.BaseTemplateComponent;
 import org.openbravo.client.kernel.KernelConstants;
@@ -39,15 +38,15 @@
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.model.ad.utility.AttachmentMethod;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * The component which takes care of creating a class for a tab's Attachment popup.
  */
 public class AttachmentWindowComponent extends BaseTemplateComponent {
   private static final String DEFAULT_TEMPLATE_ID = "01E447F740584E02BA4612F6BDFB900D";
-  private static final Logger log = LoggerFactory.getLogger(AttachmentWindowComponent.class);
+  private static final Logger log = LogManager.getLogger();
 
   private Boolean inDevelopment = null;
   private String uniqueString = "" + System.currentTimeMillis();
@@ -57,9 +56,6 @@
   @Inject
   private OBViewParameterHandler paramHandler;
 
-  @Inject
-  private ApplicationDictionaryCachedStructures adcs;
-
   protected Template getComponentTemplate() {
     return OBDal.getInstance().get(Template.class, DEFAULT_TEMPLATE_ID);
   }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/CoreAttachImplementation.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/CoreAttachImplementation.java	Thu Dec 27 10:43:52 2018 +0000
@@ -38,8 +38,8 @@
 import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.utility.Attachment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Default implementation of Attachment Management. This method saves the attached files in the
@@ -50,7 +50,7 @@
 @ApplicationScoped
 @ComponentProvider.Qualifier(AttachmentUtils.DEFAULT_METHOD)
 public class CoreAttachImplementation extends AttachImplementation {
-  private static final Logger log = LoggerFactory.getLogger(CoreAttachImplementation.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   public void uploadFile(Attachment attachment, String dataType, Map<String, Object> parameters,
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/DefaultsAttachmentActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/DefaultsAttachmentActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -39,8 +39,8 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.OBDateUtils;
 import org.openbravo.model.ad.utility.Attachment;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This ActionHandler is invoked when opening a Attachment window. It is in charge of computing
@@ -48,7 +48,7 @@
  */
 public class DefaultsAttachmentActionHandler extends BaseActionHandler {
 
-  private static final Logger log = LoggerFactory.getLogger(DefaultsAttachmentActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   @Inject
   private ApplicationDictionaryCachedStructures adcs;
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/AcctSchemaEventHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,7 +25,8 @@
 
 import javax.enterprise.event.Observes;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.ScrollMode;
 import org.hibernate.ScrollableResults;
 import org.hibernate.criterion.Restrictions;
@@ -48,7 +49,7 @@
 
   private static Entity[] entities = { ModelProvider.getInstance()
       .getEntity(AcctSchema.ENTITY_NAME) };
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
 
   @Override
   protected Entity[] getObservedEntities() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/BusinessPartnerBankAccountHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/BusinessPartnerBankAccountHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 import javax.enterprise.event.Observes;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
@@ -42,7 +43,7 @@
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       BankAccount.ENTITY_NAME) };
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
 
   @Override
   protected Entity[] getObservedEntities() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/DataPoolSelectionEventHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/DataPoolSelectionEventHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import javax.enterprise.event.Observes;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.resource.transaction.spi.TransactionStatus;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -42,7 +43,7 @@
  */
 public class DataPoolSelectionEventHandler extends EntityPersistenceEventObserver {
 
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       DataPoolSelection.class) };
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ElementValueEventHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ElementValueEventHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -26,7 +26,8 @@
 import javax.enterprise.event.Observes;
 
 import org.apache.commons.lang.ArrayUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Order;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.model.Entity;
@@ -47,7 +48,7 @@
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       ElementValue.ENTITY_NAME) };
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
 
   @Override
   protected Entity[] getObservedEntities() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/GeneralLedgerOrganizationHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/GeneralLedgerOrganizationHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -24,7 +24,8 @@
 
 import javax.enterprise.event.Observes;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -42,7 +43,7 @@
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       Organization.ENTITY_NAME) };
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
 
   @Override
   protected Entity[] getObservedEntities() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -23,7 +23,8 @@
 
 import javax.enterprise.event.Observes;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -42,7 +43,7 @@
  */
 public class LocationSettingsHandler extends EntityPersistenceEventObserver {
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(Country.ENTITY_NAME) };
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
 
   @Override
   protected Entity[] getObservedEntities() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/NoteEventHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/NoteEventHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -39,8 +39,8 @@
 import org.openbravo.erpCommon.utility.WindowAccessData;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.service.db.DalConnectionProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Checks if the Role has access to add notes for a particular tab
@@ -48,7 +48,7 @@
  * @author shankar balachandran
  */
 public class NoteEventHandler extends EntityPersistenceEventObserver {
-  private static Logger log = LoggerFactory.getLogger(NoteEventHandler.class);
+  private static Logger log = LogManager.getLogger();
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(Note.ENTITY_NAME) };
 
   @Override
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/OpenClosePeriodHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/OpenClosePeriodHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -20,7 +20,8 @@
 
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -44,7 +45,7 @@
 import org.openbravo.service.db.DbUtility;
 
 public class OpenClosePeriodHandler extends BaseActionHandler {
-  private static final Logger log4j = Logger.getLogger(OpenClosePeriodHandler.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ReorderCascadingChildDeletionsHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ReorderCascadingChildDeletionsHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -23,7 +23,8 @@
 
 import javax.enterprise.event.Observes;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -50,7 +51,7 @@
  * @author shuehner
  */
 public class ReorderCascadingChildDeletionsHandler extends EntityPersistenceEventObserver {
-  private static final Logger log = Logger.getLogger(ReorderCascadingChildDeletionsHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static final String ORDER_TABLE_ID = "259";
   private static final String INVOICE_TABLE_ID = "318";
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TreeTablesEventHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/TreeTablesEventHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -44,8 +44,8 @@
 import org.openbravo.model.ad.utility.TableTree;
 import org.openbravo.service.datasource.DataSourceService;
 import org.openbravo.service.datasource.DataSourceServiceProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This event handler listens to events that are fired in all the tables with the flag isTree
@@ -63,7 +63,7 @@
   private static final String TREENODE_STRUCTURE = "ADTree";
   private static final String LINKTOPARENT_STRUCTURE = "LinkToParent";
   private static final String CUSTOM_STRUCTURE = "Custom";
-  private static Logger logger = LoggerFactory.getLogger(TreeTablesEventHandler.class);
+  private static Logger logger = LogManager.getLogger();
 
   @Inject
   private DataSourceServiceProvider dataSourceServiceProvider;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -38,8 +38,8 @@
 import org.openbravo.model.common.plm.ProductCharacteristic;
 import org.openbravo.model.common.plm.ProductCharacteristicValue;
 import org.openbravo.service.db.DbUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Process in charge of updating the product characteristics
@@ -55,8 +55,7 @@
  * 
  */
 public class UpdateInvariantCharacteristicsHandler extends BaseActionHandler {
-  final static private Logger log = LoggerFactory
-      .getLogger(UpdateInvariantCharacteristicsHandler.class);
+  final static private Logger log = LogManager.getLogger();
   private static final String NO_SUBSET = "-1";
 
   @Override
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UsageAuditHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UsageAuditHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 
 import javax.enterprise.event.Observes;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
@@ -42,7 +43,7 @@
       SYSTEM_INFO_TABLE_ID) };
   private static final Property usageAuditProperty = entities[0]
       .getProperty(SystemInformation.PROPERTY_ISUSAGEAUDITENABLED);
-  private static final Logger log = Logger.getLogger(UsageAuditHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   public void onUpdate(@Observes EntityUpdateEvent event) {
     if (!isValidEvent(event)) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/WindowPersonalizationEventHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/WindowPersonalizationEventHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -23,7 +23,8 @@
 
 import javax.enterprise.event.Observes;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
@@ -46,7 +47,7 @@
 
   private static Entity[] entities = { ModelProvider.getInstance().getEntity(
       UIPersonalization.ENTITY_NAME) };
-  protected Logger logger = Logger.getLogger(this.getClass());
+  protected Logger logger = LogManager.getLogger();
 
   @Override
   protected Entity[] getObservedEntities() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/logmanagement/LogDatasource.java	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,270 @@
+/*
+ *************************************************************************
+ * 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) 2018 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.client.application.logmanagement;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.Logger;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.spi.AbstractLogger;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.client.kernel.reference.UIDefinition;
+import org.openbravo.client.kernel.reference.UIDefinitionController;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.domain.Reference;
+import org.openbravo.service.datasource.DataSourceProperty;
+import org.openbravo.service.datasource.ReadOnlyDataSourceService;
+import org.openbravo.service.json.JsonUtils;
+
+/**
+ * This datasource retrieves a list of registered Loggers and their corresponding log level
+ */
+public class LogDatasource extends ReadOnlyDataSourceService {
+  private static final org.apache.logging.log4j.Logger log = LogManager.getLogger();
+
+  private static final String LOG_LEVEL_LIST_REFERENCE_ID = "CF8CB8C4E798423081CE42078CA6BD7C";
+  private static final String STRING_REFERENCE_ID = "10";
+
+  @Override
+  protected int getCount(Map<String, String> parameters) {
+    return (int) getFilteredStream(parameters).count();
+  }
+
+  @Override
+  protected List<Map<String, Object>> getData(Map<String, String> parameters, int startRow,
+      int endRow) {
+    int rowsToFetch = endRow - startRow + 1;
+    return getFilteredStream(parameters) //
+        .sorted(getComparatorToSort(parameters)) //
+        .skip(startRow) //
+        .limit(rowsToFetch) //
+        .map(l -> {
+          Map<String, Object> r = new HashMap<>(3);
+          r.put("id", l.getName());
+          r.put("logger", l.getName());
+          r.put("level", l.getLevel().toString());
+          return r;
+        }) //
+        .collect(Collectors.toList());
+  }
+
+  private Comparator<Logger> getComparatorToSort(Map<String, String> parameters) {
+    String sortKey = parameters.containsKey("_sortBy") ? parameters.get("_sortBy") : "logger";
+    boolean reversed = sortKey.startsWith("-");
+    if (reversed) {
+      sortKey = sortKey.substring(1);
+    }
+
+    Comparator<Logger> comparator = getComparatorForSortKey(sortKey);
+    if (reversed) {
+      comparator = comparator.reversed();
+    }
+    return comparator;
+  }
+
+  private Comparator<Logger> getComparatorForSortKey(String sortKey) {
+    switch (sortKey) {
+    case "logger":
+      return Comparator.comparing(AbstractLogger::getName);
+    case "level":
+      return Comparator.comparing(Logger::getLevel);
+    default:
+      throw new IllegalArgumentException("Unkown field to sort " + sortKey);
+    }
+  }
+
+  private Stream<Logger> getFilteredStream(Map<String, String> parameters) {
+    Optional<JSONArray> criteria = getCriteria(parameters);
+    String operator = parameters.get("operator");
+
+    LoggerContext lm = (LoggerContext) LogManager.getContext(false);
+
+    return lm.getLoggers() //
+        .stream() //
+        .filter(r -> filterRow(r, criteria, operator));
+
+  }
+
+  private Optional<JSONArray> getCriteria(Map<String, String> parameters) {
+    if (parameters.containsKey("criteria")) {
+      try {
+        return Optional.of((JSONArray) JsonUtils.buildCriteria(parameters).get("criteria"));
+      } catch (JSONException e) {
+        log.error("Failed to build criteria from parameters", e);
+      }
+    }
+    return Optional.empty();
+  }
+
+  private static Optional<JSONArray> getCriteria(JSONObject criterion) {
+    if (criterion.has("criteria")) {
+      try {
+        return Optional.of(criterion.getJSONArray("criteria"));
+      } catch (JSONException e) {
+        log.error("Failed to build criteria from criterion", e);
+      }
+    }
+    return Optional.empty();
+  }
+
+  private static boolean filterRow(Logger r, Optional<JSONArray> criteria, String criteriaOperator) {
+    if (!criteria.isPresent()) {
+      return true;
+    }
+
+    boolean meetsCriteria = criteriaOperator.equals("and");
+
+    JSONArray criteriaArray = criteria.get();
+    try {
+      for (int i = 0; i < criteriaArray.length(); i++) {
+        JSONObject criterion = criteriaArray.getJSONObject(i);
+        meetsCriteria = applyOperator(meetsCriteria, loggerMeetsCriterion(r, criterion),
+            criteriaOperator);
+      }
+    } catch (JSONException e) {
+      log.error("Error matching criteria", e);
+    }
+
+    return meetsCriteria;
+  }
+
+  private static boolean applyOperator(boolean firstOperand, boolean secondOperand, String operation) {
+    if (operation.equals("or")) {
+      return firstOperand || secondOperand;
+    }
+
+    return firstOperand && secondOperand;
+  }
+
+  private static boolean loggerMeetsCriterion(Logger r, JSONObject criterion) throws JSONException {
+    String operator = criterion.getString("operator");
+    if (operator.equals("equals") || operator.equals("iContains")) {
+      String field = criterion.getString("fieldName");
+      String value = criterion.getString("value").toLowerCase();
+
+      switch (field) {
+      case "id":
+      case "logger":
+        return matchStrings(r.getName().toLowerCase(), value, operator);
+      case "level":
+        List<String> values = convertJsonArrayToStringList(new JSONArray(value));
+        return values.contains(r.getLevel().toString().toLowerCase());
+      default:
+        return true;
+      }
+    } else if (operator.equals("and") || operator.equals("or")) {
+      return filterRow(r, getCriteria(criterion), operator);
+    }
+
+    return true;
+  }
+
+  private static boolean matchStrings(String firstOperand, String secondOperand, String operator) {
+    if (operator.equals("equals")) {
+      return firstOperand.equals(secondOperand);
+    }
+
+    return firstOperand.contains(secondOperand);
+  }
+
+  private static List<String> convertJsonArrayToStringList(JSONArray array) {
+    List<String> result = new ArrayList<>();
+    try {
+      for (int i = 0; i < array.length(); i++) {
+        result.add(array.getString(i));
+      }
+    } catch (JSONException e) {
+      log.error("Failed to convert JSONArray to a list of strings", e);
+    }
+
+    return result;
+  }
+
+  /**
+   * Sets the DataSourceProperty to give the client extra info in order to display/filter the fields
+   * correctly.
+   * 
+   * @param parameters
+   *          The parameters passed to the Datasource
+   * @return A list of DataSourceProperty for each field displayed in the client
+   */
+  @Override
+  public List<DataSourceProperty> getDataSourceProperties(Map<String, Object> parameters) {
+    List<DataSourceProperty> dataSourceProperties = new ArrayList<>();
+    dataSourceProperties.add(getIdProperty());
+    dataSourceProperties.add(getLoggerProperty());
+    dataSourceProperties.add(getLevelProperty());
+
+    return dataSourceProperties;
+  }
+
+  private DataSourceProperty getLoggerProperty() {
+    final DataSourceProperty dsProperty = new DataSourceProperty();
+    dsProperty.setName("logger");
+
+    Reference loggerReference = OBDal.getInstance().get(Reference.class, STRING_REFERENCE_ID);
+    UIDefinition stringUiDefinition = UIDefinitionController.getInstance().getUIDefinition(
+        loggerReference);
+    dsProperty.setUIDefinition(stringUiDefinition);
+
+    return dsProperty;
+  }
+
+  private DataSourceProperty getIdProperty() {
+    final DataSourceProperty dsProperty = new DataSourceProperty();
+    dsProperty.setName("id");
+    dsProperty.setId(true);
+
+    Reference loggerReference = OBDal.getInstance().get(Reference.class, STRING_REFERENCE_ID);
+    UIDefinition stringUiDefinition = UIDefinitionController.getInstance().getUIDefinition(
+        loggerReference);
+    dsProperty.setUIDefinition(stringUiDefinition);
+
+    return dsProperty;
+  }
+
+  private DataSourceProperty getLevelProperty() {
+    final DataSourceProperty dsProperty = new DataSourceProperty();
+    dsProperty.setName("level");
+
+    Reference logLevelReference = OBDal.getInstance().get(Reference.class,
+        LOG_LEVEL_LIST_REFERENCE_ID);
+    UIDefinition uiDefinition = UIDefinitionController.getInstance().getUIDefinition(
+        logLevelReference);
+    dsProperty.setUIDefinition(uiDefinition);
+
+    Set<String> allowedValues = DataSourceProperty.getAllowedValues(logLevelReference);
+    dsProperty.setAllowedValues(allowedValues);
+    dsProperty.setValueMap(DataSourceProperty.createValueMap(allowedValues,
+        LOG_LEVEL_LIST_REFERENCE_ID));
+
+    return dsProperty;
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/logmanagement/LogManagementActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,103 @@
+/*
+ *************************************************************************
+ * 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) 2018 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.client.application.logmanagement;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.config.Configuration;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.openbravo.client.application.process.BaseProcessActionHandler;
+import org.openbravo.client.application.process.ResponseActionsBuilder;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+
+/**
+ * Action to set the log level to one or more Loggers
+ */
+public class LogManagementActionHandler extends BaseProcessActionHandler {
+
+  private static final Logger log = LogManager.getLogger();
+
+  @Override
+  protected JSONObject doExecute(Map<String, Object> parameters, String content) {
+    try {
+      JSONObject request = new JSONObject(content);
+      JSONObject params = request.getJSONObject("_params");
+      List<String> loggersToUpdate = getLoggerToUpdateList(params.getJSONObject("loggers")
+          .getJSONArray("_selection"));
+      Level newLogLevel = Level.getLevel(params.getString("loglevel"));
+
+      updateLoggerConfiguration(loggersToUpdate, newLogLevel);
+
+      return getResponseBuilder()
+          .refreshGridParameter("loggers")
+          .showMsgInProcessView(ResponseActionsBuilder.MessageType.SUCCESS,
+              OBMessageUtils.messageBD("OBUIAPP_LogLevelChanged")) //
+          .retryExecution() //
+          .build();
+
+    } catch (JSONException e) {
+      log.error("Error in set log level process", e);
+      return getResponseBuilder().showMsgInView(ResponseActionsBuilder.MessageType.ERROR,
+          OBMessageUtils.messageBD("Error"), OBMessageUtils.messageBD("Error")).build();
+    }
+  }
+
+  private List<String> getLoggerToUpdateList(JSONArray array) {
+    List<String> result = new ArrayList<>();
+
+    for (int i = 0; i < array.length(); i++) {
+      try {
+        result.add(array.getJSONObject(i).getString("logger"));
+      } catch (JSONException e) {
+        log.error("Error getting logger name for index {}", i);
+      }
+    }
+
+    return result;
+  }
+
+  private void updateLoggerConfiguration(List<String> loggersToUpdate, Level newLogLevel) {
+    final LoggerContext context = LoggerContext.getContext(false);
+    final Configuration config = context.getConfiguration();
+
+    for (String loggerName : loggersToUpdate) {
+      LoggerConfig loggerConfig = config.getLoggerConfig(loggerName);
+
+      LoggerConfig specificConfig = loggerConfig;
+      if (!loggerConfig.getName().equals(loggerName)) {
+        specificConfig = new LoggerConfig(loggerName, newLogLevel, true);
+        specificConfig.setParent(loggerConfig);
+        config.addLogger(loggerName, specificConfig);
+      }
+      specificConfig.setLevel(newLogLevel);
+      log.info("Setting logger {} to level {}", loggerName, newLogLevel.toString());
+    }
+
+    context.updateLoggers();
+  }
+}
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -225,6 +225,9 @@
   // ugly inheriting from HttpSecureAppServlet because it provides a number of methods...
   private static class UserSessionSetter extends HttpSecureAppServlet {
     private static final long serialVersionUID = 1L;
+    private static final String TEXT_DIRECTION = "#TextDirection";
+    private static final String SESSION_ID = "#AD_Session_ID";
+    private static final String AUTHENTICATED_USER = "#Authenticated_user";
 
     private void resetSession(HttpServletRequest request, boolean isDefault, String userId,
         String roleId, String clientId, String organizationId, String languageId,
@@ -232,9 +235,9 @@
       final VariablesSecureApp vars = new VariablesSecureApp(request); // refresh
       final Language language = OBDal.getInstance().get(Language.class, languageId);
       if (language.isRTLLanguage()) {
-        vars.setSessionValue("#TextDirection", "RTL");
+        vars.setSessionValue(TEXT_DIRECTION, "RTL");
       } else {
-        vars.setSessionValue("#TextDirection", "LTR");
+        vars.setSessionValue(TEXT_DIRECTION, "LTR");
       }
 
       if (isDefault) {
@@ -259,11 +262,11 @@
       }
 
       // Clear session variables maintaining session and user
-      String sessionID = vars.getSessionValue("#AD_Session_ID");
-      String sessionUser = (String) request.getSession(true).getAttribute("#Authenticated_user");
+      String sessionID = vars.getSessionValue(SESSION_ID);
+      String sessionUser = (String) request.getSession(true).getAttribute(AUTHENTICATED_USER);
       vars.clearSession(false);
-      vars.setSessionValue("#AD_Session_ID", sessionID);
-      request.getSession(true).setAttribute("#Authenticated_user", sessionUser);
+      vars.setSessionValue(SESSION_ID, sessionID);
+      request.getSession(true).setAttribute(AUTHENTICATED_USER, sessionUser);
 
       OBDal.getInstance().flush();
       boolean result = LoginUtils
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/personalization/PersonalizationHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -47,8 +47,8 @@
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.model.common.enterprise.Organization;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Handles personalization settings, stores them and retrieves them, taking into account priority
@@ -56,7 +56,7 @@
  */
 @RequestScoped
 public class PersonalizationHandler {
-  private static final Logger log = LoggerFactory.getLogger(PersonalizationHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   /**
    * Returns all the personalization settings in an object keyed by tabid. The current client, org,
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+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.hibernate.criterion.Restrictions;
@@ -48,7 +49,7 @@
  */
 public abstract class BaseProcessActionHandler extends BaseActionHandler {
 
-  private static final Logger log = Logger.getLogger(BaseProcessActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static final String GRID_REFERENCE_ID = "FF80818132D8F0F30132D9BC395D0038";
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/DefaultsProcessActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/DefaultsProcessActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,7 +25,8 @@
 import javax.servlet.http.HttpSession;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+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.model.Entity;
@@ -53,7 +54,7 @@
  */
 public class DefaultsProcessActionHandler extends BaseProcessActionHandler {
 
-  private static final Logger log = Logger.getLogger(DefaultsProcessActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String WINDOW_REFERENCE_ID = "FF80818132D8F0F30132D9BC395D0038";
 
   @Override
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/ResponseActionsBuilder.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/ResponseActionsBuilder.java	Thu Dec 27 10:43:52 2018 +0000
@@ -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) 2017 Openbravo SLU
+ * All portions are Copyright (C) 2017-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -21,15 +21,15 @@
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This class is a helper that can be used to build the standard response actions of a
  * {@link BaseProcessActionHandler} in an easy way.
  */
 public class ResponseActionsBuilder {
-  private static final Logger log = LoggerFactory.getLogger(ResponseActionsBuilder.class);
+  private static final Logger log = LogManager.getLogger();
 
   private JSONArray responseActions;
   private JSONObject retryExecutionMsg;
@@ -266,7 +266,33 @@
     try {
       retryExecution = true;
       retryExecutionMsg = new JSONObject();
-      retryExecutionMsg.put("msgType", msgType.getType());
+      retryExecutionMsg.put("severity", msgType.getType());
+      retryExecutionMsg.put("text", msgText);
+    } catch (JSONException ignore) {
+    }
+    return this;
+  }
+
+  /**
+   * Allows to re-execute the process again, by enabling the process UI. This is useful to do
+   * backend validations as this allows the user to fix data and resubmit again. In addition, a
+   * message will be displayed with the severity, title and text specified with the parameters of
+   * this method.
+   *
+   * @param msgType
+   *          The message type.
+   * @param msgTitle
+   *          The title of the message.
+   * @param msgText
+   *          The text of the message.
+   * @return a ResponseActionsBuilder configured to retry the process execution.
+   */
+  public ResponseActionsBuilder retryExecution(MessageType msgType, String msgTitle, String msgText) {
+    try {
+      retryExecution = true;
+      retryExecutionMsg = new JSONObject();
+      retryExecutionMsg.put("severity", msgType.getType());
+      retryExecutionMsg.put("title", msgTitle);
       retryExecutionMsg.put("text", msgText);
     } catch (JSONException ignore) {
     }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/BaseReportActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/BaseReportActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -72,8 +72,8 @@
 import org.openbravo.service.db.DbUtility;
 import org.openbravo.userinterface.selector.reference.FKMultiSelectorUIDefinition;
 import org.openbravo.utils.FileUtility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 import net.sf.jasperreports.engine.JRDataSource;
 
@@ -83,7 +83,7 @@
  * 
  */
 public class BaseReportActionHandler extends BaseProcessActionHandler {
-  private static final Logger log = LoggerFactory.getLogger(BaseReportActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String JASPER_PARAM_PROCESS = "jasper_process";
   protected static final String JASPER_REPORT_PARAMETERS = "JASPER_REPORT_PARAMETERS";
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/CompiledReportManager.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/CompiledReportManager.java	Thu Dec 27 10:43:52 2018 +0000
@@ -28,8 +28,8 @@
 import org.openbravo.client.application.window.ApplicationDictionaryCachedStructures;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.service.db.DalConnectionProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 import net.sf.jasperreports.engine.JRException;
 import net.sf.jasperreports.engine.JasperReport;
@@ -39,7 +39,7 @@
  * cache, avoiding unnecessary compilations when the same report is generated multiple times.
  */
 class CompiledReportManager {
-  private static final Logger log = LoggerFactory.getLogger(CompiledReportManager.class);
+  private static final Logger log = LogManager.getLogger();
   private static CompiledReportManager instance = new CompiledReportManager();
 
   private ConcurrentHashMap<String, CompiledReport> compiledReports;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportCompiler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportCompiler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -31,8 +31,8 @@
 import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.uiTranslation.TranslationHandler;
 import org.openbravo.utils.Replace;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 import net.sf.jasperreports.engine.JRException;
 import net.sf.jasperreports.engine.JasperCompileManager;
@@ -46,7 +46,7 @@
  * passed as parameters within the report design.
  */
 class ReportCompiler {
-  private static final Logger log = LoggerFactory.getLogger(ReportCompiler.class);
+  private static final Logger log = LogManager.getLogger();
 
   // connection provider used to retrieve the translated texts
   private ConnectionProvider connectionProvider;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportFiller.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportFiller.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,8 +25,8 @@
 import org.openbravo.base.exception.OBException;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 import net.sf.jasperreports.engine.JRDataSource;
 import net.sf.jasperreports.engine.JRException;
@@ -38,7 +38,7 @@
  * This class is used to fill the data of the reports.
  */
 class ReportFiller {
-  private static final Logger log = LoggerFactory.getLogger(ReportFiller.class);
+  private static final Logger log = LogManager.getLogger();
 
   // main report file path
   private String templatePath;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportSemaphoreHandling.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportSemaphoreHandling.java	Thu Dec 27 10:43:52 2018 +0000
@@ -26,8 +26,8 @@
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.erpCommon.utility.PropertyConflictException;
 import org.openbravo.erpCommon.utility.PropertyException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * A class which can be used to limit the number of parallel processes running. If no semaphore is
@@ -58,7 +58,7 @@
   private static int DEFAULT_MAX_THREADS = 3;
   private static int maxThreads;
 
-  private static final Logger log = LoggerFactory.getLogger(ReportSemaphoreHandling.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static ReportSemaphoreHandling instance;
   private Semaphore semaphore;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/report/ReportingUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -45,8 +45,8 @@
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.erpCommon.utility.StringCollectionUtils;
 import org.openbravo.model.ad.utility.FileType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 import net.sf.jasperreports.engine.JRDataSource;
 import net.sf.jasperreports.engine.JRException;
@@ -101,7 +101,7 @@
 
   private static final float TEXT_CHAR_HEIGHT = 10;
   private static final float TEXT_CHAR_WIDTH = 10;
-  private static final Logger log = LoggerFactory.getLogger(ReportingUtils.class);
+  private static final Logger log = LogManager.getLogger();
   private static CompiledReportManager compiledReportManager = CompiledReportManager.getInstance();
 
   /**
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ApplicationDictionaryCachedStructures.java	Thu Dec 27 10:43:52 2018 +0000
@@ -19,11 +19,13 @@
 package org.openbravo.client.application.window;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
 
 import javax.annotation.PostConstruct;
 import javax.enterprise.context.ApplicationScoped;
@@ -45,12 +47,13 @@
 import org.openbravo.model.ad.module.Module;
 import org.openbravo.model.ad.ui.AuxiliaryInput;
 import org.openbravo.model.ad.ui.Field;
+import org.openbravo.model.ad.ui.Process;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.userinterface.selector.Selector;
 import org.openbravo.userinterface.selector.SelectorField;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This class caches some AD structures used by the Form Initialization component. Basically, it
@@ -60,8 +63,7 @@
  */
 @ApplicationScoped
 public class ApplicationDictionaryCachedStructures {
-  private static final Logger log = LoggerFactory
-      .getLogger(ApplicationDictionaryCachedStructures.class);
+  private static final Logger log = LogManager.getLogger();
 
   private Map<String, Window> windowMap;
   private Map<String, Tab> tabMap;
@@ -204,6 +206,11 @@
       }
 
       Window window = OBDal.getInstance().get(Window.class, windowId);
+      if (window == null) {
+        return;
+      }
+
+      initializeDALObject(window.getModule());
       for (Tab tab : window.getADTabList()) {
         initializeTab(tab);
       }
@@ -231,6 +238,8 @@
     getFieldsOfTab(tab);
     initializeDALObject(tab.getTable());
     getColumnsOfTable(tab.getTable().getId());
+    initializeProcess(tab.getProcess());
+    initializeDALObject(tab.getTableTree());
 
     if (useCache()) {
       tabMap.put(tabId, tab);
@@ -245,6 +254,7 @@
     Table table = OBDal.getInstance().get(Table.class, tableId);
     initializeDALObject(table);
     initializeDALObject(table.getADColumnList());
+    initializeDALObject(table.getObserdsDatasource());
     if (useCache()) {
       tableMap.put(tableId, table);
     }
@@ -263,10 +273,11 @@
     String tableId = tab.getTable().getId();
     List<Field> fields = tab.getADFieldList();
     for (Field f : fields) {
+      initializeDALObject(f.getFieldGroup());
+
       if (f.getColumn() == null) {
         continue;
       }
-      initializeDALObject(f.getColumn());
       initializeColumn(f.getColumn());
 
       // Property fields can link to columns in a different table than tab's one, in this case
@@ -297,6 +308,7 @@
   }
 
   private void initializeColumn(Column c) {
+    initializeDALObject(c);
     initializeDALObject(c.getValidation());
     if (c.getValidation() != null) {
       initializeDALObject(c.getValidation().getValidationCode());
@@ -316,12 +328,31 @@
     if (c.getReferenceSearchKey() != null) {
       initializeReference(c.getReferenceSearchKey());
     }
+
+    initializeDALObject(c.getOBUIAPPProcess());
+    initializeProcess(c.getProcess());
+
+  }
+
+  private void initializeProcess(Process p) {
+    if (p == null) {
+      return;
+    }
+    initializeDALObject(p);
+    initializeDALObject(p.getModule());
+    initializeDALObject(p.getADModelImplementationList());
+    p.getADModelImplementationList().stream()
+        //
+        .filter(ModelImplementation::isDefault)
+        .forEach(m -> initializeDALObject(m.getADModelImplementationMappingList()));
+
   }
 
   private void initializeReference(Reference reference) {
     initializeDALObject(reference.getADReferencedTableList());
     for (ReferencedTable t : reference.getADReferencedTableList()) {
       initializeDALObject(t);
+      initializeDALObject(t.getDisplayedColumn().getTable());
     }
 
     initializeDALObject(reference.getOBUISELSelectorList());
@@ -343,6 +374,13 @@
       initializeDALObject(list);
     }
     initializeDALObject(reference.getOBUIAPPRefWindowList());
+
+    for (ReferencedTree refTree : reference.getADReferencedTreeList()) {
+      initializeDALObject(refTree);
+      for (ReferencedTreeField refTreeField : refTree.getADReferencedTreeFieldList()) {
+        initializeDALObject(refTreeField);
+      }
+    }
   }
 
   public List<AuxiliaryInput> getAuxiliarInputList(String tabId) {
@@ -496,4 +534,10 @@
             "update " + Module.ENTITY_NAME + " set " + Module.PROPERTY_INDEVELOPMENT + " = false")
         .executeUpdate();
   }
+
+  Collection<String> getCachedWindows() {
+    return windowMap.values().stream() //
+        .map(Window::toString) //
+        .collect(Collectors.toList());
+  }
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -35,7 +35,8 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -105,7 +106,7 @@
  * placed in the request/session for subsequent callout computations.
  */
 public class FormInitializationComponent extends BaseActionHandler {
-  private static final Logger log = Logger.getLogger(FormInitializationComponent.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static final int MAX_CALLOUT_CALLS = 50;
 
@@ -1371,8 +1372,9 @@
   }
 
   private void setSessionValue(String key, Object value) {
-    log.debug("Setting session value. Key: " + key + "  Value:" + value);
-    RequestContext.get().setSessionAttribute(key, value);
+    log.debug("Setting session value. Key: " + key + "  Value:" + value + " - type "
+        + (value != null ? value.getClass() : null));
+    RequestContext.get().setSessionAttribute(key, value != null ? value.toString() : null);
   }
 
   private void setRequestContextParameter(Field field, JSONObject jsonObj) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/GetTabMessageActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/GetTabMessageActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.client.kernel.BaseActionHandler;
 import org.openbravo.client.kernel.RequestContext;
@@ -34,7 +35,7 @@
  */
 @ApplicationScoped
 public class GetTabMessageActionHandler extends BaseActionHandler {
-  private static final Logger log = Logger.getLogger(GetTabMessageActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ImagesActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ImagesActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -20,7 +20,8 @@
 
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -49,7 +50,7 @@
  */
 public class ImagesActionHandler extends BaseActionHandler implements PortalAccessible {
 
-  private static final Logger log = Logger.getLogger(ImagesActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/JmxApplicationDictionaryCachedStructures.java	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,50 @@
+/*
+ *************************************************************************
+ * 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) 2018 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.client.application.window;
+
+import java.util.Collection;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+
+/** Exposes {@link ApplicationDictionaryCachedStructures} as a JMX Bean. */
+@ApplicationScoped
+public class JmxApplicationDictionaryCachedStructures implements
+    JmxApplicationDictionaryCachedStructuresMBean {
+  public static final String MBEAN_NAME = "ApplicationDictionaryCachedStructures";
+
+  @Inject
+  private ApplicationDictionaryCachedStructures adcs;
+
+  @Override
+  public void resetCache() {
+    adcs.init();
+  }
+
+  @Override
+  public boolean isEnabled() {
+    return adcs.useCache();
+  }
+
+  @Override
+  public Collection<String> getCachedWindows() {
+    return adcs.getCachedWindows();
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/JmxApplicationDictionaryCachedStructuresMBean.java	Thu Dec 27 10:43:52 2018 +0000
@@ -0,0 +1,38 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2018 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.client.application.window;
+
+import java.util.Collection;
+
+/** Defines bean to expose {@link ApplicationDictionaryCachedStructures} as a JMX Bean. */
+public interface JmxApplicationDictionaryCachedStructuresMBean {
+
+  /** Resets cache removing anything it might contain. */
+  void resetCache();
+
+  /**
+   * Whether ADCS is enabled. ADCS is enabled when it was initialized without modules in
+   * development.
+   */
+  boolean isEnabled();
+
+  /** Lists Windows cached in ADCS. */
+  Collection<String> getCachedWindows();
+}
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBTreeReferenceComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBTreeReferenceComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -60,8 +60,8 @@
 import org.openbravo.service.datasource.DataSourceProperty;
 import org.openbravo.service.datasource.DataSourceProperty.RefListEntry;
 import org.openbravo.service.json.JsonConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * The backing bean for generating the OBTreeReference client-side representation.
@@ -81,7 +81,7 @@
   private ReferencedTree referencedTree;
   private List<ReferencedTreeField> treeFields;
 
-  private static Logger log = LoggerFactory.getLogger(OBTreeReferenceComponent.class);
+  private static Logger log = LogManager.getLogger();
 
   @Override
   protected Template getComponentTemplate() {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -26,12 +26,14 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 import java.util.Set;
 
 import javax.script.ScriptException;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+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.expression.OBScriptEngine;
@@ -41,6 +43,8 @@
 import org.openbravo.base.model.domaintype.ForeignKeyDomainType;
 import org.openbravo.client.application.ApplicationUtils;
 import org.openbravo.client.application.DynamicExpressionParser;
+import org.openbravo.client.application.GCSystem;
+import org.openbravo.client.application.GCTab;
 import org.openbravo.client.kernel.KernelUtils;
 import org.openbravo.client.kernel.reference.FKSearchUIDefinition;
 import org.openbravo.client.kernel.reference.StringUIDefinition;
@@ -63,7 +67,7 @@
 
 public class OBViewFieldHandler {
 
-  private static Logger log = Logger.getLogger(OBViewFieldHandler.class);
+  private static Logger log = LogManager.getLogger();
 
   private String parentProperty;
 
@@ -86,6 +90,9 @@
 
   private List<Field> ignoredFields = new ArrayList<Field>();
 
+  private Optional<GCSystem> systemGridConfig;
+  private Map<String, Optional<GCTab>> tabsGridConfig;
+
   public Tab getTab() {
     return tab;
   }
@@ -229,19 +236,19 @@
     }
     List<OBViewFieldDefinition> auditFields = new ArrayList<OBViewFieldDefinition>();
     if (!hasCreatedField) {
-      OBViewFieldAudit audit = new OBViewFieldAudit("creationDate", OBViewUtil.createdElement, tab);
+      OBViewFieldAudit audit = new OBViewFieldAudit("creationDate", OBViewUtil.createdElement);
       auditFields.add(audit);
     }
     if (!hasCreatedByField) {
-      OBViewFieldAudit audit = new OBViewFieldAudit("createdBy", OBViewUtil.createdByElement, tab);
+      OBViewFieldAudit audit = new OBViewFieldAudit("createdBy", OBViewUtil.createdByElement);
       auditFields.add(audit);
     }
     if (!hasUpdatedField) {
-      OBViewFieldAudit audit = new OBViewFieldAudit("updated", OBViewUtil.updatedElement, tab);
+      OBViewFieldAudit audit = new OBViewFieldAudit("updated", OBViewUtil.updatedElement);
       auditFields.add(audit);
     }
     if (!hasUpdatedByField) {
-      OBViewFieldAudit audit = new OBViewFieldAudit("updatedBy", OBViewUtil.updatedByElement, tab);
+      OBViewFieldAudit audit = new OBViewFieldAudit("updatedBy", OBViewUtil.updatedByElement);
       auditFields.add(audit);
     }
 
@@ -641,8 +648,6 @@
     private String refType;
     private String refEntity;
     private Element element;
-    private Tab auditTab;
-    JSONObject gridConfiguration;
 
     public String getOnChangeFunction() {
       return null;
@@ -678,14 +683,9 @@
     }
 
     public OBViewFieldAudit(String type, Element element) {
-      this(type, element, null);
-    }
-
-    public OBViewFieldAudit(String type, Element element, Tab tab) {
       // force reload of element as if it was previously loaded but its children were not touched,
       // lazy initialization fails
       this.element = OBDal.getInstance().get(Element.class, element.getId());
-      this.auditTab = tab;
       name = type;
       if (type.endsWith("By")) {
         // User search
@@ -699,29 +699,26 @@
     }
 
     public String getGridFieldProperties() {
-      StringBuffer result = new StringBuffer();
+      StringBuilder result = new StringBuilder();
       if (SEARCH_REFERENCE.equals(refType)) {
         result.append(", fkField: true");
       }
-      if (this.gridConfiguration != null) {
-        Boolean canSort = null;
-        Boolean canFilter = null;
+
+      if (tab != null) {
+        JSONObject gridConfiguration = OBViewUtil.getGridConfigurationSettings(systemGridConfig,
+            getTabGridConfig());
         try {
-          if (this.gridConfiguration.has("canFilter")) {
-            canFilter = (Boolean) this.gridConfiguration.get("canFilter");
+          if (gridConfiguration.has("canFilter")) {
+            boolean canFilter = gridConfiguration.getBoolean("canFilter");
+            result.append(", canFilter: ").append(canFilter);
           }
-          if (this.gridConfiguration.has("canSort")) {
-            canSort = (Boolean) this.gridConfiguration.get("canSort");
+          if (gridConfiguration.has("canSort")) {
+            boolean canSort = gridConfiguration.getBoolean("canSort");
+            result.append(", canSort: ").append(canSort);
           }
         } catch (JSONException e) {
           log.error("Error while getting the grid field properties of an audit field", e);
         }
-        if (canSort != null) {
-          result.append(", canSort: " + canSort.toString());
-        }
-        if (canFilter != null) {
-          result.append(", canFilter: " + canFilter.toString());
-        }
       }
       result.append(", showHover: true");
       return result.toString();
@@ -789,12 +786,7 @@
 
     @Override
     public String getFieldProperties() {
-      if (tab != null) {
-        gridConfiguration = OBViewUtil.getGridConfigurationSettings(auditTab);
-        return "";
-      } else {
-        return "";
-      }
+      return "";
     }
 
     @Override
@@ -1180,6 +1172,10 @@
     }
   }
 
+  private Optional<GCTab> getTabGridConfig() {
+    return tabsGridConfig.get(tab.getId());
+  }
+
   public class OBViewField implements OBViewFieldDefinition {
     private Field field;
     private Property property;
@@ -1344,7 +1340,8 @@
 
     public String getFieldProperties() {
       // First obtain the gridConfigurationSettings which will be used in other places
-      getUIDefinition().establishGridConfigurationSettings(field);
+      getUIDefinition().establishGridConfigurationSettings(field, systemGridConfig,
+          getTabGridConfig());
 
       if (getClientClass().length() > 0) {
         return "editorType: 'OBClientClassCanvasItem', ";
@@ -2334,4 +2331,10 @@
     return (entity == null) ? false : entity.hasProperty("processed");
   }
 
+  void setGCSettings(Optional<GCSystem> systemGridConfig,
+      Map<String, Optional<GCTab>> tabsGridConfig) {
+    this.systemGridConfig = systemGridConfig;
+    this.tabsGridConfig = tabsGridConfig;
+  }
+
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -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-2017 Openbravo SLU
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,6 +22,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 import org.apache.commons.lang.StringUtils;
 import org.hibernate.criterion.Restrictions;
@@ -42,7 +43,6 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
-import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.ui.AuxiliaryInput;
@@ -73,6 +73,8 @@
   private Entity entity;
 
   private OBViewTab viewTab;
+  private Optional<GCSystem> systemGridConfig;
+  private Map<String, Optional<GCTab>> tabsGridConfig;
 
   protected Template getComponentTemplate() {
     final String windowType = tab.getWindow().getWindowType();
@@ -423,37 +425,20 @@
 
   private boolean isConfigurationPropertyEnabled(String propertyNameAtTabLevel,
       String propertyNameAtSystemLevel, boolean defaultReturnValue) {
-    Boolean propertyEnabled = null;
-
-    // Trying to get parameters from "Grid Configuration (Tab/Field)" -> "Tab" window
-    List<GCTab> tabConfs = getGridConfigurationForTab();
-    if (!tabConfs.isEmpty()) {
-      if ("Y".equals(tabConfs.get(0).get(propertyNameAtTabLevel))) {
-        propertyEnabled = true;
-      } else if ("N".equals(tabConfs.get(0).get(propertyNameAtTabLevel))) {
-        propertyEnabled = false;
+    Optional<GCTab> tabConf = tabsGridConfig.get(tab.getId());
+    if (tabConf.isPresent()) {
+      if ("Y".equals(tabConf.get().get(propertyNameAtTabLevel))) {
+        return true;
+      } else if ("N".equals(tabConf.get().get(propertyNameAtTabLevel))) {
+        return false;
       }
     }
-    if (propertyEnabled == null) {
-      // Trying to get parameters from "Grid Configuration (System)" window
-      List<GCSystem> sysConfs = OBDal.getInstance().createQuery(GCSystem.class, "").list();
-      if (!sysConfs.isEmpty()) {
-        propertyEnabled = (Boolean) sysConfs.get(0).get(propertyNameAtSystemLevel);
-      }
+
+    if (systemGridConfig.isPresent()) {
+      return (boolean) systemGridConfig.get().get(propertyNameAtSystemLevel);
     }
-    if (propertyEnabled != null) {
-      return propertyEnabled;
-    } else {
-      return defaultReturnValue;
-    }
-  }
 
-  private List<GCTab> getGridConfigurationForTab() {
-    String tabConfsHql = " as p where p.tab.id = :tabId";
-    // Trying to get parameters from "Grid Configuration (Tab/Field)" -> "Tab" window
-    OBQuery<GCTab> query = OBDal.getInstance().createQuery(GCTab.class, tabConfsHql);
-    query.setNamedParameter("tabId", tab.getId());
-    return query.list();
+    return defaultReturnValue;
   }
 
   public boolean getAlwaysFilterFksByIdentifier() {
@@ -476,4 +461,10 @@
   private boolean isDatasourceBasedTable(Table table) {
     return ApplicationConstants.DATASOURCEBASEDTABLE.equals(table.getDataOriginType());
   }
+
+  void setGCSettings(Optional<GCSystem> systemGridConfig,
+      Map<String, Optional<GCTab>> tabsGridConfig) {
+    this.systemGridConfig = systemGridConfig;
+    this.tabsGridConfig = tabsGridConfig;
+  }
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewParameterHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewParameterHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2016 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2018 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,7 +25,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.client.application.DynamicExpressionParser;
 import org.openbravo.client.application.Parameter;
@@ -34,6 +35,7 @@
 import org.openbravo.client.kernel.reference.UIDefinition;
 import org.openbravo.client.kernel.reference.UIDefinitionController;
 import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.ad.domain.ListTrl;
 import org.openbravo.model.ad.domain.Reference;
 import org.openbravo.model.ad.ui.FieldGroup;
@@ -42,7 +44,7 @@
 import org.openbravo.userinterface.selector.reference.FKSelectorUIDefinition;
 
 public class OBViewParameterHandler {
-  private static final Logger log = Logger.getLogger(OBViewParameterHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String WINDOW_REFERENCE_ID = "FF80818132D8F0F30132D9BC395D0038";
   private static final int NUMBER_COLUMNS = 4;
   private BaseTemplateComponent paramWindow;
@@ -256,24 +258,28 @@
     }
 
     public String getTabView() {
-      Window window;
+      String tabId = OBDal
+          .getInstance()
+          .getSession()
+          .createQuery(
+              "select t.id from OBUIAPP_Parameter p join p.referenceSearchKey r join r.oBUIAPPRefWindowList rw join rw.window w join w.aDTabList t where p.id=:param",
+              String.class) //
+          .setParameter("param", parameter.getId()) //
+          .setMaxResults(1) //
+          .uniqueResult();
 
-      if (parameter.getReferenceSearchKey().getOBUIAPPRefWindowList().size() == 0
-          || parameter.getReferenceSearchKey().getOBUIAPPRefWindowList().get(0).getWindow() == null) {
-        return null;
-      } else {
-        window = parameter.getReferenceSearchKey().getOBUIAPPRefWindowList().get(0).getWindow();
-      }
-
-      if (window.getADTabList().isEmpty()) {
-        log.error("Window definition " + window.getName() + " has no tabs");
+      if (tabId == null) {
+        log.error("Window definition for parameter " + parameter + " has no tabs");
         return null;
       }
 
-      Tab tab = window.getADTabList().get(0);
+      // parameters are not cached in ADCS
+      Tab tab = paramWindow.getADCS().getTab(tabId);
 
       final OBViewTab tabComponent = paramWindow.createComponent(OBViewTab.class);
       tabComponent.setTab(tab);
+      tabComponent.setGCSettings(StandardWindowComponent.getSystemGridConfig(),
+          StandardWindowComponent.getTabsGridConfig(tab.getWindow()));
       return tabComponent.generate();
     }
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2015 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,10 +26,12 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
+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.hibernate.criterion.Restrictions;
@@ -39,6 +41,8 @@
 import org.openbravo.client.application.ApplicationConstants;
 import org.openbravo.client.application.ApplicationUtils;
 import org.openbravo.client.application.DynamicExpressionParser;
+import org.openbravo.client.application.GCSystem;
+import org.openbravo.client.application.GCTab;
 import org.openbravo.client.kernel.BaseTemplateComponent;
 import org.openbravo.client.kernel.Component;
 import org.openbravo.client.kernel.ComponentProvider;
@@ -60,7 +64,6 @@
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.ui.Process;
 import org.openbravo.model.ad.ui.Tab;
-import org.openbravo.model.ad.ui.TabTrl;
 import org.openbravo.service.datasource.DataSourceComponent;
 import org.openbravo.service.datasource.DataSourceConstants;
 import org.openbravo.service.db.DalConnectionProvider;
@@ -75,7 +78,7 @@
  */
 public class OBViewTab extends BaseTemplateComponent {
 
-  private static final Logger log = Logger.getLogger(OBViewTab.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String DEFAULT_TEMPLATE_ID = "B5124C0A450D4D3A867AEAC7DF64D6F0";
   protected static final Map<String, String> TEMPLATE_MAP = new HashMap<String, String>();
 
@@ -106,6 +109,8 @@
   @Inject
   @ComponentProvider.Qualifier(DataSourceConstants.DS_COMPONENT_TYPE)
   private ComponentProvider dsComponentProvider;
+  private Map<String, Optional<GCTab>> tabsGridConfig;
+  private Optional<GCSystem> systemGridConfig;
 
   public String getDataSourceJavaScript() {
     final String dsId = getDataSourceId();
@@ -194,7 +199,7 @@
   }
 
   public String getMapping250() {
-    return Utility.getTabURL(tab.getId(), "none", false);
+    return Utility.getTabURL(tab, "none", false);
   }
 
   public List<ButtonField> getButtonFields() {
@@ -219,6 +224,13 @@
     return buttonFields;
   }
 
+  public void setGCSettings(Optional<GCSystem> systemGridConfig,
+      Map<String, Optional<GCTab>> tabsGridConfig) {
+    fieldHandler.setGCSettings(systemGridConfig, tabsGridConfig);
+    this.systemGridConfig = systemGridConfig;
+    this.tabsGridConfig = tabsGridConfig;
+  }
+
   public List<ButtonField> getAllButtonFields() {
     if (allButtonFields != null) {
       return allButtonFields;
@@ -334,9 +346,6 @@
   }
 
   public String getViewForm() {
-    // force a load all the columns of the table
-    getTab().getTable().getADColumnList().size();
-
     final OBViewFormComponent viewFormComponent = createComponent(OBViewFormComponent.class);
     viewFormComponent.setParameters(getParameters());
     viewFormComponent.setParentProperty(getParentProperty());
@@ -345,9 +354,6 @@
   }
 
   public String getViewGrid() {
-    // force a load all the columns of the table
-    getTab().getTable().getADColumnList().size();
-
     // check at least one field is visible in grid view, does not stop the execution
     OBCriteria<Field> fieldCriteria = OBDal.getInstance().createCriteria(Field.class);
     fieldCriteria.add(Restrictions.eq(Field.PROPERTY_TAB, getTab()));
@@ -363,6 +369,7 @@
     viewGridComponent.setViewTab(this);
     viewGridComponent.setApplyTransactionalFilter(isRootTab()
         && this.tab.getWindow().getWindowType().equals("T"));
+    viewGridComponent.setGCSettings(systemGridConfig, tabsGridConfig);
     return viewGridComponent.generate();
   }
 
@@ -463,18 +470,7 @@
 
   public String getTabTitle() {
     if (tabTitle == null) {
-      if (OBContext.hasTranslationInstalled()) {
-        final String userLanguageId = OBContext.getOBContext().getLanguage().getId();
-        for (TabTrl tabTrl : tab.getADTabTrlList()) {
-          final String trlLanguageId = tabTrl.getLanguage().getId();
-          if (trlLanguageId.equals(userLanguageId)) {
-            tabTitle = tabTrl.getName();
-          }
-        }
-      }
-      if (tabTitle == null) {
-        tabTitle = tab.getName();
-      }
+      tabTitle = OBViewUtil.getLabel(tab, tab.getADTabTrlList(), Tab.PROPERTY_NAME);
     }
     return tabTitle;
   }
@@ -820,7 +816,7 @@
 
         if (manualProcessMapping == null) {
           // Standard UI process
-          url = Utility.getTabURL(fld.getTab().getId(), "E", false);
+          url = Utility.getTabURL(fld.getTab(), "E", false);
           command = "BUTTON" + FormatUtilities.replace(column.getDBColumnName())
               + column.getProcess().getId();
         } else {
@@ -835,7 +831,7 @@
         String colName = column.getDBColumnName();
         if ("Posted".equalsIgnoreCase(colName) || "CreateFrom".equalsIgnoreCase(colName)) {
           command = "BUTTON" + colName;
-          url = Utility.getTabURL(fld.getTab().getId(), "E", false);
+          url = Utility.getTabURL(fld.getTab(), "E", false);
         }
       }
 
@@ -1149,4 +1145,5 @@
     }
 
   }
+
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewUtil.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewUtil.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,35 +11,35 @@
  * 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-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.client.application.window;
 
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.List;
+import java.util.Optional;
 
+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.hibernate.Hibernate;
-import org.hibernate.criterion.Order;
+import org.hibernate.collection.internal.PersistentBag;
+import org.hibernate.engine.spi.EntityKey;
+import org.hibernate.internal.SessionImpl;
+import org.hibernate.persister.entity.EntityPersister;
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.client.application.GCField;
 import org.openbravo.client.application.GCSystem;
 import org.openbravo.client.application.GCTab;
 import org.openbravo.client.application.Parameter;
 import org.openbravo.dal.core.OBContext;
-import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.ad.ui.Element;
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.ui.FieldTrl;
-import org.openbravo.model.ad.ui.Tab;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Utility methods used in generating Openbravo view representations.
@@ -74,7 +74,7 @@
     Hibernate.initialize(updatedByElement.getADElementTrlList());
   }
 
-  private static Logger log = LoggerFactory.getLogger(OBViewUtil.class);
+  private static Logger log = LogManager.getLogger();
 
   /**
    * Method for retrieving the label of a field on the basis of the current language of the user.
@@ -146,8 +146,11 @@
       String primaryPropertyName, String secondaryPropertyName) {
     if (OBContext.hasTranslationInstalled()) {
       final String userLanguageId = OBContext.getOBContext().getLanguage().getId();
-      for (Object o : trlObjects) {
-        final BaseOBObject trlObject = (BaseOBObject) o;
+
+      List<BaseOBObject> initializedTrlObjects;
+      initializedTrlObjects = getInitializedTrlObjects(owner, trlObjects);
+
+      for (BaseOBObject trlObject : initializedTrlObjects) {
         final String trlLanguageId = (String) ((BaseOBObject) trlObject
             .get(FieldTrl.PROPERTY_LANGUAGE)).getId();
         if (trlLanguageId.equals(userLanguageId)) {
@@ -166,26 +169,40 @@
     return (String) owner.get(secondaryPropertyName);
   }
 
+  @SuppressWarnings("unchecked")
+  private static List<BaseOBObject> getInitializedTrlObjects(BaseOBObject owner, List<?> trlObjects) {
+    List<BaseOBObject> initializedTrlObjects;
+    // owner could have been loaded in a different DAL session via ADCS, as we are not caching trl
+    // entries in ADCS, so we need to handle this case
+    if (!Hibernate.isInitialized(trlObjects) && !OBDal.getInstance().getSession().contains(owner)) {
+      // check if there is already a different instance for the same entry in current DAL session
+      SessionImpl si = ((SessionImpl) OBDal.getInstance().getSession());
+      EntityPersister p = si.getEntityPersister(owner.getEntityName(), owner);
+      BaseOBObject ownerInSession = (BaseOBObject) si.getPersistenceContext().getEntity(
+          new EntityKey((String) owner.getId(), p));
+
+      if (ownerInSession == null) {
+        // there is no a different instance in this session, just load it
+        ownerInSession = OBDal.getInstance().get(owner.getEntityName(), owner.getId());
+      }
+
+      String propName = ((PersistentBag) trlObjects).getRole();
+      propName = propName.substring(propName.indexOf('.') + 1);
+      initializedTrlObjects = (List<BaseOBObject>) ownerInSession.get(propName);
+    } else {
+      initializedTrlObjects = (List<BaseOBObject>) trlObjects;
+    }
+    return initializedTrlObjects;
+  }
+
   /**
    * Returns the grid configuration based on the field and tab information
    * 
-   * @param tab
-   *          tab whose grid configuration is to be obtained.
    * @return the grid configuration
    */
-  public static JSONObject getGridConfigurationSettings(Tab tab) {
-    return getGridConfigurationSettings(null, tab);
-  }
-
-  /**
-   * Returns the grid configuration of a field
-   * 
-   * @param field
-   *          field whose grid configuration is to be obtained
-   * @return the grid configuration
-   */
-  public static JSONObject getGridConfigurationSettings(Field field) {
-    return getGridConfigurationSettings(field, field.getTab());
+  public static JSONObject getGridConfigurationSettings(Optional<GCSystem> sysConf,
+      Optional<GCTab> tabConf) {
+    return getGridConfigurationSettings(null, sysConf, tabConf);
   }
 
   /**
@@ -193,75 +210,39 @@
    * 
    * @param field
    *          field whose grid configuration is to be obtained it can be null
-   * @param tab
-   *          tab whose grid configuration is to be obtained. If the field is not null, this
-   *          parameter will be the tab of the field
    * @return the grid configuration
    */
-  private static JSONObject getGridConfigurationSettings(Field field, Tab tab) {
+  public static JSONObject getGridConfigurationSettings(Field field, Optional<GCSystem> sysConf,
+      Optional<GCTab> tabConf) {
     GridConfigSettings settings = new GridConfigSettings(field);
-    int gcTabIndex = 0;
-    GCTab tabConf = null;
-    if (tab.getOBUIAPPGCTabList().size() > 1) {
-      Collections.sort(tab.getOBUIAPPGCTabList(), new GCTabComparator());
-      gcTabIndex = tab.getOBUIAPPGCTabList().size() - 1;
-      tabConf = tab.getOBUIAPPGCTabList().get(gcTabIndex);
-    } else {
-      for (GCTab t : tab.getOBUIAPPGCTabList()) {
-        tabConf = t;
-        break;
+
+    if (tabConf.isPresent()) {
+      if (field != null && field.getId() != null) {
+        // Grid Configurations at field level for this tab configuration
+        // (tabConf.getOBUIAPPGCFieldList) gets cached on Hibernate's first level cache so they can
+        // be reused for all fields without the need of reach DB again
+        Optional<GCField> fieldConf = tabConf.get().getOBUIAPPGCFieldList() //
+            .stream() //
+            .filter(fieldGC -> fieldGC.getField().getId().equals(field.getId())) //
+            .findFirst();
+        if (fieldConf.isPresent()) {
+          settings.processConfig(fieldConf.get());
+        }
+      }
+
+      if (settings.shouldContinueProcessing()) {
+        // Trying to get parameters from "Grid Configuration (Tab/Field)" -> "Tab" window
+        settings.processConfig(tabConf.get());
       }
     }
 
-    if (tabConf != null && field != null && field.getId() != null) {
-      GCField fieldConf = null;
-      for (GCField fc : tabConf.getOBUIAPPGCFieldList()) {
-        // field list is cached in memory, so can be reused for all fields without the need of reach
-        // DB again
-        if (fc.getField().getId().equals(field.getId())) {
-          fieldConf = fc;
-          break;
-        }
-      }
-
-      // Trying to get parameters from "Grid Configuration (Tab/Field)" -> "Field" window
-      if (fieldConf != null) {
-        settings.processConfig(fieldConf);
-      }
-    }
-
-    if (tabConf != null && settings.shouldContinueProcessing()) {
-      // Trying to get parameters from "Grid Configuration (Tab/Field)" -> "Tab" window
-      settings.processConfig(tabConf);
-    }
-
-    if (settings.shouldContinueProcessing()) {
-      // Trying to get parameters from "Grid Configuration (System)" window
-      OBCriteria<GCSystem> gcSystemCriteria = OBDal.getInstance().createCriteria(GCSystem.class);
-      gcSystemCriteria.addOrder(Order.desc(GCTab.PROPERTY_SEQNO));
-      gcSystemCriteria.addOrder(Order.desc(GCTab.PROPERTY_ID));
-      gcSystemCriteria.setMaxResults(1);
-      List<GCSystem> sysConfs = gcSystemCriteria.list();
-
-      if (!sysConfs.isEmpty()) {
-        settings.processConfig(sysConfs.get(0));
-      }
+    if (settings.shouldContinueProcessing() && sysConf.isPresent()) {
+      settings.processConfig(sysConf.get());
     }
 
     return settings.processJSONResult();
   }
 
-  private static class GCTabComparator implements Comparator<GCTab> {
-    @Override
-    public int compare(GCTab o1, GCTab o2) {
-      if (o1.getSeqno().compareTo(o2.getSeqno()) != 0) {
-        return o1.getSeqno().compareTo(o2.getSeqno());
-      } else {
-        return o1.getId().compareTo(o2.getId());
-      }
-    }
-  }
-
   private static class GridConfigSettings {
     private Boolean canSort = null;
     private Boolean canFilter = null;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ParameterWindowComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ParameterWindowComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -41,8 +41,8 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.ad.domain.Validation;
 import org.openbravo.model.ad.ui.Window;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * The component which takes care of creating a class for a specific paramter window.
@@ -51,7 +51,7 @@
  */
 public class ParameterWindowComponent extends BaseTemplateComponent {
   private static final String DEFAULT_TEMPLATE_ID = "FF80818132F916130132F9357DE10016";
-  private static final Logger log = LoggerFactory.getLogger(ParameterWindowComponent.class);
+  private static final Logger log = LogManager.getLogger();
 
   static final String BUTTON_LIST_REFERENCE_ID = "FF80818132F94B500132F9575619000A";
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/StandardWindowComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,24 +11,37 @@
  * 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-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.client.application.window;
 
+import static java.util.Comparator.comparing;
+import static java.util.stream.Collectors.groupingBy;
+import static java.util.stream.Collectors.toMap;
+
+import java.util.AbstractMap.SimpleEntry;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Stream;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.hibernate.criterion.Order;
+import org.openbravo.client.application.GCSystem;
+import org.openbravo.client.application.GCTab;
 import org.openbravo.client.kernel.BaseTemplateComponent;
 import org.openbravo.client.kernel.KernelConstants;
 import org.openbravo.client.kernel.Template;
+import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
 import org.openbravo.erpCommon.obps.ActivationKey;
 import org.openbravo.erpCommon.obps.ActivationKey.FeatureRestriction;
-import org.openbravo.model.ad.ui.Field;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 
@@ -38,12 +51,11 @@
  * @author mtaal
  */
 public class StandardWindowComponent extends BaseTemplateComponent {
-  private static final Logger log = Logger.getLogger(StandardWindowComponent.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String DEFAULT_TEMPLATE_ID = "ADD5EF45333C458098286D0E639B3290";
 
   private Window window;
   private OBViewTab rootTabComponent = null;
-  private Boolean inDevelopment = null;
   private String uniqueString = "" + System.currentTimeMillis();
   private List<String> processViews = new ArrayList<String>();
 
@@ -66,33 +78,7 @@
   }
 
   public boolean isIndevelopment() {
-    if (inDevelopment != null) {
-      return inDevelopment;
-    }
-
-    // check window, tabs and fields
-    inDevelopment = Boolean.FALSE;
-    if (window.getModule().isInDevelopment() && window.getModule().isEnabled()) {
-      inDevelopment = Boolean.TRUE;
-    } else {
-      for (Tab tab : window.getADTabList()) {
-        if (tab.isActive() && tab.getModule().isInDevelopment() && tab.getModule().isEnabled()) {
-          inDevelopment = Boolean.TRUE;
-          break;
-        }
-        for (Field field : tab.getADFieldList()) {
-          if (field.isActive() && field.getModule().isInDevelopment()
-              && field.getModule().isEnabled()) {
-            inDevelopment = Boolean.TRUE;
-            break;
-          }
-        }
-        if (inDevelopment) {
-          break;
-        }
-      }
-    }
-    return inDevelopment;
+    return adcs.isInDevelopment();
   }
 
   public String generate() {
@@ -122,6 +108,11 @@
 
   public void setWindow(Window window) {
     this.window = window;
+
+    // reset fields here to be able to use this code in testing: being request scoped will share
+    // instance if it is invoked several times in same test case.
+    rootTabComponent = null;
+    processViews = new ArrayList<>();
   }
 
   public OBViewTab getRootTabComponent() {
@@ -129,6 +120,9 @@
       return rootTabComponent;
     }
 
+    Optional<GCSystem> systemGridConfig = getSystemGridConfig();
+    Map<String, Optional<GCTab>> tabsGridConfig = getTabsGridConfig(window);
+
     final List<OBViewTab> tempTabs = new ArrayList<OBViewTab>();
     for (Tab tab : getWindow().getADTabList()) {
       // NOTE: grid sequence and field sequence tabs do not have any fields defined!
@@ -140,6 +134,7 @@
       final OBViewTab tabComponent = createComponent(OBViewTab.class);
       tabComponent.setTab(tab);
       tabComponent.setUniqueString(uniqueString);
+      tabComponent.setGCSettings(systemGridConfig, tabsGridConfig);
       tempTabs.add(tabComponent);
       final String processView = tabComponent.getProcessViews();
       if (!"".equals(processView)) {
@@ -200,4 +195,44 @@
   public List<String> getProcessViews() {
     return processViews;
   }
+
+  /** Returns the applicable System Grid Configuration if any. */
+  public static Optional<GCSystem> getSystemGridConfig() {
+    OBCriteria<GCSystem> gcSystemCriteria = OBDal.getInstance().createCriteria(GCSystem.class);
+    gcSystemCriteria.addOrder(Order.desc(GCTab.PROPERTY_SEQNO));
+    gcSystemCriteria.addOrder(Order.desc(GCTab.PROPERTY_ID));
+    gcSystemCriteria.setMaxResults(1);
+    return Optional.ofNullable((GCSystem) gcSystemCriteria.uniqueResult());
+  }
+
+  /**
+   * For a given window, it returns a Map being its key all the tab ids in that window and the
+   * values the applicable Tab Grid Configuration for each tab if any.
+   */
+  public static Map<String, Optional<GCTab>> getTabsGridConfig(Window window) {
+    // window comes from ADCS, we need to retrieve GC from DB as it might have changed
+    OBQuery<GCTab> qGCTab = OBDal.getInstance().createQuery(GCTab.class,
+        "as g where g.tab.window = :window");
+    qGCTab.setNamedParameter("window", window);
+    Map<String, List<GCTab>> gcsByTab = qGCTab.stream() //
+        .collect(groupingBy(gcTab -> gcTab.getTab().getId()));
+
+    return window.getADTabList().stream() //
+        .map(tab -> getTabConfig(tab, gcsByTab)) //
+        .collect(toMap(SimpleEntry::getKey, SimpleEntry::getValue));
+  }
+
+  private static SimpleEntry<String, Optional<GCTab>> getTabConfig(Tab tab,
+      Map<String, List<GCTab>> gcsByTab) {
+    Stream<GCTab> candidates = gcsByTab.containsKey(tab.getId()) ? gcsByTab.get(tab.getId())
+        .stream() : Stream.empty();
+
+    Optional<GCTab> selectedGC = candidates //
+        .sorted( //
+            comparing(GCTab::getSeqno) //
+                .thenComparing(GCTab::getId)) //
+        .findFirst();
+
+    return new SimpleEntry<>(tab.getId(), selectedGC);
+  }
 }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-calendar.js	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013-2015 Openbravo SLU
+ * All portions are Copyright (C) 2013-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-multicalendar.js	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/calendar/ob-multicalendar.js	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2013 Openbravo SLU
+ * All portions are Copyright (C) 2013-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -694,7 +694,8 @@
     });
     this.calendar = isc.OBMultiCalendarCalendar.create(isc.addProperties(this.calendarProps, {
       multiCalendar: this,
-      lanes: initialLanes
+      lanes: initialLanes,
+      autoFetchData: false
     }));
 
     this.setLoading(false);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-notes.js	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-notes.js	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2016 Openbravo SLU
+ * All portions are Copyright (C) 2011-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s): Valery Lezhebokov.
  ************************************************************************
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js	Thu Dec 27 10:43:52 2018 +0000
@@ -81,7 +81,7 @@
     requestProperties = requestProperties || {};
     requestProperties.clientContext = requestProperties.clientContext || {};
 
-    // only update the values of the record itself but not of any referenced 
+    // only update the values of the record itself but not of any referenced
     // entity
     if (operationType === 'update' || operationType === 'add') {
       var correctedData = {},
@@ -133,6 +133,7 @@
       sendOriginalIDBack: true,
       _extraProperties: this.getAdditionalProps()
     };
+
     isc.addProperties(newRequestProperties.params, additionalPara);
     if (!newRequestProperties.dataSource) {
       newRequestProperties.dataSource = this;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2017 Openbravo SLU
+ * All portions are Copyright (C) 2011-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -143,42 +143,45 @@
       editedRecord = null,
       storageBin = record.storageBin,
       i;
-  //Cheking available stock
-  if (storageBin === null) {
+  //Checking available stock
+  if (storageBin === null && !record.hasOverIssueBin) {
     item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_NotAvailableStock', [record.rMOrderNo]));
     return false;
   }
-  // check value is positive and below available qty and pending qty
-  if (value === null || value < 0 || value > record.pending || value > record.availableQty) {
-    if (record.pending < record.availableQty) {
-      item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_MoreThanPending', [record.pending]));
-    } else {
-      item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_MoreThanAvailable', [record.availableQty]));
+  if (storageBin !== null && !record.hasOverIssueBin) {
+    // check value is positive and below available qty and pending qty. 
+    // This check it is only needed if there isn't any storage bin with Overissue inventory status in the RTVS Warehouse
+    if (value === null || value < 0 || value > record.pending || value > record.availableQty) {
+      if (record.pending < record.availableQty) {
+        item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_MoreThanPending', [record.pending]));
+      } else {
+        item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_MoreThanAvailable', [record.availableQty]));
+      }
+      return false;
     }
-    return false;
-  }
-  // check shipped total quantity for the order line is below pending qty.
-  var isUomManagementEnabled = OB.PropertyStore.get('UomManagement');
-  for (i = 0; i < selectedRecordsLength; i++) {
-    editedRecord = isc.addProperties({}, selectedRecords[i], item.grid.getEditedRecord(selectedRecords[i]));
-    if (editedRecord.orderLine === orderLine) {
-      if (isUomManagementEnabled === 'Y') {
-        if (record.returnedUOM === editedRecord.returnedUOM) {
-          pendingQty -= editedRecord.movementQuantity;
-        } else {
-          var movementQuantity = new BigDecimal(String(editedRecord.movementQuantity));
-          var rate = new BigDecimal(String(editedRecord.rate));
-          pendingQty -= (editedRecord.returnedUOM !== editedRecord.uOM) ? movementQuantity.multiply(
-          rate).toString() : movementQuantity.divide(rate).toString();
+    // check shipped total quantity for the order line is below pending qty.
+    var isUomManagementEnabled = OB.PropertyStore.get('UomManagement');
+    for (i = 0; i < selectedRecordsLength; i++) {
+      editedRecord = isc.addProperties({}, selectedRecords[i], item.grid.getEditedRecord(selectedRecords[i]));
+      if (editedRecord.orderLine === orderLine) {
+        if (isUomManagementEnabled === 'Y') {
+          if (record.returnedUOM === editedRecord.returnedUOM) {
+            pendingQty -= editedRecord.movementQuantity;
+          } else {
+            var movementQuantity = new BigDecimal(String(editedRecord.movementQuantity));
+            var rate = new BigDecimal(String(editedRecord.rate));
+            pendingQty -= (editedRecord.returnedUOM !== editedRecord.uOM) ? movementQuantity.multiply(
+            rate).toString() : movementQuantity.divide(rate).toString();
+          }
         }
-      }
-      if (pendingQty < 0) {
-        if (isUomManagementEnabled === 'Y') {
-          item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_TooMuchShippedInUomManagement', []));
-        } else {
-          item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_TooMuchShipped', [record.pending]));
+        if (pendingQty < 0) {
+          if (isUomManagementEnabled === 'Y') {
+            item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_TooMuchShippedInUomManagement', []));
+          } else {
+            item.grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_TooMuchShipped', [record.pending]));
+          }
+          return false;
         }
-        return false;
       }
     }
   }
@@ -200,34 +203,51 @@
       editedRecord = null,
       isstocked = record.stocked,
       i;
+  //calculate already shipped qty on grid
+  var calculateAlreadyShippedQtyOnGrid = function () {
+      var isUomManagementEnabled = OB.PropertyStore.get('UomManagement');
+      for (i = 0; i < selectedRecords.length; i++) {
+        editedRecord = isc.addProperties({}, selectedRecords[i], grid.getEditedRecord(selectedRecords[i]));
+        if (editedRecord.orderLine === orderLine && selectedRecords[i].id !== record.id) {
+          if (isUomManagementEnabled === 'Y') {
+            if (record.returnedUOM === editedRecord.returnedUOM) {
+              shippedQty = shippedQty.add(new BigDecimal(String(editedRecord.movementQuantity)));
+            } else {
+              var movementQuantity = new BigDecimal(String(editedRecord.movementQuantity));
+              var rate = new BigDecimal(String(editedRecord.rate));
+              shippedQty = (editedRecord.returnedUOM !== editedRecord.uOM) ? shippedQty.add(movementQuantity.multiply(rate)) : shippedQty.add(movementQuantity.divide(rate));
+            }
+          }
+        }
+      }
+      pending = pending.subtract(shippedQty);
+      if (pending.compareTo(availableQty) < 0) {
+        record.movementQuantity = pending.toString();
+      } else {
+        record.movementQuantity = availableQty.toString();
+      }
+      };
   if (state) {
     // Checking available stock
     if (storageBin === null && isstocked) {
-      grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_NotAvailableStock', [record.rMOrderNo]));
-      return false;
-    }
-    // calculate already shipped qty on grid
-    var isUomManagementEnabled = OB.PropertyStore.get('UomManagement');
-    for (i = 0; i < selectedRecords.length; i++) {
-      editedRecord = isc.addProperties({}, selectedRecords[i], grid.getEditedRecord(selectedRecords[i]));
-      if (editedRecord.orderLine === orderLine && selectedRecords[i].id !== record.id) {
-        if (isUomManagementEnabled === 'Y') {
-          if (record.returnedUOM === editedRecord.returnedUOM) {
-            shippedQty = shippedQty.add(new BigDecimal(String(editedRecord.movementQuantity)));
+      // Check if exists any storage bin with overissue inventory status
+      var callback = function (response, data, request) {
+          if (data.overissueBin === '') {
+            grid.view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_RM_NotAvailableStock', [record.rMOrderNo]));
+            record.hasOverIssueBin = false;
+            return false;
           } else {
-            var movementQuantity = new BigDecimal(String(editedRecord.movementQuantity));
-            var rate = new BigDecimal(String(editedRecord.rate));
-            shippedQty = (editedRecord.returnedUOM !== editedRecord.uOM) ? shippedQty.add(movementQuantity.multiply(rate)) : shippedQty.add(movementQuantity.divide(rate));
+            calculateAlreadyShippedQtyOnGrid();
+            record.hasOverIssueBin = true;
+            record.storageBin = data.overissueBin;
+            record.storageBin$_identifier = data.storageBin$_identifier;
           }
-        }
-
-      }
-    }
-    pending = pending.subtract(shippedQty);
-    if (pending.compareTo(availableQty) < 0) {
-      record.movementQuantity = pending.toString();
+          };
+      OB.RemoteCallManager.call('org.openbravo.advpaymentmngt.actionHandler.CheckExistsOverissueBinForRFCShipmentWH', {
+        warehouseId: grid.view.parentWindow.activeView.getContextInfo(false, true, true, true).inpmWarehouseId
+      }, {}, callback);
     } else {
-      record.movementQuantity = availableQty.toString();
+      calculateAlreadyShippedQtyOnGrid();
     }
   }
 };
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <NAME><![CDATA[HTML Widget]]></NAME>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.34849]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.35272]]></VERSION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <DESCRIPTION><![CDATA[Provides the HTML Widget superclass that allows to create widget classes that embed the html code.]]></DESCRIPTION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HELP><![CDATA[With this module you can define your own widget classes just setting up your own html code or the html code provided by third parties.]]></HELP>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <URL><![CDATA[http://forge.openbravo.com/projects/htmlwidget]]></URL>
@@ -21,7 +21,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--D393BE6F22BB44B7B728259B34FC795A--></AD_MODULE>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_MODULE_ID><![CDATA[D393BE6F22BB44B7B728259B34FC795A]]></AD_MODULE_ID>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <NAME><![CDATA[User Interface Client Kernel]]></NAME>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.34849]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.35272]]></VERSION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <DESCRIPTION><![CDATA[Provides framework functionality for the Openbravo User Interface]]></DESCRIPTION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HELP><![CDATA[The user interface client kernel is a generation framework for generating client (browser) components used in Openbravo. Its components are mainly used by other modules to provide customizable and extendable user interfaces.]]></HELP>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravoclientkernel]]></URL>
@@ -22,7 +22,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <UPDATEINFO><![CDATA[Bug fix for issue 15289]]></UPDATEINFO>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--4B828F4D03264080AA1D2057B13F613C--></AD_MODULE>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.34849]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.35272]]></STARTVERSION>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.34849]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.35272]]></STARTVERSION>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/freemarker/test/GenerateComponentTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/freemarker/test/GenerateComponentTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -33,8 +33,8 @@
 import org.openbravo.client.kernel.KernelComponentProvider;
 import org.openbravo.client.kernel.KernelConstants;
 import org.openbravo.dal.core.DalContextListener;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Test the generation of several kernel components.
@@ -44,7 +44,7 @@
 
 public class GenerateComponentTest extends WeldBaseTest {
 
-  private static final Logger log = LoggerFactory.getLogger(GenerateComponentTest.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Override
   protected boolean shouldMockServletContext() {
--- a/modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/freemarker/test/LabelTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src-test/org/openbravo/client/kernel/freemarker/test/LabelTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -39,8 +39,8 @@
 import org.openbravo.model.ad.system.Language;
 import org.openbravo.model.ad.ui.Message;
 import org.openbravo.model.ad.ui.MessageTrl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Test the {@link I18NComponent}, test that a translated label actually is used inside of the label
@@ -51,7 +51,7 @@
 
 public class LabelTest extends WeldBaseTest {
 
-  private static final Logger log = LoggerFactory.getLogger(LabelTest.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   @Any
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationDynamicComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ApplicationDynamicComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -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-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -170,4 +170,9 @@
     strVersion += OBVersion.getInstance().getMP();
     return strVersion;
   }
+
+  public String getCsrfToken() {
+    String token = (String) RequestContext.get().getSessionAttribute("#CSRF_TOKEN");
+    return token != null ? token : "";
+  }
 }
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -29,7 +29,8 @@
 import javax.inject.Inject;
 
 import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Order;
 import org.openbravo.client.application.window.ApplicationDictionaryCachedStructures;
 import org.openbravo.client.kernel.BaseComponentProvider.ComponentResource;
@@ -66,14 +67,14 @@
 
   private static String moduleVersionHash = null;
 
-  private static final Logger log4j = Logger.getLogger(BaseComponent.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   @Inject
   @Any
   private Instance<Component> components;
 
   @Inject
-  private ApplicationDictionaryCachedStructures adcs;
+  protected ApplicationDictionaryCachedStructures adcs;
 
   // TODO: add the concept of child components which are generated/rendered before the root
   // component.
@@ -299,4 +300,8 @@
   public boolean bypassAuthentication() {
     return false;
   }
+
+  public ApplicationDictionaryCachedStructures getADCS() {
+    return adcs;
+  }
 }
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/CSSMinimizer.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/CSSMinimizer.java	Thu Dec 27 10:43:52 2018 +0000
@@ -45,7 +45,8 @@
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 /**
  * 
@@ -65,7 +66,7 @@
  */
 class CSSMinimizer {
 
-  private static Logger log = Logger.getLogger(CSSMinimizer.class);
+  private static Logger log = LogManager.getLogger();
 
   /**
    * Minify CSS from a reader to a printstream.
@@ -167,7 +168,7 @@
   private Property[] properties = null;
   private Vector<Selector> subSelectors = null;
   private String selector;
-  private static final Logger log = Logger.getLogger(Selector.class);
+  private static final Logger log = LogManager.getLogger();
 
   /**
    * Creates a new Selector using the supplied strings.
@@ -304,7 +305,7 @@
 class Property implements Comparable<Property> {
   protected String property;
   protected Part[] parts;
-  private static final Logger log = Logger.getLogger(Property.class);
+  private static final Logger log = LogManager.getLogger();
 
   /**
    * Creates a new Property using the supplied strings. Parses out the values of the property
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ComponentGenerator.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/ComponentGenerator.java	Thu Dec 27 10:43:52 2018 +0000
@@ -18,7 +18,8 @@
  */
 package org.openbravo.client.kernel;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.dal.core.OBContext;
 
 /**
@@ -30,7 +31,7 @@
  * @author mtaal
  */
 public class ComponentGenerator {
-  private static final Logger log = Logger.getLogger(ComponentGenerator.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static ComponentGenerator instance = new ComponentGenerator();
 
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/JSCompressor.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/JSCompressor.java	Thu Dec 27 10:43:52 2018 +0000
@@ -23,7 +23,8 @@
 
 import net.matthaynes.jsmin.JSMin;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.provider.OBProvider;
 
 /**
@@ -34,7 +35,7 @@
  * @author iperdomo
  */
 public class JSCompressor {
-  private static final Logger log = Logger.getLogger(JSCompressor.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static JSCompressor instance;
 
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelApplicationInitializer.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelApplicationInitializer.java	Thu Dec 27 10:43:52 2018 +0000
@@ -24,8 +24,10 @@
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.client.application.report.JmxReportCache;
+import org.openbravo.client.application.window.JmxApplicationDictionaryCachedStructures;
 import org.openbravo.client.application.window.ApplicationDictionaryCachedStructures;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.DateTimeData;
@@ -41,7 +43,7 @@
  */
 @ApplicationScoped
 public class KernelApplicationInitializer implements ApplicationInitializer {
-  private static final Logger log4j = Logger.getLogger(KernelApplicationInitializer.class);
+  private static final Logger log4j = LogManager.getLogger();
   private static final String sqlDateTimeFormat = "DD-MM-YYYY HH24:MI:SS";
   private static final String javaDateTimeFormat = "dd-MM-yyyy HH:mm:ss";
   private static final long THRESHOLD = 5000; // 5 seconds
@@ -56,6 +58,9 @@
   @Inject
   private ApplicationDictionaryCachedStructures adCachedStructures;
 
+  @Inject
+  private JmxApplicationDictionaryCachedStructures adcsJmx;
+
   public void initialize() {
     checkDatabaseAndTomcatDateTime();
     registerMBeans();
@@ -100,6 +105,7 @@
   private void registerMBeans() {
     MBeanRegistry.registerMBean(KernelConstants.RESOURCE_COMPONENT_ID, resourceProvider);
     MBeanRegistry.registerMBean(JmxReportCache.MBEAN_NAME, reportCache);
+    MBeanRegistry.registerMBean(JmxApplicationDictionaryCachedStructures.MBEAN_NAME, adcsJmx);
   }
 
   private void setModulesAsNotInDevelopment() {
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelInitializer.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelInitializer.java	Thu Dec 27 10:43:52 2018 +0000
@@ -33,8 +33,8 @@
 import org.openbravo.dal.core.OBInterceptor;
 import org.openbravo.database.ExternalConnectionPool;
 import org.openbravo.database.PoolInterceptorProvider;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Class responsible for initializing the kernel layer. Can be used in a servlet as well as a
@@ -45,7 +45,7 @@
 @ApplicationScoped
 public class KernelInitializer {
 
-  final static private Logger log = LoggerFactory.getLogger(KernelInitializer.class);
+  final static private Logger log = LogManager.getLogger();
 
   @Inject
   private PersistenceEventOBInterceptor persistenceEventOBInterceptor;
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelServlet.java	Thu Dec 27 10:43:52 2018 +0000
@@ -34,7 +34,8 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.ConfigParameters;
 import org.openbravo.base.HttpBaseUtils;
 import org.openbravo.base.exception.OBSecurityException;
@@ -50,8 +51,8 @@
  * @author mtaal
  */
 public class KernelServlet extends BaseKernelServlet {
-  // private static final Logger log = Logger.getLogger(DataSourceServlet.class);
-  private static final Logger log = Logger.getLogger(KernelServlet.class);
+  // private static final Logger log = LogManager.getLogger();
+  private static final Logger log = LogManager.getLogger();
 
   // this is needed to support logout deep in the code...
   // TODO: make it easier to get to the authentication manager from
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2010-2015 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -25,7 +25,8 @@
 import javax.servlet.ServletException;
 
 import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.log4j.Logger;
+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.hibernate.FetchMode;
@@ -33,7 +34,10 @@
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
+import org.openbravo.base.session.SessionFactoryController;
 import org.openbravo.base.structure.BaseOBObject;
+import org.openbravo.base.weld.WeldUtils;
+import org.openbravo.client.application.window.ApplicationDictionaryCachedStructures;
 import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
@@ -53,7 +57,7 @@
  * @author mtaal
  */
 public class KernelUtils {
-  private static final Logger log = Logger.getLogger(KernelUtils.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static KernelUtils instance = new KernelUtils();
 
@@ -64,6 +68,8 @@
       "org.openbravo.userinterface.smartclient", "org.openbravo.service.datasource",
       "org.openbravo.client.application", "org.openbravo.userinterface.selector" };
 
+  private ApplicationDictionaryCachedStructures adcs;
+
   public static synchronized KernelUtils getInstance() {
     if (instance == null) {
       instance = new KernelUtils();
@@ -71,6 +77,15 @@
     return instance;
   }
 
+  /** Note this constructor should not be generally used, use instead {@link #getInstance()} */
+  public KernelUtils() {
+    if (SessionFactoryController.isRunningInWebContainer()) {
+      // allow running outside Web container for tests
+      adcs = WeldUtils
+          .getInstanceFromStaticBeanManager(ApplicationDictionaryCachedStructures.class);
+    }
+  }
+
   public static synchronized void setInstance(KernelUtils instance) {
     KernelUtils.instance = instance;
   }
@@ -243,6 +258,7 @@
       // a module is returned for each module dependency, take care of this in
       // the for-loop below
       final OBCriteria<Module> modules = OBDal.getInstance().createCriteria(Module.class);
+      modules.addOrderBy(Module.PROPERTY_ID, true);
       modules.setFetchMode(Module.PROPERTY_MODULEDEPENDENCYLIST, FetchMode.JOIN);
       final List<Module> handledModules = new ArrayList<Module>();
       try {
@@ -285,6 +301,7 @@
         result.add(moduleLowLevelCode.getModule());
       }
       sortedModules = result;
+      log.debug("Modules ordered by dependency: " + sortedModules);
       return result;
     } finally {
       OBContext.restorePreviousMode();
@@ -397,7 +414,7 @@
       tabId = KernelUtilsData.getParentTab(connection, tab.getWindow().getId(), tab.getTabLevel()
           .toString(), tab.getSequenceNumber().toString());
       if (tabId != null) {
-        targetTab = OBDal.getInstance().get(Tab.class, tabId);
+        targetTab = adcs != null ? adcs.getTab(tabId) : OBDal.getInstance().get(Tab.class, tabId);
       }
     } catch (ServletException e) {
       log.error(e.getMessage(), e);
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/SessionDynamicResourceComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/SessionDynamicResourceComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -26,8 +26,8 @@
 import javax.inject.Inject;
 
 import org.openbravo.model.ad.module.Module;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This class generates other components called session dynamic resources. This kind of resources
@@ -36,7 +36,7 @@
  */
 public class SessionDynamicResourceComponent extends BaseComponent {
 
-  private static final Logger log = LoggerFactory.getLogger(SessionDynamicResourceComponent.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   @Any
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -30,7 +30,8 @@
 
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.client.kernel.BaseComponentProvider.ComponentResource;
 import org.openbravo.client.kernel.BaseComponentProvider.ComponentResource.ComponentResourceType;
@@ -45,7 +46,7 @@
  * @author iperdomo
  */
 public class StaticResourceComponent extends BaseComponent {
-  private static final Logger log = Logger.getLogger(StaticResourceComponent.class);
+  private static final Logger log = LogManager.getLogger();
 
   public static final String GEN_TARGET_LOCATION = "/web/js/gen";
 
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceProvider.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StaticResourceProvider.java	Thu Dec 27 10:43:52 2018 +0000
@@ -28,8 +28,8 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * This class is used as a cache for the static resources (js and css) used in the application. It
@@ -38,7 +38,7 @@
  */
 @ApplicationScoped
 public class StaticResourceProvider implements StaticResourceProviderMBean {
-  private static final Logger log = LoggerFactory.getLogger(StaticResourceProvider.class);
+  private static final Logger log = LogManager.getLogger();
 
   private String genTargetLocation;
   private ConcurrentHashMap<String, String> staticResources = new ConcurrentHashMap<>();
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StyleSheetResourceComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/StyleSheetResourceComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -31,7 +31,8 @@
 import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.client.kernel.BaseComponentProvider.ComponentResource;
 import org.openbravo.client.kernel.BaseComponentProvider.ComponentResource.ComponentResourceType;
 import org.openbravo.model.ad.module.Module;
@@ -43,7 +44,7 @@
  * @author iperdomo
  */
 public class StyleSheetResourceComponent extends BaseComponent {
-  private static final Logger log = Logger.getLogger(StyleSheetResourceComponent.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String IMGURLHOLDER = "__URLHOLDER__";
 
   protected static final String CSS = "CSS";
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/TemplateResolver.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/TemplateResolver.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
@@ -48,7 +49,7 @@
  * @see Template#getOverridesTemplate()
  */
 public class TemplateResolver {
-  private static final Logger log = Logger.getLogger(TemplateResolver.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static TemplateResolver instance = new TemplateResolver();
 
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/TestActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/TestActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 
 import javax.enterprise.context.ApplicationScoped;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 
 /**
@@ -33,7 +34,7 @@
  */
 @ApplicationScoped
 public class TestActionHandler extends BaseActionHandler {
-  private static final Logger log = Logger.getLogger(TestActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
 
   protected JSONObject execute(Map<String, Object> parameters, String data) {
     log.debug(">>>>>>>>>>>>>>> Received ActionHandler request ");
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/CharacteristicsUIDefinition.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/CharacteristicsUIDefinition.java	Thu Dec 27 10:43:52 2018 +0000
@@ -22,7 +22,8 @@
 import java.util.List;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+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.hibernate.criterion.Restrictions;
@@ -43,7 +44,7 @@
 
 public class CharacteristicsUIDefinition extends TextUIDefinition {
 
-  private static final Logger log4j = Logger.getLogger(CharacteristicsUIDefinition.class);
+  private static final Logger log4j = LogManager.getLogger();
 
   @Override
   public String getFormEditorType() {
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2010-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -21,6 +21,7 @@
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
+import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
 import org.openbravo.client.kernel.KernelUtils;
 import org.openbravo.dal.core.DalUtil;
@@ -88,18 +89,12 @@
 
   /* Returns true if the identifier of the table is composed of more than one column */
   private Boolean isTableWithMultipleIdentifierColumns(Table relatedTable) {
-    int nIdentifiers = 0;
-    for (Column curColumn : relatedTable.getADColumnList()) {
-      if (curColumn.isIdentifier()) {
-        nIdentifiers += 1;
-        if (nIdentifiers > 1) {
-          // if there is more than one identifier return true
-          return true;
-        }
-      }
-    }
-    // there is only one identifier column
-    return false;
+    return ModelProvider.getInstance() //
+        .getTable(relatedTable.getDBTableName()) //
+        .getColumns() //
+        .stream() //
+        .filter(org.openbravo.base.model.Column::isIdentifier) //
+        .count() > 1;
   }
 
   private boolean isPropertyField(Field field) {
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java	Thu Dec 27 10:43:52 2018 +0000
@@ -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-2017 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,9 +28,11 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Optional;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -41,6 +43,8 @@
 import org.openbravo.base.model.domaintype.PrimitiveDomainType;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.base.weld.WeldUtils;
+import org.openbravo.client.application.GCSystem;
+import org.openbravo.client.application.GCTab;
 import org.openbravo.client.application.Parameter;
 import org.openbravo.client.application.window.ApplicationDictionaryCachedStructures;
 import org.openbravo.client.application.window.OBViewUtil;
@@ -70,7 +74,7 @@
   private Reference reference;
   private DomainType domainType;
   private JSONObject gridConfigurationSettings;
-  protected static final Logger log = Logger.getLogger(UIDefinition.class);
+  protected static final Logger log = LogManager.getLogger();
 
   /**
    * Unique name used to identify the type.
@@ -558,9 +562,13 @@
    * 
    * @param field
    *          the field for which the information should be computed.
+   * @param systemGC
+   * @param tabGC
    */
-  public void establishGridConfigurationSettings(Field field) {
-    this.gridConfigurationSettings = OBViewUtil.getGridConfigurationSettings(field);
+  public void establishGridConfigurationSettings(Field field, Optional<GCSystem> systemGC,
+      Optional<GCTab> tabGC) {
+    this.gridConfigurationSettings = OBViewUtil
+        .getGridConfigurationSettings(field, systemGC, tabGC);
   }
 
   // note can make sense to also enable hover of values for enums
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinitionController.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinitionController.java	Thu Dec 27 10:43:52 2018 +0000
@@ -23,7 +23,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.dom4j.Document;
 import org.dom4j.Element;
 import org.hibernate.Hibernate;
@@ -47,7 +48,7 @@
  * @author mtaal
  */
 public class UIDefinitionController extends BaseTemplateComponent {
-  private static final Logger log = Logger.getLogger(UIDefinitionController.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static final String TEMPORARY_DECIMAL_REPLACE = ";;;";
 
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/templates/application-dynamic-js.ftl	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/templates/application-dynamic-js.ftl	Thu Dec 27 10:43:52 2018 +0000
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2009-2017 Openbravo SLU
+ * All portions are Copyright (C) 2009-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -51,7 +51,8 @@
         writableOrganizations: [
         <#list data.writableOrganizations as property>
             '${property?js_string}'<#if property_has_next>,</#if>
-        </#list>]
+        </#list>],
+        csrfToken: '${data.csrfToken?js_string}'
 };
 
 OB.AccessibleEntities = {
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <NAME><![CDATA[Workspace & Widgets]]></NAME>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.34849]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.35272]]></VERSION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <DESCRIPTION><![CDATA[Workspace & Widgets]]></DESCRIPTION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HELP><![CDATA[Provides the infrastructure of workspace tab (formerly My Openbravo)]]></HELP>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <URL><![CDATA[http://forge.openbravo.com/projects/myopenbravo]]></URL>
@@ -23,7 +23,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <REFERENCEDATAINFO><![CDATA[Provides the infrastructure of workspace tab]]></REFERENCEDATAINFO>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2758CD25B2704AF6BBAD10365FC82C06--></AD_MODULE>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--15F51F03882F444CAB6593B4566DC929-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--15F51F03882F444CAB6593B4566DC929-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--15F51F03882F444CAB6593B4566DC929-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--15F51F03882F444CAB6593B4566DC929-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOBUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOBUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,7 +25,8 @@
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -49,7 +50,7 @@
  */
 @ApplicationScoped
 public class MyOBUtils {
-  private static Logger log = Logger.getLogger(MyOBUtils.class);
+  private static Logger log = LogManager.getLogger();
   private static String MENU_ITEM_IS_SEPARATOR = "isSeparator";
   private static String MENU_ITEM_TITLE = "title";
   private static String MENU_ITEM_CLICK = "click";
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoActionHandler.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoActionHandler.java	Thu Dec 27 10:43:52 2018 +0000
@@ -26,7 +26,8 @@
 import javax.inject.Inject;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -54,7 +55,7 @@
 
 @ApplicationScoped
 public class MyOpenbravoActionHandler extends BaseActionHandler implements PortalAccessible {
-  private static final Logger log = Logger.getLogger(MyOpenbravoActionHandler.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String WIDGET_MOVED = "WIDGET_MOVED";
   private static final String WIDGET_ADDED = "WIDGET_ADDED";
   private static final String WIDGET_REMOVED = "WIDGET_REMOVED";
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoComponent.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoComponent.java	Thu Dec 27 10:43:52 2018 +0000
@@ -27,7 +27,8 @@
 import javax.inject.Inject;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+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.hibernate.criterion.Restrictions;
@@ -55,7 +56,7 @@
   static final String COMPONENT_ID = "MyOpenbravo";
   private static final String TEMPLATEID = "CA8047B522B44F61831A8CAA3AE2A7CD";
 
-  private Logger log = Logger.getLogger(MyOpenbravoComponent.class);
+  private Logger log = LogManager.getLogger();
 
   @Inject
   private MyOBUtils myOBUtils;
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/URLWidgetProvider.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/URLWidgetProvider.java	Thu Dec 27 10:43:52 2018 +0000
@@ -18,7 +18,8 @@
  */
 package org.openbravo.client.myob;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONObject;
 import org.hibernate.NonUniqueResultException;
@@ -32,7 +33,7 @@
  * @author mtaal
  */
 public class URLWidgetProvider extends WidgetProvider {
-  private static final Logger log = Logger.getLogger(URLWidgetProvider.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static final String URLWIDGETCLASSNAME = "OBUrlWidget";
   private static final String SRC = "src";
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/WidgetProvider.java	Thu Dec 27 10:43:52 2018 +0000
@@ -29,7 +29,8 @@
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
+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.hibernate.query.Query;
@@ -66,7 +67,7 @@
  * @author mtaal
  */
 public abstract class WidgetProvider {
-  private static final Logger log = Logger.getLogger(WidgetProvider.class);
+  private static final Logger log = LogManager.getLogger();
 
   public static final String WIDGETCLASSID = "widgetClassId";
   public static final String TITLE = "title";
--- a/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/widgetinform/WidgetInFormUIDefinition.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/widgetinform/WidgetInFormUIDefinition.java	Thu Dec 27 10:43:52 2018 +0000
@@ -18,7 +18,8 @@
  */
 package org.openbravo.client.myob.widgetinform;
 
-import org.apache.log4j.Logger;
+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.client.kernel.reference.UIDefinition;
@@ -35,7 +36,7 @@
  */
 public class WidgetInFormUIDefinition extends UIDefinition {
 
-  private static Logger widgetLog = Logger.getLogger(WidgetInFormUIDefinition.class);
+  private static Logger widgetLog = LogManager.getLogger();
 
   @Override
   public String getFormEditorType() {
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <NAME><![CDATA[Query/List Widget]]></NAME>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.34849]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.35272]]></VERSION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <DESCRIPTION><![CDATA[Provides the Query/List superclass widget that allows to create widget classes that prints a grid of data based on a query.]]></DESCRIPTION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HELP><![CDATA[With this module you can define your own widget classes that just with simple Application Dictionary shows a grid of data based on a HQL Query.]]></HELP>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <URL><![CDATA[http://forge.openbravo.com/projects/querylistwidget]]></URL>
@@ -21,7 +21,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC--></AD_MODULE>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java	Thu Dec 27 10:43:52 2018 +0000
@@ -38,7 +38,8 @@
 import javax.persistence.TupleElement;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -89,7 +90,7 @@
  */
 public class QueryListDataSource extends ReadOnlyDataSourceService implements PortalAccessible {
   private static final String OPTIONAL_FILTERS = "@optional_filters@";
-  private static final Logger log = Logger.getLogger(QueryListDataSource.class);
+  private static final Logger log = LogManager.getLogger();
   private static final String OPERATOR = "$OPERATOR";
 
   @Override
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -21,7 +21,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONObject;
 import org.hibernate.criterion.Restrictions;
@@ -39,7 +40,7 @@
 import org.openbravo.model.ad.ui.Tab;
 
 class QueryListUtils {
-  private static final Logger log = Logger.getLogger(QueryListUtils.class);
+  private static final Logger log = LogManager.getLogger();
 
   public static String getWidgetClassFields(WidgetClass widgetClass, IncludeIn includeIn) {
     try {
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListWidgetProvider.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListWidgetProvider.java	Thu Dec 27 10:43:52 2018 +0000
@@ -23,7 +23,8 @@
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.client.application.Parameter;
@@ -46,7 +47,7 @@
   public static final String WIDGETCLASS_PARAMETER = "WIDGET_CLASS";
 
   private static final String GRID_PROPERTIES_REFERENCE = "B36DF126DF5F4077A37F1E5B963AA636";
-  private static final Logger log = Logger.getLogger(QueryListWidgetProvider.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   @ComponentProvider.Qualifier(DataSourceConstants.DS_COMPONENT_TYPE)
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D844F3CC0003E-->  <NAME><![CDATA[Widgets Collection]]></NAME>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.34849]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.35272]]></VERSION>
 <!--FF8080812D842086012D844F3CC0003E-->  <DESCRIPTION><![CDATA[Collection of Workspace Widgets]]></DESCRIPTION>
 <!--FF8080812D842086012D844F3CC0003E-->  <HELP><![CDATA[Collection of Workspace Widgets]]></HELP>
 <!--FF8080812D842086012D844F3CC0003E-->  <URL><![CDATA[http://forge.openbravo.com/projects/widgetscollection]]></URL>
@@ -22,7 +22,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080812D842086012D844F3CC0003E-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--FF8080812D842086012D844F3CC0003E-->  <UPDATEINFO><![CDATA[Added Currency Converter. Added Google Docs]]></UPDATEINFO>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080812D842086012D844F3CC0003E--></AD_MODULE>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--FF8080812D842086012D845002070046-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D845002070046-->  <AD_MODULE_ID><![CDATA[FF8080812D842086012D844F3CC0003E]]></AD_MODULE_ID>
 <!--FF8080812D842086012D845002070046-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--FF8080812D842086012D845002070046-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080812D842086012D845002070046-->  <DEPENDANT_MODULE_NAME><![CDATA[Workspace & Widgets]]></DEPENDANT_MODULE_NAME>
 <!--FF8080812D842086012D845002070046-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <NAME><![CDATA[Payment Report]]></NAME>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.34849]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.35272]]></VERSION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <URL><![CDATA[http://forge.openbravo.com/projects/paymentreport]]></URL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <TYPE><![CDATA[M]]></TYPE>
@@ -22,7 +22,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2A5EE903D7974AC298C0504FBC4501A7--></AD_MODULE>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Thu Dec 27 10:43:52 2018 +0000
@@ -35,7 +35,8 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.time.DateUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.hibernate.LockOptions;
 import org.hibernate.ScrollMode;
 import org.hibernate.ScrollableResults;
@@ -56,7 +57,6 @@
 import org.openbravo.data.FieldProvider;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.SQLReturnObject;
-import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.datamodel.Column;
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.domain.List;
@@ -83,7 +83,7 @@
 public class PaymentReportDao {
 
   private static final long milisecDayConv = (1000 * 60 * 60 * 24);
-  static Logger log4j = Logger.getLogger(Utility.class);
+  static Logger log4j = LogManager.getLogger();
   private java.util.List<String> bpList;
   private java.util.List<String> bpCategoryList;
   private java.util.List<String> projectList;
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <NAME><![CDATA[Orders Awaiting Delivery]]></NAME>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.34849]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.35272]]></VERSION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <DESCRIPTION><![CDATA[Report displaying sales orders not shipped.]]></DESCRIPTION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <URL><![CDATA[http://forge.openbravo.com/projects/ordersawaitingdlivery]]></URL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <TYPE><![CDATA[M]]></TYPE>
@@ -19,7 +19,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--3A3A943684D64DEF9EC39F588A656848--></AD_MODULE>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_MODULE_ID>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -6,7 +6,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <NAME><![CDATA[JSON Datasource]]></NAME>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.34849]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.35272]]></VERSION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <DESCRIPTION><![CDATA[Provides data source CRUD functionality using JSON as the data format]]></DESCRIPTION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HELP><![CDATA[This module implements the datasource concept. Datasources play a central role in Smartclient applications. The datasource module automatically creates a datasource for each Openbravo entity. In addition custom data source implementations can be defined.]]></HELP>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <URL><![CDATA[http://forge.openbravo.com/projects/datasourceservice]]></URL>
@@ -22,7 +22,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[PR18Q4.1]]></VERSION_LABEL>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4--></AD_MODULE>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Dec 27 10:43:52 2018 +0000
@@ -7,7 +7,7 @@
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.34849]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.35272]]></STARTVERSION>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.34849]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.35272]]></STARTVERSION>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.34849]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.35272]]></STARTVERSION>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.34849]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.35272]]></STARTVERSION>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.34849]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.35272]]></STARTVERSION>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.datasource/src-test/org/openbravo/service/datasource/test/DataSourceJavaScriptTest.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src-test/org/openbravo/service/datasource/test/DataSourceJavaScriptTest.java	Thu Dec 27 10:43:52 2018 +0000
@@ -24,7 +24,8 @@
 
 import javax.inject.Inject;
 
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.junit.Test;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -45,7 +46,7 @@
  * @author mtaal
  */
 public class DataSourceJavaScriptTest extends WeldBaseTest {
-  private static final Logger log = Logger.getLogger(DataSourceJavaScriptTest.class);
+  private static final Logger log = LogManager.getLogger();
 
   @Inject
   private DataSourceServiceProvider dataSourceServiceProvider;
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java	Thu Dec 27 10:43:52 2018 +0000
@@ -60,11 +60,11 @@
 import org.openbravo.service.json.DataResolvingMode;
 import org.openbravo.service.json.DataToJsonConverter;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 public class ADTreeDatasourceService extends TreeDatasourceService {
-  private static final Logger logger = LoggerFactory.getLogger(ADTreeDatasourceService.class);
+  private static final Logger logger = LogManager.getLogger();
   private static final String AD_MENU_TABLE_ID = "116";
   private static final String AD_ORG_TABLE_ID = "155";
   private static final int PARENT_ID = 1;
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/AccountTreeDatasourceService.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/AccountTreeDatasourceService.java	Thu Dec 27 10:43:52 2018 +0000
@@ -29,15 +29,15 @@
 import org.openbravo.model.ad.utility.TableTree;
 import org.openbravo.model.ad.utility.Tree;
 import org.openbravo.model.financialmgmt.accounting.coa.Element;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * Tree Datasource for Account Tree
  * 
  */
 public class AccountTreeDatasourceService extends ADTreeDatasourceService {
-  private static final Logger logger = LoggerFactory.getLogger(AccountTreeDatasourceService.class);
+  private static final Logger logger = LogManager.getLogger();
   private static final String DATASOURCE_ID = "D2F94DC86DEC48D69E4BFCE59DC670CF";
   private static final String C_ELEMENTVALUE_TABLE_ID = "188";
   private static final String FINANCIALMGMTELEMENT_ID = "@FinancialMgmtElement.id@";
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/BaseDataSourceService.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/BaseDataSourceService.java	Thu Dec 27 10:43:52 2018 +0000
@@ -25,7 +25,8 @@
 import javax.inject.Inject;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.openbravo.base.exception.OBSecurityException;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
@@ -48,7 +49,7 @@
  * @author mtaal
  */
 public abstract class BaseDataSourceService implements DataSourceService {
-  private static final Logger log = Logger.getLogger(BaseDataSourceService.class);
+  private static final Logger log = LogManager.getLogger();
 
   private String name;
   private Template template;
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ComboTableDatasourceService.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ComboTableDatasourceService.java	Thu Dec 27 10:43:52 2018 +0000
@@ -41,8 +41,8 @@
 import org.openbravo.model.ad.ui.Field;
 import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.service.json.JsonConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
 
 /**
  * The implementation of the combo table reference datasource.
@@ -51,7 +51,7 @@
  */
 
 public class ComboTableDatasourceService extends BaseDataSourceService {
-  private static final Logger log = LoggerFactory.getLogger(ComboTableDatasourceService.class);
+  private static final Logger log = LogManager.getLogger();
 
   /*
    * (non-Javadoc)
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Thu Dec 27 10:43:52 2018 +0000
@@ -35,6 +35,8 @@
 import java.util.Map;
 import java.util.TimeZone;
 import java.util.Vector;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 import javax.inject.Inject;
 import javax.servlet.ServletConfig;
@@ -43,7 +45,8 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -108,11 +111,13 @@
  * @author mtaal
  */
 public class DataSourceServlet extends BaseKernelServlet {
-  private static final Logger log = Logger.getLogger(DataSourceServlet.class);
+  private static final Logger log = LogManager.getLogger();
 
   private static final long serialVersionUID = 1L;
 
   private static String servletPathPart = "org.openbravo.service.datasource";
+  private static Pattern csrfTokenPattern = Pattern
+      .compile("\"csrfToken\":\"(?<token>[A-Z0-9]+)\"");
 
   public static String getServletPathPart() {
     return servletPathPart;
@@ -847,9 +852,12 @@
         throw new OBUserException("AccessTableNoView");
       }
 
+      String content = getRequestContent(request);
+
+      checkCsrfToken(getCsrfTokenFromRequestContent(content), request);
+
       // note if clause updates parameter map
       if (checkSetIDDataSourceName(request, response, parameters)) {
-        String content = getRequestContent(request);
         parameters.put(DataSourceConstants.ADD_CONTENT_OPERATION, content);
         getDataSource(request).checkEditDatasourceAccess(parameters);
         final String result = getDataSource(request).add(parameters, content);
@@ -873,6 +881,8 @@
         throw new OBUserException("AccessTableNoView");
       }
 
+      checkCsrfToken(parameters.get(JsonConstants.CSRF_TOKEN_PARAMETER), request);
+
       final String id = parameters.get(JsonConstants.ID);
       if (id == null) {
         throw new InvalidRequestException("No id parameter");
@@ -911,10 +921,14 @@
         throw new OBUserException("AccessTableNoView");
       }
 
+      String requestContent = getRequestContent(request);
+
+      checkCsrfToken(getCsrfTokenFromRequestContent(requestContent), request);
+
       // note if clause updates parameter map
       if (checkSetIDDataSourceName(request, response, parameters)) {
         getDataSource(request).checkEditDatasourceAccess(parameters);
-        final String result = getDataSource(request).update(parameters, getRequestContent(request));
+        final String result = getDataSource(request).update(parameters, requestContent);
         writeResult(response, result);
       }
 
@@ -923,6 +937,35 @@
     }
   }
 
+  private void checkCsrfToken(String requestToken, HttpServletRequest request) {
+    String sessionToken = getSessionCsrfToken(request);
+    if (!hasValidCsrfToken(requestToken, sessionToken)) {
+      log.error("CSRF token check failed. Request=" + request.getRequestURI() + ", SessionID="
+          + request.getSession(false).getId() + ", SessionToken=" + sessionToken
+          + ", RequestToken=" + requestToken);
+      throw new OBUserException("InvalidCSRFToken");
+    }
+  }
+
+  private boolean hasValidCsrfToken(String requestToken, String sessionToken) {
+    return StringUtils.isNotEmpty(requestToken) && StringUtils.isNotEmpty(sessionToken)
+        && requestToken.equals(sessionToken);
+  }
+
+  private String getCsrfTokenFromRequestContent(String requestContent) {
+    Matcher matcher = csrfTokenPattern.matcher(requestContent);
+    if (matcher.find()) {
+      return matcher.group("token");
+    }
+
+    return "";
+  }
+
+  private String getSessionCsrfToken(HttpServletRequest request) {
+    String token = (String) request.getSession(false).getAttribute("#CSRF_TOKEN");
+    return token != null ? token : "";
+  }
+
   private boolean checkSetParameters(HttpServletRequest request, HttpServletResponse response,
       Map<String, String> parameters) throws IOException {
     if (!request.getRequestURI().contains("/" + servletPathPart)) {
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceUtils.java	Wed Dec 26 06:46:29 2018 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceUtils.java	Thu Dec 27 10:43:52 2018 +0000
@@ -11,26 +11,26 @@
  * 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-2018 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.service.datasource;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.service.json.JsonUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * This class contains utility methods for dataSource related classes
@@ -38,7 +38,7 @@
  */
 public class DataSourceUtils {
 
-  private static final Logger log = LoggerFactory.getLogger(DataSourceUtils.class);
+  private static final Logger log = LogManager.getLogger();
 
   /**
    * Returns a comma separated list of organization ids to filter the HQL. If an organization id is
@@ -80,35 +80,36 @@
    * according to that criteria.
    */
   public static int getNumberOfSelectedRecords(Map<String, String> parameters) {
-    List<String> selectedRecords = new ArrayList<String>();
     boolean hasCriteria = parameters.containsKey("criteria");
-    if (hasCriteria) {
-      try {
-        selectedRecords = getSelectedRecordsFromCriteria(JsonUtils.buildCriteria(parameters));
-      } catch (JSONException jsonex) {
-        log.error("Error retrieving number of selected records", jsonex);
-      }
+    if (!hasCriteria) {
+      return 0;
     }
-    return selectedRecords.size();
+    return getSelectedRecordsFromCriteria(JsonUtils.buildCriteria(parameters)).size();
   }
 
   /**
-   * Returns a list of selected record IDs from a criteria included in the JSONObject received as
+   * Returns a set of selected record IDs from a criteria included in the JSONObject received as
    * parameter.
    */
-  public static List<String> getSelectedRecordsFromCriteria(JSONObject buildCriteria)
-      throws JSONException {
-    List<String> selectedRecords = new ArrayList<String>();
-    JSONArray criteriaArray = buildCriteria.getJSONArray("criteria");
-    for (int i = 0; i < criteriaArray.length(); i++) {
-      JSONObject criteria = criteriaArray.getJSONObject(i);
-      if (criteria.has("fieldName") && criteria.getString("fieldName").equals("id")
-          && criteria.has("value")) {
-        String value = criteria.getString("value");
-        for (String recordId : value.split(",")) {
-          selectedRecords.add(recordId.trim());
+  public static Set<String> getSelectedRecordsFromCriteria(JSONObject buildCriteria) {
+    if (buildCriteria == null) {
+      return Collections.emptySet();
+    }
+    Set<String> selectedRecords = new HashSet<>();
+    try {
+      JSONArray criteriaArray = buildCriteria.getJSONArray("criteria");
+      for (int i = 0; i < criteriaArray.length(); i++) {
+        JSONObject criteria = criteriaArray.getJSONObject(i);
+        if (criteria.has("fieldName") && criteria.getString("fieldName").equals("id")
+            && criteria.has("value")) {
+          String value = criteria.getString("value");
+          for (String recordId : value.split(",")) {
+