hg merge release-6.2 (merge release6.2 into default)

This commit is contained in:
Carlos Ruiz 2019-04-21 12:55:49 +02:00
commit 61ffa71f8c
19 changed files with 298 additions and 73 deletions

View File

@ -0,0 +1,15 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
-- Apr 18, 2019, 2:24:04 PM CEST
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_DATE('2019-04-18 14:24:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1619
;
-- Apr 18, 2019, 2:24:15 PM CEST
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_DATE('2019-04-18 14:24:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1643
;
SELECT register_migration_script('201904181424_IDEMPIERE-3874.sql') FROM dual
;

View File

@ -0,0 +1,55 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- sjeffen:
-- 10. apr. 2019 10.52.05 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','For',0,0,'Y',TO_DATE('2019-04-10 10:52:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:52:04','YYYY-MM-DD HH24:MI:SS'),100,200492,'For','D','261e6b45-140f-4105-a20a-3b490317d0ec')
;
-- 10. apr. 2019 10.52.42 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','this Client and Organization',0,0,'Y',TO_DATE('2019-04-10 10:52:41','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:52:41','YYYY-MM-DD HH24:MI:SS'),100,200493,'this Client and Organization','D','66aeeecc-fff7-4ff4-86f6-512198a41c93')
;
-- 10. apr. 2019 10.53.07 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','all Organizations of this Client',0,0,'Y',TO_DATE('2019-04-10 10:53:06','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:53:06','YYYY-MM-DD HH24:MI:SS'),100,200494,'all Organizations of this Client','D','ada1981e-3a7a-4b57-801a-b48ee0d970dd')
;
-- 10. apr. 2019 10.53.25 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','entire System',0,0,'Y',TO_DATE('2019-04-10 10:53:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:53:25','YYYY-MM-DD HH24:MI:SS'),100,200495,'entire System','D','6122979d-8153-44e1-bec8-94d989501719')
;
-- 10. apr. 2019 10.53.56 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','this User',0,0,'Y',TO_DATE('2019-04-10 10:53:56','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:53:56','YYYY-MM-DD HH24:MI:SS'),100,200496,'this User','D','e0e648b5-6778-4b08-8208-7ff419acc45f')
;
-- 10. apr. 2019 10.54.21 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','all Users',0,0,'Y',TO_DATE('2019-04-10 10:54:20','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:54:20','YYYY-MM-DD HH24:MI:SS'),100,200497,'all Users','D','e788b1d4-6a75-47f1-b406-3664263753f0')
;
-- 10. apr. 2019 10.54.42 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','and this Window',0,0,'Y',TO_DATE('2019-04-10 10:54:42','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:54:42','YYYY-MM-DD HH24:MI:SS'),100,200498,'and this Window','D','62ee5c8d-8e1a-4ddb-9670-4e8b3c38c719')
;
-- 10. apr. 2019 10.55.01 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','and all Windows',0,0,'Y',TO_DATE('2019-04-10 10:55:01','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:55:01','YYYY-MM-DD HH24:MI:SS'),100,200499,'and all Windows','D','baa13291-8bbf-4efb-8db5-99a3dcfdc263')
;
-- 10. apr. 2019 10.55.23 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','and this Process',0,0,'Y',TO_DATE('2019-04-10 10:55:23','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:55:23','YYYY-MM-DD HH24:MI:SS'),100,200500,'and this Process','D','29a050d6-dea8-436e-9b43-14d6ccd75d89')
;
-- 10. apr. 2019 10.55.47 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','and all Process',0,0,'Y',TO_DATE('2019-04-10 10:55:47','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:55:47','YYYY-MM-DD HH24:MI:SS'),100,200501,'and all Process','D','d7da7af7-3d7c-4294-817f-b1bc236c97bd')
;
-- 10. apr. 2019 10.56.08 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','and this Info Window',0,0,'Y',TO_DATE('2019-04-10 10:56:08','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:56:08','YYYY-MM-DD HH24:MI:SS'),100,200502,'and this Info Window','D','1ab5c8ba-f285-4ef9-a219-adb77c7fd86b')
;
-- 10. apr. 2019 10.56.25 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','and all Info Window',0,0,'Y',TO_DATE('2019-04-10 10:56:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2019-04-10 10:56:25','YYYY-MM-DD HH24:MI:SS'),100,200503,'and all Info Window','D','a122402b-89ad-4694-979a-065aa64fd704')
;
SELECT register_migration_script('201904182132_IDEMPIERE-3950.sql') FROM dual
;

View File

@ -0,0 +1,12 @@
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
-- Apr 18, 2019, 2:24:04 PM CEST
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_TIMESTAMP('2019-04-18 14:24:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1619
;
-- Apr 18, 2019, 2:24:15 PM CEST
UPDATE AD_Column SET Callout='org.compiere.model.CalloutGLJournal.period',Updated=TO_TIMESTAMP('2019-04-18 14:24:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=1643
;
SELECT register_migration_script('201904181424_IDEMPIERE-3874.sql') FROM dual
;

View File

@ -0,0 +1,52 @@
-- sjeffen:
-- 10. apr. 2019 10.52.05 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','For',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:52:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:52:04','YYYY-MM-DD HH24:MI:SS'),100,200492,'For','D','261e6b45-140f-4105-a20a-3b490317d0ec')
;
-- 10. apr. 2019 10.52.42 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','this Client and Organization',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:52:41','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:52:41','YYYY-MM-DD HH24:MI:SS'),100,200493,'this Client and Organization','D','66aeeecc-fff7-4ff4-86f6-512198a41c93')
;
-- 10. apr. 2019 10.53.07 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','all Organizations of this Client',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:53:06','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:53:06','YYYY-MM-DD HH24:MI:SS'),100,200494,'all Organizations of this Client','D','ada1981e-3a7a-4b57-801a-b48ee0d970dd')
;
-- 10. apr. 2019 10.53.25 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','entire System',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:53:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:53:25','YYYY-MM-DD HH24:MI:SS'),100,200495,'entire System','D','6122979d-8153-44e1-bec8-94d989501719')
;
-- 10. apr. 2019 10.53.56 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','this User',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:53:56','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:53:56','YYYY-MM-DD HH24:MI:SS'),100,200496,'this User','D','e0e648b5-6778-4b08-8208-7ff419acc45f')
;
-- 10. apr. 2019 10.54.21 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','all Users',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:54:20','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:54:20','YYYY-MM-DD HH24:MI:SS'),100,200497,'all Users','D','e788b1d4-6a75-47f1-b406-3664263753f0')
;
-- 10. apr. 2019 10.54.42 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','and this Window',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:54:42','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:54:42','YYYY-MM-DD HH24:MI:SS'),100,200498,'and this Window','D','62ee5c8d-8e1a-4ddb-9670-4e8b3c38c719')
;
-- 10. apr. 2019 10.55.01 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','and all Windows',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:55:01','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:55:01','YYYY-MM-DD HH24:MI:SS'),100,200499,'and all Windows','D','baa13291-8bbf-4efb-8db5-99a3dcfdc263')
;
-- 10. apr. 2019 10.55.23 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','and this Process',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:55:23','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:55:23','YYYY-MM-DD HH24:MI:SS'),100,200500,'and this Process','D','29a050d6-dea8-436e-9b43-14d6ccd75d89')
;
-- 10. apr. 2019 10.55.47 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','and all Process',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:55:47','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:55:47','YYYY-MM-DD HH24:MI:SS'),100,200501,'and all Process','D','d7da7af7-3d7c-4294-817f-b1bc236c97bd')
;
-- 10. apr. 2019 10.56.08 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','and this Info Window',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:56:08','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:56:08','YYYY-MM-DD HH24:MI:SS'),100,200502,'and this Info Window','D','1ab5c8ba-f285-4ef9-a219-adb77c7fd86b')
;
-- 10. apr. 2019 10.56.25 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','and all Info Window',0,0,'Y',TO_TIMESTAMP('2019-04-10 10:56:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2019-04-10 10:56:25','YYYY-MM-DD HH24:MI:SS'),100,200503,'and all Info Window','D','a122402b-89ad-4694-979a-065aa64fd704')
;
SELECT register_migration_script('201904182132_IDEMPIERE-3950.sql') FROM dual
;

