From c24600a6d334069f4e047c48a2326ef6194d637c Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Fri, 14 Dec 2018 12:17:05 +0100 Subject: [PATCH 01/23] IDEMPIERE-3843 setup.ini should refer to the correct version of org.eclipse.equinox.launcher --- org.adempiere.server-feature/setup.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.server-feature/setup.ini b/org.adempiere.server-feature/setup.ini index f63d88f720..2b0d897bd2 100644 --- a/org.adempiere.server-feature/setup.ini +++ b/org.adempiere.server-feature/setup.ini @@ -1,5 +1,5 @@ -startup -plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar +plugins/org.eclipse.equinox.launcher_1.5.100.v20180827-1352.jar -install setup --launcher.XXMaxPermSize From 785acb06be4d8b0b7ae8321f627342dde7fbf954 Mon Sep 17 00:00:00 2001 From: hieplq Date: Thu, 29 Nov 2018 15:11:48 +0700 Subject: [PATCH 02/23] IDEMPIERE-3833:Detected idempiere service running --- org.adempiere.server-feature/idempiere-server.sh | 5 ++++- .../unix/DebianInstaller/etc/init.d/idempiere | 16 +++++++++------- .../utils.unix/unix/idempiere_Debian.sh | 13 +++++++------ .../utils.unix/unix/idempiere_RedHat.sh | 13 +++++++------ .../utils.unix/unix/idempiere_Suse.sh | 13 +++++++------ 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/org.adempiere.server-feature/idempiere-server.sh b/org.adempiere.server-feature/idempiere-server.sh index 6383a6e828..1d40ac8d2e 100644 --- a/org.adempiere.server-feature/idempiere-server.sh +++ b/org.adempiere.server-feature/idempiere-server.sh @@ -20,13 +20,16 @@ echo =================================== echo Starting iDempiere Server echo =================================== +# if don't set from service get default value +TELNET_PORT=${TELNET_PORT:-12612} + VMOPTS="-Dorg.osgi.framework.bootdelegation=sun.security.ssl,org.w3c.dom.events -Dosgi.compatibility.bootdelegation=true -Djetty.home=$BASE/jettyhome -Djetty.base=$BASE/jettyhome -Djetty.etc.config.urls=etc/jetty.xml,etc/jetty-deployer.xml,etc/jetty-ssl.xml,etc/jetty-ssl-context.xml,etc/jetty-http.xml,etc/jetty-alpn.xml,etc/jetty-http2.xml,etc/jetty-https.xml --Dosgi.console=localhost:12612 +-Dosgi.console=localhost:$TELNET_PORT -Dmail.mime.encodefilename=true -Dmail.mime.decodefilename=true -Dmail.mime.encodeparameters=true diff --git a/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere b/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere index d79728fc31..2950dff078 100755 --- a/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere +++ b/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere @@ -39,11 +39,13 @@ esac # adjust these variables to your environment IDEMPIERE_USER=idempiere IDEMPIERE_HOME=/opt/idempiere-server -JAVA_HOME=`ls -r /usr/lib/jvm/java-[6789]-openjdk*/bin/javac /usr/lib/jvm/java-[89]-oracle*/bin/javac | head -1` +# in case you manual install java by use zip or your linux distros, or your java provider have difference pattern of path, please update here +JAVA_HOME=`ls -r /usr/lib/jvm/java-1[0-9]-openjdk*/bin/javac /usr/lib/jvm/java-1[0-9]-oracle*/bin/javac | head -1` JAVA_HOME=`dirname $JAVA_HOME` JAVA_HOME=`dirname $JAVA_HOME` SU=su export IDEMPIERE_HOME +export TELNET_PORT=12612 if [ $(id -u) != "0" ] then @@ -533,8 +535,8 @@ Enter postgres password:" } getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -620,20 +622,20 @@ stop () { cd $IDEMPIERE_HOME/utils # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 log_warning_msg "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with OSGi shutdown" else log_warning_msg "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with kill -15" else log_warning_msg "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -664,7 +666,7 @@ dostatus () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh index 760b307d6d..5293c884bf 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh @@ -20,6 +20,7 @@ # adjust these variables to your environment IDEMPIERE_HOME=/opt/idempiere-server IDEMPIEREUSER=idempiere +export TELNET_PORT=12612 # Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH # in this case you can comment the source lines for ENVFILE below # detected some problems with Hardy Heron ubuntu using the bash source command @@ -32,8 +33,8 @@ IDEMPIERESTATUS= MAXITERATIONS=60 getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -90,20 +91,20 @@ stop () { . $ENVFILE # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 log_warning_msg "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with OSGi shutdown" else log_warning_msg "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then log_success_msg "Service stopped with kill -15" else log_warning_msg "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -134,7 +135,7 @@ status () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh index 4e96fd83f7..9193969608 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh @@ -20,6 +20,7 @@ IDEMPIERE_HOME=/opt/idempiere-server ENVFILE=$IDEMPIERE_HOME/utils/myEnvironment.sh IDEMPIEREUSER=idempiere +export TELNET_PORT=12612 . /etc/rc.d/init.d/functions @@ -28,8 +29,8 @@ IDEMPIERESTATUS= MAXITERATIONS=60 # 2 seconds every iteration, max wait 2 minutes getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -86,20 +87,20 @@ stop () { source $ENVFILE # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 echo "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo_success else echo "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo_success else echo "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -131,7 +132,7 @@ status () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh index a999dc31d4..ecd0329d50 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh @@ -19,6 +19,7 @@ # adjust these variables to your environment IDEMPIERE_HOME=/opt/idempiere-server IDEMPIEREUSER=idempiere +export TELNET_PORT=12612 # Instead of using ENVFILE you can set JAVA_HOME, IDEMPIERE_HOME and add JAVA_HOME/bin to PATH # in this case you can comment the source lines for ENVFILE below # detected some problems with Hardy Heron ubuntu using the bash source command @@ -57,8 +58,8 @@ IDEMPIERESTATUS= MAXITERATIONS=60 getidempierestatus() { - IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep org.adempiere.server.application | grep -v grep) - echo $IDEMPIERESTATUSSTRING | grep -q org.adempiere.server.application + IDEMPIERESTATUSSTRING=$(ps ax | grep java | grep ${IDEMPIERE_HOME} | grep -v grep) + echo $IDEMPIERESTATUSSTRING | grep -q ${IDEMPIERE_HOME} IDEMPIERESTATUS=$? } @@ -117,20 +118,20 @@ stop () { . $ENVFILE # try shutdown from OSGi console, then direct kill with signal 15, then signal 9 log_warning_msg "Trying shutdown from OSGi console" - ( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1 + ( echo exit; echo y; sleep 5 ) | telnet localhost ${TELNET_PORT} > /dev/null 2>&1 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo "Service stopped with OSGi shutdown" else echo "Trying direct kill with signal -15" - kill -15 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -15 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then echo "Service stopped with kill -15" else echo "Trying direct kill with signal -9" - kill -9 -`ps ax o pgid,command | grep org.adempiere.server.application | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` + kill -9 -`ps ax o pgid,command | grep ${IDEMPIERE_HOME} | grep -v grep | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u` sleep 5 getidempierestatus if [ $IDEMPIERESTATUS -ne 0 ] ; then @@ -166,7 +167,7 @@ status () { if [ $IDEMPIERESTATUS -eq 0 ] ; then echo echo "iDempiere is running:" - ps ax | grep org.adempiere.server.application | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' + ps ax | grep ${IDEMPIERE_HOME} | grep -v grep | sed 's/^[[:space:]]*\([[:digit:]]*\).*:[[:digit:]][[:digit:]][[:space:]]\(.*\)/\1 \2/' echo else echo "iDempiere is stopped" From c0005f0246b372069e3de4d39a8afeab815e92f2 Mon Sep 17 00:00:00 2001 From: hieplq Date: Thu, 29 Nov 2018 15:28:24 +0700 Subject: [PATCH 03/23] IDEMPIERE-3833:Detected idempiere service running --- .../utils.unix/unix/DebianInstaller/etc/init.d/idempiere | 2 +- .../utils.unix/unix/idempiere_Debian.sh | 2 +- .../utils.unix/unix/idempiere_RedHat.sh | 2 +- org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere b/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere index 2950dff078..d93c02c288 100755 --- a/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere +++ b/org.adempiere.server-feature/utils.unix/unix/DebianInstaller/etc/init.d/idempiere @@ -573,7 +573,7 @@ start () { echo -n "Starting iDempiere ERP: " export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log $SU ${IDEMPIERE_USER} -c "mkdir -p $IDEMPIERE_HOME/log" - $SU ${IDEMPIERE_USER} -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + $SU ${IDEMPIERE_USER} -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh index 5293c884bf..9bc0f45f9b 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_Debian.sh @@ -49,7 +49,7 @@ start () { . $ENVFILE export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" - su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh index 9193969608..265ed54cca 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_RedHat.sh @@ -45,7 +45,7 @@ start () { source $ENVFILE export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" - su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile diff --git a/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh b/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh index ecd0329d50..0fd61f9ff2 100644 --- a/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh +++ b/org.adempiere.server-feature/utils.unix/unix/idempiere_Suse.sh @@ -75,7 +75,7 @@ start () { . $ENVFILE export LOGFILE=$IDEMPIERE_HOME/log/idempiere_`date +%Y%m%d%H%M%S`.log su $IDEMPIEREUSER -c "mkdir -p $IDEMPIERE_HOME/log" - su $IDEMPIEREUSER -c "cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" + su $IDEMPIEREUSER -c "export TELNET_PORT=$TELNET_PORT;cd $IDEMPIERE_HOME;$IDEMPIERE_HOME/idempiere-server.sh &> $LOGFILE &" RETVAL=$? if [ $RETVAL -eq 0 ] ; then # wait for server to be confirmed as started in logfile From 7e1d17e4906e4c96dc4c94bb90da719efadc1e39 Mon Sep 17 00:00:00 2001 From: Diego Ruiz Date: Fri, 14 Dec 2018 12:49:53 +0100 Subject: [PATCH 04/23] IDEMPIERE-3838 GL Journal post result in the Accounting Schema of the document --- .../org/adempiere/webui/acct/WAcctViewer.java | 1 + .../adempiere/webui/acct/WAcctViewerData.java | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java index 04e42b624f..5c2f426607 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java @@ -615,6 +615,7 @@ public class WAcctViewer extends Window implements EventListener private void dynInit (int AD_Table_ID, int Record_ID) { + m_data.validateAcctSchemas(Record_ID); m_data.fillAcctSchema(selAcctSchema ); selAcctSchema.addEventListener(Events.ON_SELECT, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java index 6a4385a0dd..44a590d5d2 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewerData.java @@ -21,6 +21,8 @@ package org.adempiere.webui.acct; +import static org.compiere.model.SystemIDs.REFERENCE_POSTING_TYPE; + import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; @@ -36,9 +38,9 @@ import org.adempiere.webui.component.Listbox; import org.compiere.model.MAcctSchema; import org.compiere.model.MAcctSchemaElement; import org.compiere.model.MFactAcct; +import org.compiere.model.MJournal; import org.compiere.model.MLookupFactory; import org.compiere.model.MRefList; -import static org.compiere.model.SystemIDs.*; import org.compiere.report.core.RColumn; import org.compiere.report.core.RModel; import org.compiere.util.CLogger; @@ -179,6 +181,24 @@ public class WAcctViewerData Env.clearWinContext(WindowNo); } // dispose + /** + * GL Journal only posts in one Accounting Schema + * if the record is a GL Journal, remove the others from the array + * @param Record_ID + */ + protected void validateAcctSchemas(int Record_ID) + { + if (Record_ID > 0 && AD_Table_ID == MJournal.Table_ID) { + MJournal journal = new MJournal(Env.getCtx(), Record_ID, null); + + if (journal != null) { + ASchemas = new MAcctSchema[1]; + ASchemas[0] = MAcctSchema.get(Env.getCtx(), journal.getC_AcctSchema_ID()); + ASchema = ASchemas[0]; + } + } + } // validateAcctSchemas + /************************************************************************** * Fill Accounting Schema * @param cb Listbox to be filled From ed8e16bee47f2302dc48e500313133b6d0092647 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 22 Nov 2018 13:36:19 -0200 Subject: [PATCH 05/23] IDEMPIERE-3829 Scheduler not running - ( Failed to create new process instance ) in log --- .../src/org/adempiere/base/Core.java | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/adempiere/base/Core.java b/org.adempiere.base/src/org/adempiere/base/Core.java index a562fe6a28..83ed39cdff 100644 --- a/org.adempiere.base/src/org/adempiere/base/Core.java +++ b/org.adempiere.base/src/org/adempiere/base/Core.java @@ -122,13 +122,13 @@ public class Core { return null; } - /** + /** * * @param processId Java class name or equinox extension id * @return ProcessCall instance or null if processId not found */ public static ProcessCall getProcess(String processId) { - List factories = Service.locator().list(IProcessFactory.class).getServices(); + List factories = getProcessFactories(); if (factories != null && !factories.isEmpty()) { for(IProcessFactory factory : factories) { ProcessCall process = factory.newProcessInstance(processId); @@ -139,6 +139,39 @@ public class Core { return null; } + /** + * This method load the process factories waiting until the DefaultProcessFactory on base is loaded (IDEMPIERE-3829) + * @return List of factories implementing IProcessFactory + */ + private static List getProcessFactories() { + List factories = null; + int maxIterations = 5; + int waitMillis = 1000; + int iterations = 0; + boolean foundDefault = false; + while (true) { + factories = Service.locator().list(IProcessFactory.class).getServices(); + if (factories != null && !factories.isEmpty()) { + for(IProcessFactory factory : factories) { + // wait until DefaultProcessFactory is loaded + if (factory instanceof DefaultProcessFactory) { + foundDefault = true; + break; + } + } + } + iterations++; + if (foundDefault || iterations >= maxIterations) { + break; + } + try { + Thread.sleep(waitMillis); + } catch (InterruptedException e) { + } + } + return factories; + } + /** * * @param validatorId Java class name or equinox extension Id From abd2b702432647452638d6f2f5ed24a223cbe2bf Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 20 Nov 2018 17:26:55 -0200 Subject: [PATCH 06/23] Fix oracle datapump scripts --- org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh | 3 +++ .../utils.unix/oracle/ImportIdempiere.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh b/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh index 2ebd876df1..d8f02335dd 100644 --- a/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh +++ b/org.adempiere.server-feature/utils.unix/oracle/DBRestoredp.sh @@ -29,8 +29,11 @@ echo ------------------------------------- echo Re-Create DataPump directory echo ------------------------------------- sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data +# Note the user running this script must be member of dba group: usermod -G dba idempiere chgrp dba $IDEMPIERE_HOME/data chmod 770 $IDEMPIERE_HOME/data +chgrp dba $IDEMPIERE_HOME/data/ExpDat.dmp +chmod 640 $IDEMPIERE_HOME/data/ExpDat.dmp echo ------------------------------------- echo Import ExpDat diff --git a/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh b/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh index dabbc996ce..317d0c9f33 100644 --- a/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh +++ b/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh @@ -30,8 +30,11 @@ echo ------------------------------------- echo Re-Create DataPump directory echo ------------------------------------- sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data/seed +# Note the user running this script must be member of dba group: usermod -G dba idempiere chgrp dba $IDEMPIERE_HOME/data/seed chmod 770 $IDEMPIERE_HOME/data/seed +chgrp dba $IDEMPIERE_HOME/data/seed/Adempiere.dmp +chmod 640 $IDEMPIERE_HOME/data/seed/Adempiere.dmp echo ------------------------------------- echo Import Adempiere.dmp From 991b3d12b4b0cc50225b298a8e11dd05fb1b4013 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 20 Nov 2018 18:39:36 -0200 Subject: [PATCH 07/23] Fix oracle datapump scripts --- .../utils.unix/oracle/ImportIdempiere.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh b/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh index 317d0c9f33..6e2835dd3d 100644 --- a/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh +++ b/org.adempiere.server-feature/utils.unix/oracle/ImportIdempiere.sh @@ -31,6 +31,8 @@ echo Re-Create DataPump directory echo ------------------------------------- sqlplus $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIERE_HOME/utils/$ADEMPIERE_DB_PATH/CreateDataPumpDir.sql $IDEMPIERE_HOME/data/seed # Note the user running this script must be member of dba group: usermod -G dba idempiere +chgrp dba $IDEMPIERE_HOME/data +chmod 770 $IDEMPIERE_HOME/data chgrp dba $IDEMPIERE_HOME/data/seed chmod 770 $IDEMPIERE_HOME/data/seed chgrp dba $IDEMPIERE_HOME/data/seed/Adempiere.dmp From 19b1e6e1f84833a253dac10b17cacf059466f96d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 21 Nov 2018 10:13:35 -0200 Subject: [PATCH 08/23] More on helper linux scripts to generate iDempiere seed --- .../utils.unix/oracle/ExportReference.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh b/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh index 7f8a0db600..8991e31a65 100644 --- a/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh +++ b/org.adempiere.server-feature/utils.unix/oracle/ExportReference.sh @@ -21,22 +21,30 @@ sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME @$IDEMPIER chgrp dba $IDEMPIERE_HOME/data chmod 770 $IDEMPIERE_HOME/data -sqlplus $3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME < Date: Fri, 14 Dec 2018 14:10:10 +0100 Subject: [PATCH 09/23] IDEMPIERE-2558 don't allow use old password when change password / fix daysReuse=0 means this feature is not used / do not save password history if not configured / warning on log when saving plain passwords --- .../org/compiere/model/MPasswordHistory.java | 9 +++-- .../src/org/compiere/model/MUser.java | 35 +++++++++---------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java b/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java index f32e93cdb5..e257a3ca42 100644 --- a/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java +++ b/org.adempiere.base/src/org/compiere/model/MPasswordHistory.java @@ -1,18 +1,18 @@ package org.compiere.model; import java.sql.ResultSet; +import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.compiere.util.Env; public class MPasswordHistory extends X_AD_Password_History { - /** * */ - private static final long serialVersionUID = 3480028808276906947L; - + private static final long serialVersionUID = 8602148028134601856L; + public MPasswordHistory(Properties ctx, int AD_Password_History_ID, String trxName) { super(ctx, AD_Password_History_ID, trxName); @@ -35,6 +35,9 @@ public class MPasswordHistory extends X_AD_Password_History { * @return */ public static List getPasswordHistoryForCheck (int daysReuse, int userId){ + if (daysReuse <= 0) { + return new ArrayList(); + } StringBuilder whereClause = new StringBuilder() .append("SYSDATE-") .append(daysReuse) diff --git a/org.adempiere.base/src/org/compiere/model/MUser.java b/org.adempiere.base/src/org/compiere/model/MUser.java index 05ce2ac997..21555e5d8e 100644 --- a/org.adempiere.base/src/org/compiere/model/MUser.java +++ b/org.adempiere.base/src/org/compiere/model/MUser.java @@ -907,14 +907,6 @@ public class MUser extends X_AD_User MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName()); if (pwdrule != null){ List passwordHistorys = MPasswordHistory.getPasswordHistoryForCheck(pwdrule.getDays_Reuse_Password(), this.getAD_User_ID()); - // for long time user don't use this system, because all password in history table is out of check range. but we will want new password must difference latest password - if (passwordHistorys.size() == 0 && !this.is_new() && this.get_ValueOld(MUser.COLUMNNAME_Password) != null){ - Object oldSalt = this.get_ValueOld(MUser.COLUMNNAME_Salt); - Object oldPassword = this.get_ValueOld(MUser.COLUMNNAME_Password); - - MPasswordHistory latestPassword = new MPasswordHistory(oldSalt == null?null:oldSalt.toString(), oldPassword == null?null:oldPassword.toString()); - passwordHistorys.add(latestPassword); - } pwdrule.validate((getLDAPUser() != null ? getLDAPUser() : getName()), getPassword(), passwordHistorys); } setDatePasswordChanged(new Timestamp(new Date().getTime())); @@ -1055,17 +1047,24 @@ public class MUser extends X_AD_User @Override protected boolean afterSave(boolean newRecord, boolean success) { if (getPassword() != null && getPassword().length() > 0 && (newRecord || is_ValueChanged("Password"))) { - MPasswordHistory passwordHistory = new MPasswordHistory(this.getCtx(), 0, this.get_TrxName()); - passwordHistory.setSalt(this.getSalt()); - passwordHistory.setPassword(this.getPassword()); - // http://wiki.idempiere.org/en/System_user - if (!this.is_new() && this.getAD_User_ID() == 0){ - passwordHistory.set_Value(MPasswordHistory.COLUMNNAME_AD_User_ID, 0); - }else{ - passwordHistory.setAD_User_ID(this.getAD_User_ID()); + MPasswordRule pwdrule = MPasswordRule.getRules(getCtx(), get_TrxName()); + if (pwdrule != null && pwdrule.getDays_Reuse_Password() > 0) { + boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false); + if (! hash_password) { + log.severe("Saving password history: it is strongly encouraged to save password history just when using hashed passwords - WARNING! table AD_Password_History is possibly keeping plain passwords"); + } + MPasswordHistory passwordHistory = new MPasswordHistory(this.getCtx(), 0, this.get_TrxName()); + passwordHistory.setSalt(this.getSalt()); + passwordHistory.setPassword(this.getPassword()); + // http://wiki.idempiere.org/en/System_user + if (!this.is_new() && this.getAD_User_ID() == 0){ + passwordHistory.set_Value(MPasswordHistory.COLUMNNAME_AD_User_ID, 0); + }else{ + passwordHistory.setAD_User_ID(this.getAD_User_ID()); + } + passwordHistory.setDatePasswordChanged(this.getUpdated()); + passwordHistory.saveEx(); } - passwordHistory.setDatePasswordChanged(this.getUpdated()); - passwordHistory.saveEx(); } return super.afterSave(newRecord, success); } From 130fc51c2946c2e706e19cd82cc49beba844e223 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Fri, 14 Dec 2018 14:25:19 +0100 Subject: [PATCH 10/23] IDEMPIERE-3826 Make ChangePasswordPanel a little more user friendly --- .../webui/panel/ChangePasswordPanel.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java index 0743ed76f6..b21860250b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/ChangePasswordPanel.java @@ -15,6 +15,7 @@ package org.adempiere.webui.panel; +import java.util.ArrayList; import java.util.Properties; import org.adempiere.exceptions.AdempiereException; @@ -32,6 +33,8 @@ import org.adempiere.webui.theme.ITheme; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.LoginWindow; +import org.compiere.model.MPasswordHistory; +import org.compiere.model.MPasswordRule; import org.compiere.model.MSysConfig; import org.compiere.model.MUser; import org.compiere.util.CLogger; @@ -44,8 +47,10 @@ import org.zkoss.zhtml.Div; import org.zkoss.zhtml.Table; import org.zkoss.zhtml.Td; import org.zkoss.zhtml.Tr; +import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; import org.zkoss.zul.Image; @@ -59,7 +64,7 @@ public class ChangePasswordPanel extends Window implements EventListener /** * */ - private static final long serialVersionUID = 6055606520280550335L; + private static final long serialVersionUID = -4117126419866788951L; private static CLogger logger = CLogger.getCLogger(ChangePasswordPanel.class); @@ -246,12 +251,14 @@ public class ChangePasswordPanel extends Window implements EventListener txtNewPassword.setId("txtNewPassword"); txtNewPassword.setType("password"); txtNewPassword.setCols(25); + txtNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtNewPassword, "220px"); txtRetypeNewPassword = new Textbox(); txtRetypeNewPassword.setId("txtRetypeNewPassword"); txtRetypeNewPassword.setType("password"); txtRetypeNewPassword.setCols(25); + txtRetypeNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px"); txtAnswer = new Textbox(); @@ -272,6 +279,21 @@ public class ChangePasswordPanel extends Window implements EventListener SessionManager.logoutSession(); wndLogin.loginCancelled(); } + else if (event.getTarget() == txtNewPassword) { + MPasswordRule pwdrule = MPasswordRule.getRules(Env.getCtx(), null); + if (pwdrule != null) { + try { + pwdrule.validate(m_userName, txtNewPassword.getValue(), new ArrayList()); + } + catch (Exception e) { + throw new WrongValueException(txtNewPassword, e.getMessage()); + } + } + } + else if (event.getTarget() == txtRetypeNewPassword) { + if (!txtNewPassword.getValue().equals(txtRetypeNewPassword.getValue())) + throw new WrongValueException(txtRetypeNewPassword, Msg.getMsg(m_ctx, "PasswordNotMatch")); + } } public void validateChangePassword() From 2c3153692a3c54f03a959c7b9d20345c577a24df Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 14 Dec 2018 14:25:38 +0100 Subject: [PATCH 11/23] IDEMPIERE-3826 Make ChangePasswordPanel a little more user friendly / implement same solution from Nicolas on Reset Password --- .../webui/apps/form/WResetPassword.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java index 159eb6d78c..0d7e9df830 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WResetPassword.java @@ -14,6 +14,7 @@ package org.adempiere.webui.apps.form; +import java.util.ArrayList; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; @@ -37,6 +38,8 @@ import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.FDialog; import org.compiere.model.MLookup; import org.compiere.model.MLookupFactory; +import org.compiere.model.MPasswordHistory; +import org.compiere.model.MPasswordRule; import org.compiere.model.MSysConfig; import org.compiere.model.MUser; import org.compiere.util.CLogger; @@ -44,8 +47,10 @@ import org.compiere.util.DisplayType; import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.Util; +import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; +import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Borderlayout; import org.zkoss.zul.Center; import org.zkoss.zul.Columns; @@ -140,12 +145,14 @@ public class WResetPassword implements IFormController, EventListener, Va txtNewPassword.setId("txtNewPassword"); txtNewPassword.setType("password"); txtNewPassword.setCols(25); + txtNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtNewPassword, "220px"); txtRetypeNewPassword = new Textbox(); txtRetypeNewPassword.setId("txtRetypeNewPassword"); txtRetypeNewPassword.setType("password"); txtRetypeNewPassword.setCols(25); + txtRetypeNewPassword.addEventListener(Events.ON_BLUR, this); ZKUpdateUtil.setWidth(txtRetypeNewPassword, "220px"); cbForceChangeNextLogin = new Checkbox(); @@ -261,6 +268,29 @@ public class WResetPassword implements IFormController, EventListener, Va { validateChangePassword(); } + else if (e.getTarget() == txtNewPassword) { + MPasswordRule pwdrule = MPasswordRule.getRules(Env.getCtx(), null); + String userName = ""; + int userID = -1; + if (fUser.getValue() != null) { + userID = Integer.parseInt(fUser.getValue().toString()); + } + if (userID < 0) + throw new WrongValueException(fUser.getComponent(), Msg.getMsg(Env.getCtx(), "UserMandatory")); + userName = MUser.getNameOfUser(userID); + if (pwdrule != null) { + try { + pwdrule.validate(userName, txtNewPassword.getValue(), new ArrayList()); + } + catch (Exception ex) { + throw new WrongValueException(txtNewPassword, ex.getMessage()); + } + } + } + else if (e.getTarget() == txtRetypeNewPassword) { + if (!txtNewPassword.getValue().equals(txtRetypeNewPassword.getValue())) + throw new WrongValueException(txtRetypeNewPassword, Msg.getMsg(Env.getCtx(), "PasswordNotMatch")); + } } private void validateChangePassword() From 4693b6c7bada81cacb76b82c0af160a159a24daf Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Sat, 15 Dec 2018 13:44:48 +0100 Subject: [PATCH 12/23] IDEMPIERE-3846 Translated placeholders not displayed on info windows --- .../WEB-INF/src/org/adempiere/webui/info/InfoWindow.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java index 11751005b4..7ec74dfb89 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/info/InfoWindow.java @@ -588,7 +588,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL boolean isMandatory = !m_lookup && infoColumn.isMandatory() && infoColumn.isQueryCriteria(); GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), infoWindow.getAD_InfoWindow_ID(), 0, columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(), - infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.getPlaceholder()); + infoColumn.getAD_Reference_Value_ID(), isMandatory, false, infoColumn.get_Translation("Placeholder")); if (infoColumn.getAD_Val_Rule_ID() > 0) { vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode(); if (vo.lookupInfo != null) { @@ -2026,7 +2026,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL String columnName = infoColumn.getColumnName(); GridFieldVO vo = GridFieldVO.createParameter(infoContext, p_WindowNo, AEnv.getADWindowID(p_WindowNo), m_infoWindowID, 0, columnName, infoColumn.get_Translation("Name"), infoColumn.getAD_Reference_ID(), - infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.getPlaceholder()); + infoColumn.getAD_Reference_Value_ID(), false, false, infoColumn.get_Translation("Placeholder")); if (infoColumn.getAD_Val_Rule_ID() > 0) { vo.ValidationCode = infoColumn.getAD_Val_Rule().getCode(); if (vo.lookupInfo != null) { From 84a340ca009585dd24534aef307a9115aef68631 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 15 Dec 2018 13:49:40 +0100 Subject: [PATCH 13/23] IDEMPIERE-3847 Mixed Content load script from google when deploy idempiere on https --- org.adempiere.server/idempiere.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.server/idempiere.jsp b/org.adempiere.server/idempiere.jsp index 4443e22f85..f4b7c199a8 100644 --- a/org.adempiere.server/idempiere.jsp +++ b/org.adempiere.server/idempiere.jsp @@ -13,7 +13,7 @@ Author URI: http://www.bmlaurus.com <% if(Prop.isRssOn()){ - out.write("\n"); + out.write("\n"); out.write(""); } %> @@ -187,4 +187,4 @@ Author URI: http://www.bmlaurus.com - \ No newline at end of file + From 2bfa3f4c38739a273234d31caa4e416321c24f07 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 15 Dec 2018 14:08:41 +0100 Subject: [PATCH 14/23] IDEMPIERE-3829 Scheduler not running - ( Failed to create new process instance ) in log / fix java.util.ConcurrentModificationException when running all housekeeping schedulers on start 13:51:15.942-----------> Scheduler.doWork: MProcess[53154-HouseKeeping] [173] java.util.ConcurrentModificationException at java.base/java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:719) at java.base/java.util.LinkedHashMap$LinkedValueIterator.next(LinkedHashMap.java:746) at org.compiere.model.MTable.get(MTable.java:112) at org.compiere.model.Query.(Query.java:134) at org.compiere.model.MScheduler.getParameters(MScheduler.java:165) --- org.adempiere.base/src/org/compiere/model/MTable.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MTable.java b/org.adempiere.base/src/org/compiere/model/MTable.java index 0f402e51ea..373f74d374 100644 --- a/org.adempiere.base/src/org/compiere/model/MTable.java +++ b/org.adempiere.base/src/org/compiere/model/MTable.java @@ -58,7 +58,7 @@ public class MTable extends X_AD_Table /** * */ - private static final long serialVersionUID = -8757836873040013402L; + private static final long serialVersionUID = 7527235342324308477L; public final static int MAX_OFFICIAL_ID = 999999; @@ -102,7 +102,7 @@ public class MTable extends X_AD_Table * @param tableName case insensitive table name * @return Table */ - public static MTable get (Properties ctx, String tableName) + public static synchronized MTable get (Properties ctx, String tableName) { if (tableName == null) return null; From 123eaf0c6f2ad2964ed865e15fdfb8f247408693 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Sat, 15 Dec 2018 14:21:00 +0100 Subject: [PATCH 15/23] IDEMPIERE-3786 Number of records in detail grid must not be hardcoded --- migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql | 10 ++++++++++ .../i6.1/postgresql/201809111630_IDEMPIERE-3786.sql | 7 +++++++ .../src/org/compiere/model/MSysConfig.java | 11 ++++++----- .../src/org/adempiere/webui/adwindow/GridView.java | 9 +++++++-- 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql create mode 100644 migration/i6.1/postgresql/201809111630_IDEMPIERE-3786.sql diff --git a/migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql b/migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql new file mode 100644 index 0000000000..27b174ee52 --- /dev/null +++ b/migration/i6.1/oracle/201809111630_IDEMPIERE-3786.sql @@ -0,0 +1,10 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded +-- Sep 11, 2018 4:29:18 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644') +; + +SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual +; diff --git a/migration/i6.1/postgresql/201809111630_IDEMPIERE-3786.sql b/migration/i6.1/postgresql/201809111630_IDEMPIERE-3786.sql new file mode 100644 index 0000000000..d5f4e72c36 --- /dev/null +++ b/migration/i6.1/postgresql/201809111630_IDEMPIERE-3786.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-3786 : Number of records in detail grid must not be hardcoded +-- Sep 11, 2018 4:29:18 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200143,0,0,TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2018-09-11 16:29:17','YYYY-MM-DD HH24:MI:SS'),0,0,'Y','ZK_PAGING_DETAIL_SIZE','10','Default paging size for detail grid view in zk webui','D','C','e4555557-68a2-4b87-a605-4da79de87644') +; + +SELECT register_migration_script('201809111630_IDEMPIERE-3786.sql') FROM dual +; diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index 77bcaf5a63..712c77ed8c 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -42,9 +42,9 @@ public class MSysConfig extends X_AD_SysConfig /** * */ - private static final long serialVersionUID = 8623809160538454497L; + private static final long serialVersionUID = -1273442365045945366L; - public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; + public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS"; public static final String ALLOCATION_DESCRIPTION = "ALLOCATION_DESCRIPTION"; public static final String ALLOW_APPLY_PAYMENT_TO_CREDITMEMO = "ALLOW_APPLY_PAYMENT_TO_CREDITMEMO"; @@ -59,7 +59,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String APPLICATION_MAIN_VERSION = "APPLICATION_MAIN_VERSION"; public static final String APPLICATION_MAIN_VERSION_SHOWN = "APPLICATION_MAIN_VERSION_SHOWN"; public static final String APPLICATION_OS_INFO_SHOWN = "APPLICATION_OS_INFO_SHOWN"; - public static final String APPLICATION_URL = "APPLICATION_URL"; + public static final String APPLICATION_URL = "APPLICATION_URL"; public static final String ATTACH_EMBEDDED_2PACK = "ATTACH_EMBEDDED_2PACK"; public static final String AUTO_ASSIGN_ROLE_TO_CREATOR_USER = "AUTO_ASSIGN_ROLE_TO_CREATOR_USER"; public static final String AUTOMATIC_PACKIN_FOLDERS = "AUTOMATIC_PACKIN_FOLDERS"; @@ -141,7 +141,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String SYSTEM_IN_MAINTENANCE_MODE = "SYSTEM_IN_MAINTENANCE_MODE"; public static final String SYSTEM_INSERT_CHANGELOG = "SYSTEM_INSERT_CHANGELOG"; public static final String SYSTEM_NATIVE_SEQUENCE = "SYSTEM_NATIVE_SEQUENCE"; - public static final String TOP_MARGIN_PIXELS_FOR_HEADER = "TOP_MARGIN_PIXELS_FOR_HEADER"; + public static final String TOP_MARGIN_PIXELS_FOR_HEADER = "TOP_MARGIN_PIXELS_FOR_HEADER"; public static final String TRACE_ALL_TRX_CONNECTION_GET = "TRACE_ALL_TRX_CONNECTION_GET"; public static final String TWOPACK_COMMIT_DDL = "2PACK_COMMIT_DDL"; public static final String TWOPACK_HANDLE_TRANSLATIONS = "2PACK_HANDLE_TRANSLATIONS"; @@ -175,6 +175,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String ZK_LOGO_SMALL = "ZK_LOGO_SMALL"; public static final String ZK_MAX_UPLOAD_SIZE = "ZK_MAX_UPLOAD_SIZE"; public static final String ZK_MOBILE_PAGING_SIZE = "ZK_MOBILE_PAGING_SIZE"; + public static final String ZK_PAGING_DETAIL_SIZE = "ZK_PAGING_DETAIL_SIZE"; public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE"; public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE"; public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE"; @@ -183,8 +184,8 @@ public class MSysConfig extends X_AD_SysConfig public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER"; public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL"; public static final String ZK_SESSION_TIMEOUT_IN_SECONDS = "ZK_SESSION_TIMEOUT_IN_SECONDS"; - public static final String ZK_THEME = "ZK_THEME"; public static final String ZK_THEME_USE_FONT_ICON_FOR_IMAGE = "ZK_THEME_USE_FONT_ICON_FOR_IMAGE"; + public static final String ZK_THEME = "ZK_THEME"; public static final String ZOOM_ACROSS_QUERY_TIMEOUT = "ZOOM_ACROSS_QUERY_TIMEOUT"; /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java index b9ca3e3c25..5d1671a4c5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridView.java @@ -78,7 +78,7 @@ public class GridView extends Vlayout implements EventListener, IdSpace, /** * */ - private static final long serialVersionUID = -2966799998482667434L; + private static final long serialVersionUID = 3046157124327495333L; private static final String HEADER_GRID_STYLE = "border: none; margin:0; padding: 0;"; @@ -208,11 +208,16 @@ public class GridView extends Vlayout implements EventListener, IdSpace, public void setDetailPaneMode(boolean detailPaneMode) { if (this.detailPaneMode != detailPaneMode) { this.detailPaneMode = detailPaneMode; - pageSize = detailPaneMode ? DEFAULT_DETAIL_PAGE_SIZE : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx())); + pageSize = detailPaneMode ? getDetailPageSize() : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20, Env.getAD_Client_ID(Env.getCtx())); updatePaging(); } } + /** Returns the number of records to be displayed in detail grid (TODO : manage exceptions defined in SysConfig - see https://idempiere.atlassian.net/browse/IDEMPIERE-3786) */ + int getDetailPageSize() { + return MSysConfig.getIntValue(MSysConfig.ZK_PAGING_DETAIL_SIZE, DEFAULT_DETAIL_PAGE_SIZE, Env.getAD_Client_ID(Env.getCtx())); + } + public boolean isDetailPaneMode() { return this.detailPaneMode; } From ce5914a3fb87f94284ad80e9a7c5ddd0701a10e5 Mon Sep 17 00:00:00 2001 From: Deepak Pansheriya Date: Wed, 17 Oct 2018 07:52:58 -0400 Subject: [PATCH 16/23] IDEMPIERE-3803 : PackOut process is not exporting UUIDs references for fields AD_Image_ID --- org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java index 3325d8118c..77ebe1caa3 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java @@ -11,6 +11,7 @@ import org.compiere.model.MTree; import org.compiere.model.PO; import org.compiere.model.POInfo; import org.compiere.model.X_AD_Client; +import org.compiere.model.X_AD_Image; import org.compiere.model.X_AD_Org; import org.compiere.model.X_C_Location; import org.compiere.model.X_M_Locator; @@ -276,6 +277,8 @@ public class PoExporter { addTableReference(columnName, X_M_Locator.Table_Name, new AttributesImpl()); } else if (DisplayType.Location == displayType) { addTableReference(columnName, X_C_Location.Table_Name, new AttributesImpl()); + } else if (DisplayType.Image == displayType) { + addTableReference(columnName, X_AD_Image.Table_Name, new AttributesImpl()); } else { add(columnName, "", new AttributesImpl()); } From 6bf4456dfcc73d61df9921f40b70fd59b8206cd0 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 15 Dec 2018 16:27:04 +0100 Subject: [PATCH 17/23] IDEMPIERE-3828 Error when packin a Process Parameter by a 2Pack / integrate patch suggested by Bruno de Melo Carvalho (dsoftware55.cc) --- org.adempiere.base/src/org/compiere/model/MRefTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MRefTable.java b/org.adempiere.base/src/org/compiere/model/MRefTable.java index 17402dd25e..10a75c8d03 100644 --- a/org.adempiere.base/src/org/compiere/model/MRefTable.java +++ b/org.adempiere.base/src/org/compiere/model/MRefTable.java @@ -59,7 +59,7 @@ public class MRefTable extends X_AD_Ref_Table @Override public I_AD_Table getAD_Table() throws RuntimeException { - MTable table = MTable.get(getCtx(), getAD_Table_ID()); + MTable table = MTable.get(getCtx(), getAD_Table_ID(), get_TrxName()); return table; } From 867a86250db30e8dc8003e849017699964f03b9f Mon Sep 17 00:00:00 2001 From: Ricardo Santana Date: Sat, 15 Dec 2018 16:32:06 +0100 Subject: [PATCH 18/23] IDEMPIERE-3809 Error when packin a workflow node by a 2Pack --- org.adempiere.base/src/org/compiere/wf/MWFNode.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/wf/MWFNode.java b/org.adempiere.base/src/org/compiere/wf/MWFNode.java index 69994490a7..3a2fc8f06e 100644 --- a/org.adempiere.base/src/org/compiere/wf/MWFNode.java +++ b/org.adempiere.base/src/org/compiere/wf/MWFNode.java @@ -611,7 +611,7 @@ public class MWFNode extends X_AD_WF_Node } if (getAD_Column_ID() > 0) { // validate that just advanced roles can manipulate secure content via workflows - MColumn column = MColumn.get(getCtx(), getAD_Column_ID()); + MColumn column = MColumn.get(getCtx(), getAD_Column_ID(), get_TrxName ()); if (column.isSecure() || column.isAdvanced()) { if (! MRole.getDefault().isAccessAdvanced()) { log.saveError("AccessTableNoUpdate", Msg.getElement(getCtx(), column.getColumnName())); From 69b0ad5ce840c933542871fe7975ef0a44ef3591 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Sat, 15 Dec 2018 16:50:08 +0100 Subject: [PATCH 19/23] IDEMPIERE-3780 AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY --- .../oracle/201808311200_IDEMPIERE-3780.sql | 26 +++++++++++++++++++ .../201808311200_IDEMPIERE-3780.sql | 23 ++++++++++++++++ .../src/org/compiere/model/I_AD_User.java | 9 +++++++ .../src/org/compiere/model/X_AD_User.java | 25 +++++++++++++++++- .../src/org/compiere/util/Login.java | 4 +-- 5 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 migration/i6.1/oracle/201808311200_IDEMPIERE-3780.sql create mode 100644 migration/i6.1/postgresql/201808311200_IDEMPIERE-3780.sql diff --git a/migration/i6.1/oracle/201808311200_IDEMPIERE-3780.sql b/migration/i6.1/oracle/201808311200_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..bf60f99760 --- /dev/null +++ b/migration/i6.1/oracle/201808311200_IDEMPIERE-3780.sql @@ -0,0 +1,26 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3780 : AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY +-- Aug 31, 2018 11:49:36 AM CEST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203266,0,0,'Y',TO_DATE('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,'IsNoExpire','No Expire','No Expire','D','86e9d8d5-35c5-4ba1-85d3-d674d8f48a2f') +; + +-- Aug 31, 2018 11:50:17 AM CEST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213690,0,'No Expire',114,'IsNoExpire','N',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_DATE('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,203266,'Y','N','D','N','N','N','Y','27a982d2-604b-4efe-982c-6e5004e62072','N',0,'N','Y','N') +; + +-- Aug 31, 2018 11:50:19 AM CEST +ALTER TABLE AD_User ADD IsNoExpire CHAR(1) DEFAULT 'N' CHECK (IsNoExpire IN ('Y','N')) NOT NULL +; + +-- Aug 31, 2018 11:50:38 AM CEST +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (205827,'No Expire',118,213690,'Y',1,440,'N','N','N','N',0,0,'Y',TO_DATE('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','f96b4141-f3b9-45da-917f-23f9ddc80071','Y',3220,2,2) +; + +-- Aug 31, 2018 11:51:05 AM CEST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_DATE('2018-08-31 11:51:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201808311200_IDEMPIERE-3780.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/postgresql/201808311200_IDEMPIERE-3780.sql b/migration/i6.1/postgresql/201808311200_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..c3457b487f --- /dev/null +++ b/migration/i6.1/postgresql/201808311200_IDEMPIERE-3780.sql @@ -0,0 +1,23 @@ +-- IDEMPIERE-3780 : AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY +-- Aug 31, 2018 11:49:36 AM CEST +INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (203266,0,0,'Y',TO_TIMESTAMP('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:49:36','YYYY-MM-DD HH24:MI:SS'),0,'IsNoExpire','No Expire','No Expire','D','86e9d8d5-35c5-4ba1-85d3-d674d8f48a2f') +; + +-- Aug 31, 2018 11:50:17 AM CEST +INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure,FKConstraintType) VALUES (213690,0,'No Expire',114,'IsNoExpire','N',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:50:17','YYYY-MM-DD HH24:MI:SS'),0,203266,'Y','N','D','N','N','N','Y','27a982d2-604b-4efe-982c-6e5004e62072','N',0,'N','Y','N') +; + +-- Aug 31, 2018 11:50:19 AM CEST +ALTER TABLE AD_User ADD COLUMN IsNoExpire CHAR(1) DEFAULT 'N' CHECK (IsNoExpire IN ('Y','N')) NOT NULL +; + +-- Aug 31, 2018 11:50:38 AM CEST +INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (205827,'No Expire',118,213690,'Y',1,440,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-31 11:50:38','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','f96b4141-f3b9-45da-917f-23f9ddc80071','Y',3220,2,2) +; + +-- Aug 31, 2018 11:51:05 AM CEST +UPDATE AD_Field SET IsDisplayed='Y', SeqNo=420, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=2, ColumnSpan=1, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-08-31 11:51:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201808311200_IDEMPIERE-3780.sql') FROM dual +; \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_User.java b/org.adempiere.base/src/org/compiere/model/I_AD_User.java index ec433a0230..73697e0514 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_User.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_User.java @@ -485,6 +485,15 @@ public interface I_AD_User */ public String getIsMenuAutoExpand(); + /** Column name IsNoExpire */ + public static final String COLUMNNAME_IsNoExpire = "IsNoExpire"; + + /** Set No Expire */ + public void setIsNoExpire (boolean IsNoExpire); + + /** Get No Expire */ + public boolean isNoExpire(); + /** Column name IsNoPasswordReset */ public static final String COLUMNNAME_IsNoPasswordReset = "IsNoPasswordReset"; diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_User.java b/org.adempiere.base/src/org/compiere/model/X_AD_User.java index 0dad803eff..4e45ba1a2e 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_User.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_User.java @@ -31,7 +31,7 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent /** * */ - private static final long serialVersionUID = 20181104L; + private static final long serialVersionUID = 20180831L; /** Standard Constructor */ public X_AD_User (Properties ctx, int AD_User_ID, String trxName) @@ -52,6 +52,8 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent // N setIsLocked (false); // 'N' + setIsNoExpire (false); +// N setIsNoPasswordReset (false); // 'N' setIsSalesLead (false); @@ -747,6 +749,27 @@ public class X_AD_User extends PO implements I_AD_User, I_Persistent return (String)get_Value(COLUMNNAME_IsMenuAutoExpand); } + /** Set No Expire. + @param IsNoExpire No Expire */ + public void setIsNoExpire (boolean IsNoExpire) + { + set_Value (COLUMNNAME_IsNoExpire, Boolean.valueOf(IsNoExpire)); + } + + /** Get No Expire. + @return No Expire */ + public boolean isNoExpire () + { + Object oo = get_Value(COLUMNNAME_IsNoExpire); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set No Password Reset. @param IsNoPasswordReset No Password Reset */ public void setIsNoPasswordReset (boolean IsNoPasswordReset) diff --git a/org.adempiere.base/src/org/compiere/util/Login.java b/org.adempiere.base/src/org/compiere/util/Login.java index 9ca1beea23..860480a28a 100644 --- a/org.adempiere.base/src/org/compiere/util/Login.java +++ b/org.adempiere.base/src/org/compiere/util/Login.java @@ -1312,7 +1312,7 @@ public class Login if (minutes > MAX_ACCOUNT_LOCK_MINUTES) { boolean inactive = false; - if (MAX_INACTIVE_PERIOD_DAY > 0 && user.getDateLastLogin() != null) + if (MAX_INACTIVE_PERIOD_DAY > 0 && user.getDateLastLogin() != null && !user.isNoExpire()) { long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24); if (days > MAX_INACTIVE_PERIOD_DAY) @@ -1331,7 +1331,7 @@ public class Login } } - if (MAX_INACTIVE_PERIOD_DAY > 0 && !user.isLocked() && user.getDateLastLogin() != null) + if (MAX_INACTIVE_PERIOD_DAY > 0 && !user.isLocked() && user.getDateLastLogin() != null && !user.isNoExpire()) { long days = (now - user.getDateLastLogin().getTime()) / (1000 * 60 * 60 * 24); if (days > MAX_INACTIVE_PERIOD_DAY) From 00b15802d046095171ae53146f75340e01b69fa4 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 15 Dec 2018 16:53:36 +0100 Subject: [PATCH 20/23] IDEMPIERE-3780 AD_User.IsNoExpire to override MAX_INACTIVE_PERIOD_DAY / set field as advanced --- migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql | 11 +++++++++++ .../i6.1/postgresql/201812151653_IDEMPIERE-3780.sql | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql create mode 100644 migration/i6.1/postgresql/201812151653_IDEMPIERE-3780.sql diff --git a/migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql b/migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..a64e1040a4 --- /dev/null +++ b/migration/i6.1/oracle/201812151653_IDEMPIERE-3780.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3780 +-- Dec 15, 2018, 4:51:29 PM CET +UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL, IsAdvancedField='Y',Updated=TO_DATE('2018-12-15 16:51:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201812151653_IDEMPIERE-3780.sql') FROM dual +; + diff --git a/migration/i6.1/postgresql/201812151653_IDEMPIERE-3780.sql b/migration/i6.1/postgresql/201812151653_IDEMPIERE-3780.sql new file mode 100644 index 0000000000..9be67d8c35 --- /dev/null +++ b/migration/i6.1/postgresql/201812151653_IDEMPIERE-3780.sql @@ -0,0 +1,8 @@ +-- IDEMPIERE-3780 +-- Dec 15, 2018, 4:51:29 PM CET +UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL, IsAdvancedField='Y',Updated=TO_TIMESTAMP('2018-12-15 16:51:29','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205827 +; + +SELECT register_migration_script('201812151653_IDEMPIERE-3780.sql') FROM dual +; + From ec6d32fdd519efff7d14f7fa1303ff53de396dc6 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Sat, 15 Dec 2018 17:00:03 +0100 Subject: [PATCH 21/23] IDEMPIERE-3770 Translation : export only centralized data --- .../i6.1/oracle/201808021530_IDEMPIERE-3770.sql | 10 ++++++++++ .../postgresql/201808021530_IDEMPIERE-3770.sql | 7 +++++++ .../src/org/compiere/install/Translation.java | 14 ++++++++++++-- .../org/compiere/install/VTranslationDialog.java | 13 +++++++++---- .../webui/install/WTranslationDialog.java | 14 +++++++++++--- 5 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 migration/i6.1/oracle/201808021530_IDEMPIERE-3770.sql create mode 100644 migration/i6.1/postgresql/201808021530_IDEMPIERE-3770.sql diff --git a/migration/i6.1/oracle/201808021530_IDEMPIERE-3770.sql b/migration/i6.1/oracle/201808021530_IDEMPIERE-3770.sql new file mode 100644 index 0000000000..64e28e1857 --- /dev/null +++ b/migration/i6.1/oracle/201808021530_IDEMPIERE-3770.sql @@ -0,0 +1,10 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3770: Translation : export only centralized data +-- Aug 2, 2018 3:36:33 PM CEST +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Only centralized data',0,0,'Y',TO_DATE('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,200481,'OnlyCentralizedData','D','f43c0cce-0462-4247-baf6-e7da842152ab') +; + +SELECT register_migration_script('201808021530_IDEMPIERE-3770.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/postgresql/201808021530_IDEMPIERE-3770.sql b/migration/i6.1/postgresql/201808021530_IDEMPIERE-3770.sql new file mode 100644 index 0000000000..9ab00fe7c6 --- /dev/null +++ b/migration/i6.1/postgresql/201808021530_IDEMPIERE-3770.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-3770: Translation : export only centralized data +-- Aug 2, 2018 3:36:33 PM CEST +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Only centralized data',0,0,'Y',TO_TIMESTAMP('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-08-02 15:36:32','YYYY-MM-DD HH24:MI:SS'),0,200481,'OnlyCentralizedData','D','f43c0cce-0462-4247-baf6-e7da842152ab') +; + +SELECT register_migration_script('201808021530_IDEMPIERE-3770.sql') FROM dual +; \ No newline at end of file diff --git a/org.adempiere.base/src/org/compiere/install/Translation.java b/org.adempiere.base/src/org/compiere/install/Translation.java index 3bd02e9bdd..b0a0a6f410 100644 --- a/org.adempiere.base/src/org/compiere/install/Translation.java +++ b/org.adempiere.base/src/org/compiere/install/Translation.java @@ -173,7 +173,7 @@ public class Translation implements IApplication * @param Trl_Table translation table _Trl * @return status message */ - public String exportTrl (String directory, int AD_Client_ID, String AD_Language, String Trl_Table) + public String exportTrl (String directory, int AD_Client_ID, String AD_Language, String Trl_Table, boolean onlyCentralized) { String fileName = directory + File.separator + Trl_Table + "_" + AD_Language + ".xml"; log.info(fileName); @@ -185,6 +185,12 @@ public class Translation implements IApplication String Base_Table = Trl_Table.substring(0, pos); if (isBaseLanguage) tableName = Base_Table; + + if (onlyCentralized) { + if (MTable.get(m_ctx, tableName).getAD_Table_ID() > MTable.MAX_OFFICIAL_ID) + return ""; + } + String keyColumn = Base_Table + "_ID"; String uuidColumn = MTable.getUUIDColumnName(Base_Table); String[] trlColumns = getTrlColumns (Base_Table); @@ -237,6 +243,10 @@ public class Translation implements IApplication } if (AD_Client_ID >= 0) sql.append(haveWhere ? " AND " : " WHERE ").append("o.AD_Client_ID=").append(AD_Client_ID); + + if (onlyCentralized) + sql.append(haveWhere ? " AND " : " WHERE ").append(" o.").append(keyColumn).append("<=").append(MTable.MAX_OFFICIAL_ID).append(" AND o.IsActive = 'Y'"); + sql.append(" ORDER BY t.").append(keyColumn); // pstmt = DB.prepareStatement(sql.toString(), null); @@ -500,7 +510,7 @@ public class Translation implements IApplication System.out.println("Cannot create directory " + directory + " to export the language to it."); System.exit(1); } - exportTrl(directory, -1, AD_Language, table); + exportTrl(directory, -1, AD_Language, table, true); } else System.out.println("Just import and export are supported as modes."); } diff --git a/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java b/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java index 5539688d1f..7ea92cd2a5 100644 --- a/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java +++ b/org.adempiere.ui.swing/src/org/compiere/install/VTranslationDialog.java @@ -36,6 +36,7 @@ import org.compiere.apps.ADialog; import org.compiere.apps.StatusBar; import org.compiere.apps.form.FormFrame; import org.compiere.apps.form.FormPanel; +import org.compiere.grid.ed.VCheckBox; import org.compiere.swing.CPanel; import org.compiere.util.CLogger; import org.compiere.util.Env; @@ -80,6 +81,7 @@ public class VTranslationDialog extends TranslationController private StatusBar statusBar = new StatusBar(); private JLabel lClient = new JLabel(); private JComboBox cbClient = new JComboBox(); + private VCheckBox isOnlyCentralized = new VCheckBox(); /** @@ -93,6 +95,7 @@ public class VTranslationDialog extends TranslationController lLanguage.setText(Msg.translate(Env.getCtx(), "AD_Language")); lLanguage.setToolTipText(Msg.translate(Env.getCtx(), "IsSystemLanguage")); lTable.setText(Msg.translate(Env.getCtx(), "AD_Table_ID")); + isOnlyCentralized.setText(Msg.getMsg(Env.getCtx(), "OnlyCentralizedData")); // bExport.setText(Msg.getMsg(Env.getCtx(), "Export")); bExport.addActionListener(this); @@ -107,9 +110,11 @@ public class VTranslationDialog extends TranslationController ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.add(cbTable, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); - panel.add(bExport, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0 + panel.add(isOnlyCentralized, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0 + ,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0)); + panel.add(bExport, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); - panel.add(bImport, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0 + panel.add(bImport, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); panel.add(lClient, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 5, 5), 0, 0)); @@ -224,7 +229,7 @@ public class VTranslationDialog extends TranslationController AD_Table = (ValueNamePair)cbTable.getItemAt(i); msg = imp ? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()) - : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()); + : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue(), isOnlyCentralized.isSelected()); } if(msg == null || msg.length() == 0) @@ -237,7 +242,7 @@ public class VTranslationDialog extends TranslationController msg = null; msg = imp ? t.importTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()) - : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()); + : t.exportTrl (directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue(), isOnlyCentralized.isSelected()); if(msg == null || msg.length() == 0) msg = (imp ? "Import" : "Export") + " Successful. [" + directory + "]"; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java index c90009f84f..0c35c9c78f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/install/WTranslationDialog.java @@ -29,6 +29,7 @@ import org.adempiere.exceptions.AdempiereException; import org.adempiere.webui.AdempiereWebUI; import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.Button; +import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.FolderBrowser; import org.adempiere.webui.component.Grid; import org.adempiere.webui.component.GridFactory; @@ -119,6 +120,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo private int m_AD_Client_ID; private boolean m_imp; private ValueNamePair m_AD_Language; + private Checkbox isOnlyCentralized = new Checkbox(); private void zkInit() throws Exception { @@ -139,6 +141,8 @@ public class WTranslationDialog extends TranslationController implements IFormCo bImportZIP.setLabel(Msg.getMsg(Env.getCtx(), "ImportZIP")); bImportZIP.setUpload(AdempiereWebUI.getUploadSetting()); bImportZIP.addEventListener(Events.ON_UPLOAD, this); + isOnlyCentralized.setLabel(Msg.getMsg(Env.getCtx(), "OnlyCentralizedData")); + isOnlyCentralized.setChecked(true); Rows rows = centerLayout.newRows(); Row row = rows.newRow(); @@ -152,7 +156,11 @@ public class WTranslationDialog extends TranslationController implements IFormCo row = rows.newRow(); row.appendChild(lTable.rightAlign()); row.appendChild(cbTable); - + + row = rows.newRow(); + row.appendChild(new Label("")); + row.appendChild(isOnlyCentralized); + row = rows.newRow(); Div div = new Div(); div.setStyle("text-align: right;"); @@ -298,7 +306,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo // Carlos Ruiz - globalqss - improve output message from translation import process msg.append(m_AD_Table.getValue()).append(" ").append((m_imp ? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()) - : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()))).append(" "); + : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue(), isOnlyCentralized.isChecked()))).append(" "); } if(msg == null || msg.length() == 0) @@ -311,7 +319,7 @@ public class WTranslationDialog extends TranslationController implements IFormCo msg = null; msg = new StringBuilder(m_imp ? t.importTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue()) - : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue())); + : t.exportTrl (directory, m_AD_Client_ID, m_AD_Language.getValue(), m_AD_Table.getValue(), isOnlyCentralized.isChecked())); if(msg == null || msg.length() == 0) msg = new StringBuilder(m_imp ? "Import" : "Export").append(" Successful. [").append(directory).append("]"); From 36c3c55f9ce283ca601531a1b58a6d23451b4d15 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Sat, 15 Dec 2018 17:02:39 +0100 Subject: [PATCH 22/23] IDEMPIERE-1052 Improve Performance using Search instead of Table/Table Direct --- .../oracle/201807301600_IDEMPIERE-1052.sql | 22 +++++++++++++++++++ .../201807301600_IDEMPIERE-1052.sql | 19 ++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 migration/i6.1/oracle/201807301600_IDEMPIERE-1052.sql create mode 100644 migration/i6.1/postgresql/201807301600_IDEMPIERE-1052.sql diff --git a/migration/i6.1/oracle/201807301600_IDEMPIERE-1052.sql b/migration/i6.1/oracle/201807301600_IDEMPIERE-1052.sql new file mode 100644 index 0000000000..c873017c3d --- /dev/null +++ b/migration/i6.1/oracle/201807301600_IDEMPIERE-1052.sql @@ -0,0 +1,22 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-1052: Improve Performance using Search instead of Table/Table Direct +-- Jul 30, 2018 4:01:01 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200590 +; + +-- Jul 30, 2018 4:01:07 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_DATE('2018-07-30 16:01:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Jul 30, 2018 4:01:21 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200593 +; + +-- Jul 30, 2018 4:01:33 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_DATE('2018-07-30 16:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200595 +; + +SELECT register_migration_script('201807301600_IDEMPIERE-1052.sql') FROM dual +; \ No newline at end of file diff --git a/migration/i6.1/postgresql/201807301600_IDEMPIERE-1052.sql b/migration/i6.1/postgresql/201807301600_IDEMPIERE-1052.sql new file mode 100644 index 0000000000..10e1cc6a21 --- /dev/null +++ b/migration/i6.1/postgresql/201807301600_IDEMPIERE-1052.sql @@ -0,0 +1,19 @@ +-- IDEMPIERE-1052: Improve Performance using Search instead of Table/Table Direct +-- Jul 30, 2018 4:01:01 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200590 +; + +-- Jul 30, 2018 4:01:07 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N',Updated=TO_TIMESTAMP('2018-07-30 16:01:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200588 +; + +-- Jul 30, 2018 4:01:21 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200593 +; + +-- Jul 30, 2018 4:01:33 PM CEST +UPDATE AD_Column SET AD_Reference_ID=30, FKConstraintType=NULL,Updated=TO_TIMESTAMP('2018-07-30 16:01:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200595 +; + +SELECT register_migration_script('201807301600_IDEMPIERE-1052.sql') FROM dual +; \ No newline at end of file From 46bdae37d7215c3288c193c9990d254f2703fd9a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 15 Dec 2018 17:28:30 +0100 Subject: [PATCH 23/23] IDEMPIERE-3766 Attachments is remove if storage is not available --- .../src/org/compiere/model/AttachmentFileSystem.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java b/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java index 3216485d3e..009c4a7df2 100644 --- a/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java +++ b/org.adempiere.base/src/org/compiere/model/AttachmentFileSystem.java @@ -220,6 +220,7 @@ public class AttachmentFileSystem implements IAttachmentStore { attach.m_items.add(entry); } else { log.severe("file not found: " + file.getAbsolutePath()); + attach.m_items.add(new MAttachmentEntry("~" + file.getName() + "~", "".getBytes(), attach.m_items.size() + 1)); } }