View File

@ -53,7 +53,6 @@ public class CalloutGLJournal extends CalloutEngine
if (value == null)
return "";
int AD_Client_ID = Env.getContextAsInt(ctx, WindowNo, "AD_Client_ID");
Timestamp DateAcct = null;
if (colName.equals("DateAcct"))
DateAcct = (Timestamp)value;
@ -69,8 +68,8 @@ public class CalloutGLJournal extends CalloutEngine
mTab.setValue("DateAcct", value);
}
// When DateAcct is changed, set C_Period_ID
else if (colName.equals("DateAcct"))
// When DateAcct/Org is changed, set C_Period_ID
else if (colName.equals("DateAcct") || colName.equals("AD_Org_ID"))
{
String sql = "SELECT C_Period_ID "
+ "FROM C_Period "
@ -122,16 +121,12 @@ public class CalloutGLJournal extends CalloutEngine
rs = pstmt.executeQuery();
if (rs.next())
{
String PeriodType = rs.getString(1);
Timestamp StartDate = rs.getTimestamp(2);
Timestamp EndDate = rs.getTimestamp(3);
if (PeriodType.equals("S")) // Standard Periods
{
// out of range - set to last day
if (DateAcct == null
|| DateAcct.before(StartDate) || DateAcct.after(EndDate))
mTab.setValue("DateAcct", EndDate);
}
// out of range - set to last day
if (DateAcct == null
|| DateAcct.before(StartDate) || DateAcct.after(EndDate))
mTab.setValue("DateAcct", EndDate);
}
}
catch (SQLException e)

View File

@ -322,7 +322,10 @@ public class MJournal extends X_GL_Journal implements DocAction
}
else if (C_Period_ID != getC_Period_ID())
{
setC_Period_ID(C_Period_ID);
/* special case when assigning an adjustment period */
MPeriod currentPeriod = MPeriod.get(getCtx(), getC_Period_ID());
if (currentPeriod.isStandardPeriod())
setC_Period_ID(C_Period_ID);
}
}

View File

@ -54,7 +54,7 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
/**
*
*/
private static final long serialVersionUID = 3424249393848608297L;
private static final long serialVersionUID = 5920767495976301905L;
/**
* Create new Journal Batch by copying
@ -954,7 +954,10 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
}
else if (C_Period_ID != getC_Period_ID())
{
setC_Period_ID(C_Period_ID);
/* special case when assigning an adjustment period */
MPeriod currentPeriod = MPeriod.get(getCtx(), getC_Period_ID());
if (currentPeriod.isStandardPeriod())
setC_Period_ID(C_Period_ID);
}
}

View File

@ -373,6 +373,16 @@ public class MPeriod extends X_C_Period
orgID = po.get_ValueAsInt(idxorg);
}
if (tableID == MJournal.Table_ID || tableID == MJournalBatch.Table_ID) {
// special case for journal that has direct period
int periodID = po.get_ValueAsInt("C_Period_ID");
MPeriod period = MPeriod.get(ctx, periodID);
boolean open = period.isOpen(docBaseType, dateAcct);
if (!open)
s_log.warning(period.getName() + ": Not open for " + docBaseType + " (" + dateAcct + ")");
return open;
}
return isOpen(ctx, dateAcct, docBaseType, orgID);
} // isOpen

View File

@ -32,7 +32,7 @@ public class CLogger extends Logger implements Serializable
/**
*
*/
private static final long serialVersionUID = 6492376264463028357L;
private static final long serialVersionUID = -4015949992093043663L;
private static final String LAST_INFO = "org.compiere.util.CLogger.lastInfo";
private static final String LAST_WARNING = "org.compiere.util.CLogger.lastWarning";
private static final String LAST_ERROR = "org.compiere.util.CLogger.lastError";

View File

@ -38,7 +38,7 @@ chmod 640 $IDEMPIERE_HOME/data/ExpDat.dmp
echo -------------------------------------
echo Import ExpDat
echo -------------------------------------
impdp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDat.dmp SCHEMAS=$2
impdp $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=ExpDat.dmp SCHEMAS=$2
echo -------------------------------------
echo Check System

View File

@ -42,7 +42,7 @@ echo -------------------------------------
echo Import Adempiere.dmp
echo -------------------------------------
echo "impdp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=Adempiere.dmp REMAP_SCHEMA=reference:$2"
impdp $1@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=Adempiere.dmp REMAP_SCHEMA=reference:$2
impdp $2/$3@$ADEMPIERE_DB_SERVER:$ADEMPIERE_DB_PORT/$ADEMPIERE_DB_NAME DIRECTORY=ADEMPIERE_DATA_PUMP_DIR DUMPFILE=Adempiere.dmp REMAP_SCHEMA=reference:$2
echo -------------------------------------
echo Check System

View File

@ -580,7 +580,7 @@ start () {
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep $SLEEPSECONDS
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -2,13 +2,13 @@
#
### BEGIN INIT INFO
# Provides: idempiere
# Provides: idempiere
# Required-Start: postgresql
# Required-Stop: postgresql
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: iDempiere 1.0.0 server
# Description: Provides iDempiere ERP-CRM Server startup and shutdown script. Requires PostgreSQL server.
# Description: Provides iDempiere ERP-CRM Server startup and shutdown script. Requires PostgreSQL server.
# FileTarget: /etc/init.d/idempiere
# FileOwner: root.root
# FilePerms: 0755
@ -57,7 +57,7 @@ start () {
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -53,7 +53,7 @@ start () {
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -83,7 +83,7 @@ start () {
ITERATIONS=0
while [ $STATUSTEST -eq 0 ] ; do
sleep 2
tail -n 9 $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
cat $LOGFILE | grep -q '.*LoggedSessionListener.contextInitialized: context initialized.*' && STATUSTEST=1
echo -n "."
ITERATIONS=`expr $ITERATIONS + 1`
if [ $ITERATIONS -gt $MAXITERATIONS ]

View File

@ -27,6 +27,7 @@ import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Row;
@ -53,9 +54,8 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
import org.zkoss.zul.Hlayout;
import org.zkoss.zul.Separator;
import org.zkoss.zul.Space;
import org.zkoss.zul.Vbox;
import org.zkoss.zul.Vlayout;
/**
* Maintain Value Preferences.
@ -270,10 +270,12 @@ public class ValuePreference extends Window implements EventListener<Event>
private Grid setLayout = new Grid();
private Label lAttribute = new Label();
private Textbox fAttribute = new Textbox();
private Label lAttributeValue = new Label();
private Textbox fAttributeValue = new Textbox();
private Label lValue = new Label();
private Label lValueValue = new Label();
private Textbox fValue = new Textbox();
private Label lidValue = new Label();
private Textbox fidValue = new Textbox();
private Label lSetFor = new Label();
private Checkbox cbClient = new Checkbox();
private Checkbox cbOrg = new Checkbox();
@ -297,9 +299,13 @@ public class ValuePreference extends Window implements EventListener<Event>
*/
private void init() throws Exception
{
//
setSclass("popup-dialog");
Vlayout vlayout = new Vlayout();
vlayout.setHflex("1");
this.appendChild(vlayout);
lAttribute.setValue(Msg.translate(m_ctx, "Attribute").replace("&", ""));
lValue.setValue(Msg.translate(m_ctx, "Value").replace("&", ""));
lidValue.setValue("Id");
lSetFor.setValue(Msg.getMsg(m_ctx, "ValuePreferenceSetFor"));
cbClient.setLabel(Msg.translate(m_ctx, "AD_Client_ID"));
cbOrg.setLabel(Msg.translate(m_ctx, "AD_Org_ID"));
@ -315,36 +321,46 @@ public class ValuePreference extends Window implements EventListener<Event>
setPanel.appendChild(setLayout);
ZKUpdateUtil.setHflex(setPanel, "1");
fAttribute.setReadonly(true);
fAttributeValue.setReadonly(true);
fValue.setReadonly(true);
Vbox box = new Vbox();
ZKUpdateUtil.setWidth(box, "100%");
ZKUpdateUtil.setHeight(box, "100%");
box.setParent(this);
ZKUpdateUtil.setHflex(box, "1");
box.appendChild(setPanel);
Grid grid = GridFactory.newGridLayout();
grid.setStyle("background-image: none;");
LayoutUtils.addSclass("dialog-content", grid);
vlayout.appendChild(grid);
Rows rows = new Rows();
rows.setParent(setLayout);
grid.appendChild(rows);
Row row = new Row();
Div div = new Div();
div.setStyle("text-align: right");
div.appendChild(lAttribute);
row.appendCellChild(div, 1);
row.appendCellChild(fAttribute, 4);
ZKUpdateUtil.setWidth(fAttribute, "96%");
row.appendCellChild(lAttributeValue, 1);
row.appendCellChild(fAttribute, 3);
ZKUpdateUtil.setWidth(fAttribute, "98%");
row.appendCellChild(fAttributeValue, 3);
fAttributeValue.setWidth("98%");
rows.appendChild(row);
row = new Row();
div = new Div();
div.setStyle("text-align: right");
div.appendChild(lidValue);
row.appendCellChild(div, 1);
row.appendCellChild(fidValue, 6);
fidValue.setWidth("99%");
fidValue.setReadonly(true);
rows.appendChild(row);
rows.appendChild(row);
row = new Row();
div = new Div();
div.setStyle("text-align: right");
div.appendChild(lValue);
row.appendCellChild(div, 1);
row.appendCellChild(fValue, 4);
ZKUpdateUtil.setWidth(fValue, "96%");
row.appendCellChild(lValueValue, 1);
row.appendCellChild(fValue, 6);
ZKUpdateUtil.setWidth(fValue, "99%");
rows.appendChild(row);
row = new Row();
@ -357,6 +373,7 @@ public class ValuePreference extends Window implements EventListener<Event>
chlayout.appendChild(cbClient);
chlayout.appendChild(cbOrg);
chlayout.appendChild(cbUser);
if(isProcessInIW){
// in case show process in info window, don't show checkbox window in value preference dialog.
// must set is checked to save current windowID (dummy) with value preference other it will save null,
@ -376,25 +393,26 @@ public class ValuePreference extends Window implements EventListener<Event>
row.appendCellChild(chlayout, 5);
rows.appendChild(row);
row = new Row();
row.appendCellChild(new Space(), 1);
row.appendCellChild(lExplanation, 5);
rows.appendChild(row);
//
Separator separator = new Separator();
ZKUpdateUtil.setHeight(separator, "10px");
box.appendChild(separator);
box.appendChild(confirmPanel);
this.setBorder("normal");
setLayout.makeNoStrip();
setLayout.setOddRowSclass("even");
Div footer = new Div();
vlayout.appendChild(footer);
if (!ThemeManager.isUseCSSForWindowSize()) {
ZKUpdateUtil.setWindowWidthX(this, 500);
}
else
{
ZKUpdateUtil.setWindowWidthX(this, 740);
}
confirmPanel.setVflex("min");
confirmPanel.setClass("dialog-footer");
footer.appendChild(confirmPanel);
this.setSizable(true);
this.setSclass("value-preference-dialog");
} // jbInit
@ -406,12 +424,13 @@ public class ValuePreference extends Window implements EventListener<Event>
{
// Set Attribute/Value
fAttribute.setText(m_DisplayAttribute);
lAttributeValue.setValue(m_Attribute);
fAttributeValue.setValue(m_Attribute);
fValue.setText(m_DisplayValue);
fidValue.setText(m_Value);
lValueValue.setValue(m_Value);
if (CLogMgt.isLevelFine())
{
lAttributeValue.setVisible(false);
fAttributeValue.setVisible(false);
lValueValue.setVisible(false);
}
@ -484,48 +503,45 @@ public class ValuePreference extends Window implements EventListener<Event>
private void setExplanation()
{
/** @todo translation */
StringBuilder expl = new StringBuilder("For ");
StringBuilder expl = new StringBuilder(Msg.getCleanMsg(Env.getCtx(), "For")).append(" ");
if (cbClient.isChecked() && cbOrg.isChecked() )
expl.append("this Client and Organization");
expl.append(Msg.getCleanMsg(Env.getCtx(), "this Client and Organization"));
else if (cbClient.isChecked() && !cbOrg.isChecked())
expl.append("all Organizations of this Client");
expl.append(Msg.getCleanMsg(Env.getCtx(), "all Organizations of this Client"));
else if (!cbClient.isChecked() && cbOrg.isChecked())
{
cbOrg.setChecked(false);
expl.append("entire System");
expl.append(Msg.getCleanMsg(Env.getCtx(), "entire System"));
}
else
expl.append("entire System");
expl.append(Msg.getCleanMsg(Env.getCtx(), "entire System"));
//
if (cbUser.isChecked())
expl.append(", this User");
expl.append(", " + Msg.getCleanMsg(Env.getCtx(), "this User"));
else
expl.append(", all Users");
expl.append(", " + Msg.getCleanMsg(Env.getCtx(), "all Users"));
//
if (cbWindow.isChecked())
expl.append(" and this Window");
expl.append(" " + Msg.getCleanMsg(Env.getCtx(), "and this Window"));
else
expl.append(" and all Windows");
expl.append(" " + Msg.getCleanMsg(Env.getCtx(), "and all Windows"));
//
if (m_AD_Process_ID_Of_Panel > 0){
if (cbProcess.isChecked())
expl.append(" and this Process");
expl.append(" " + Msg.getCleanMsg(Env.getCtx(), "and this Process"));
else
expl.append(" and all Process");
expl.append(" " + Msg.getCleanMsg(Env.getCtx(), "and all Process"));
}
//
if (m_AD_Infowindow_ID > 0){
if (cbInfowindow.isChecked())
expl.append(" and this Info Window");
expl.append(" " + Msg.getCleanMsg(Env.getCtx(),"and this Info Window"));
else
expl.append(" and all Info Window");
expl.append(" " + Msg.getCleanMsg(Env.getCtx(),"and all Info Window"));
}
//
if (Env.getLanguage(Env.getCtx()).isBaseLanguage())
{
lExplanation.setValue(expl.toString ());
}
lExplanation.setValue(expl.toString ());
} // setExplanation
/**

View File

@ -673,7 +673,7 @@ ContextMenuListener, IZoomableEditor
else if (WEditorPopupMenu.PREFERENCE_EVENT.equals(evt.getContextEvent()))
{
if (isShowPreference())
ValuePreference.start (getComponent(), this.getGridField(), getValue());
ValuePreference.start (getComponent(), this.getGridField(), getValue(), getDisplay());
return;
}
else if (WEditorPopupMenu.NEW_EVENT.equals(evt.getContextEvent()))

View File

@ -134,11 +134,31 @@ public abstract class ADForm extends Window implements EventListener<Event>, IHe
*/
public static ADForm openForm (int adFormID)
{
return openForm(adFormID, null);
return openForm(adFormID, null, null);
}
/**
* Open a form base on it's ID
*
* @param adFormID
* @param gridTab
* @return
*/
public static ADForm openForm (int adFormID, GridTab gridTab)
{
return openForm(adFormID, gridTab, null);
}
/**
* Open a form base on it's ID and a Process Info parameters
*
* @param adFormID
* @param gridTab
* @param pi
* @return
*/
public static ADForm openForm (int adFormID, GridTab gridTab, ProcessInfo pi)
{
ADForm form;
MForm mform = new MForm(Env.getCtx(), adFormID, null);
String formName = mform.getClassname();
@ -156,6 +176,7 @@ public abstract class ADForm extends Window implements EventListener<Event>, IHe
if (form != null)
{
form.gridTab = gridTab;
form.setProcessInfo(pi);
form.init(adFormID, name);
return form;
}

View File

@ -2044,6 +2044,49 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
MPInstance instance = new MPInstance(Env.getCtx(), processId, 0);
instance.saveEx();
final int pInstanceID = instance.getAD_PInstance_ID();
// devCoffee - enable use of special forms from process related with info windows
m_pi.setAD_PInstance_ID(pInstanceID);
int adFormID = m_process.getAD_Form_ID();
if (adFormID != 0 )
{
String title = m_process.getName();
if (title == null || title.length() == 0)
title = m_process.getValue();
// store in T_Selection table selected rows for Execute Process that retrieves from T_Selection in code.
DB.createT_SelectionNew(pInstanceID, getSaveKeys(getInfoColumnIDFromProcess(processId)), null);
ADForm form = ADForm.openForm(adFormID, null, m_pi);
Mode mode = form.getWindowMode();
form.setAttribute(Window.MODE_KEY, form.getWindowMode());
form.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT);
if (mode == Mode.HIGHLIGHTED || mode == Mode.MODAL) {
form.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
;
}
});
form.doHighlighted();
form.focus();
}
else {
form.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
updateListSelected();
recordSelectedData.clear();
Clients.response(new AuEcho(InfoPanel.this, "onQueryCallback", null));
onUserQuery();
}
});
SessionManager.getAppDesktop().showWindow(form);
}
return;
}
// Execute Process
m_pi.setAD_PInstance_ID(pInstanceID);
m_pi.setAD_InfoWindow_ID(infoWindow.getAD_InfoWindow_ID());