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

This commit is contained in:
Carlos Ruiz 2019-02-09 16:41:13 +01:00
commit 6c0a7110b5
23 changed files with 132 additions and 63 deletions

View File

@ -143,8 +143,8 @@ public class ImportPayment extends SvrProcess
.append(" OR b.SwiftCode=i.RoutingNo ") .append(" OR b.SwiftCode=i.RoutingNo ")
.append(") ") .append(") ")
.append("WHERE i.C_BankAccount_ID IS NULL ") .append("WHERE i.C_BankAccount_ID IS NULL ")
.append("AND i.I_IsImported<>'Y' ") .append("AND (i.I_IsImported<>'Y' ")
.append("OR i.I_IsImported IS NULL").append(clientCheck); .append("OR i.I_IsImported IS NULL)").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0) if (no != 0)
if (log.isLoggable(Level.INFO)) log.info("Bank Account (With Routing No)=" + no); if (log.isLoggable(Level.INFO)) log.info("Bank Account (With Routing No)=" + no);
@ -160,8 +160,8 @@ public class ImportPayment extends SvrProcess
.append(" AND a.AD_Client_ID=i.AD_Client_ID ") .append(" AND a.AD_Client_ID=i.AD_Client_ID ")
.append(") ") .append(") ")
.append("WHERE i.C_BankAccount_ID IS NULL ") .append("WHERE i.C_BankAccount_ID IS NULL ")
.append("AND i.I_isImported<>'Y' ") .append("AND (i.I_isImported<>'Y' ")
.append("OR i.I_isImported IS NULL").append(clientCheck); .append("OR i.I_isImported IS NULL)").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0) if (no != 0)
if (log.isLoggable(Level.INFO)) log.info("Bank Account (Without Routing No)=" + no); if (log.isLoggable(Level.INFO)) log.info("Bank Account (Without Routing No)=" + no);
@ -171,8 +171,8 @@ public class ImportPayment extends SvrProcess
sql.append(" and a.AD_Client_ID=i.AD_Client_ID) ") sql.append(" and a.AD_Client_ID=i.AD_Client_ID) ")
.append("WHERE i.C_BankAccount_ID IS NULL ") .append("WHERE i.C_BankAccount_ID IS NULL ")
.append("AND i.BankAccountNo IS NULL ") .append("AND i.BankAccountNo IS NULL ")
.append("AND i.I_isImported<>'Y' ") .append("AND (i.I_isImported<>'Y' ")
.append("OR i.I_isImported IS NULL").append(clientCheck); .append("OR i.I_isImported IS NULL)").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0) if (no != 0)
if (log.isLoggable(Level.INFO)) log.info("Bank Account=" + no); if (log.isLoggable(Level.INFO)) log.info("Bank Account=" + no);
@ -180,8 +180,8 @@ public class ImportPayment extends SvrProcess
sql = new StringBuilder("UPDATE I_Payment ") sql = new StringBuilder("UPDATE I_Payment ")
.append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Bank Account, ' ") .append("SET I_isImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid Bank Account, ' ")
.append("WHERE C_BankAccount_ID IS NULL ") .append("WHERE C_BankAccount_ID IS NULL ")
.append("AND I_isImported<>'Y' ") .append("AND (I_isImported<>'Y' ")
.append("OR I_isImported IS NULL").append(clientCheck); .append("OR I_isImported IS NULL)").append(clientCheck);
no = DB.executeUpdate(sql.toString(), get_TrxName()); no = DB.executeUpdate(sql.toString(), get_TrxName());
if (no != 0) if (no != 0)
log.warning("Invalid Bank Account=" + no); log.warning("Invalid Bank Account=" + no);
@ -408,7 +408,7 @@ public class ImportPayment extends SvrProcess
//Import Bank Statement //Import Bank Statement
sql = new StringBuilder("SELECT * FROM I_Payment") sql = new StringBuilder("SELECT * FROM I_Payment")
.append(" WHERE I_IsImported='N'") .append(" WHERE I_IsImported='N'").append(clientCheck)
.append(" ORDER BY C_BankAccount_ID, CheckNo, DateTrx, R_AuthCode"); .append(" ORDER BY C_BankAccount_ID, CheckNo, DateTrx, R_AuthCode");
MBankAccount account = null; MBankAccount account = null;

View File

@ -126,6 +126,8 @@ public class MMeasureCalc extends X_PA_MeasureCalc
.append(DB.TO_DATE(reportDate)).append(",'").append(trunc).append("')"); .append(DB.TO_DATE(reportDate)).append(",'").append(trunc).append("')");
} // date } // date
String sql = addRestrictions(sb.toString(), restrictions, role); String sql = addRestrictions(sb.toString(), restrictions, role);
if (sql.indexOf("@") >= 0)
sql = Env.parseContext(getCtx(), 0, sql.toString(), false, false);
log.fine(sql); log.fine(sql);
return sql; return sql;
@ -191,6 +193,8 @@ public class MMeasureCalc extends X_PA_MeasureCalc
if (groupBy != null) if (groupBy != null)
sql += " GROUP BY " + groupBy sql += " GROUP BY " + groupBy
+ " ORDER BY " + groupBy; // teo_sarca, [ 1665129 ] Bar Graph is not ordered + " ORDER BY " + groupBy; // teo_sarca, [ 1665129 ] Bar Graph is not ordered
if (sql.indexOf("@") >= 0)
sql = Env.parseContext(getCtx(), 0, sql, false, false);
// //
log.fine(sql); log.fine(sql);
return sql; return sql;

View File

@ -798,9 +798,9 @@ public class MOrderLine extends X_C_OrderLine
setHeaderInfo(getParent()); setHeaderInfo(getParent());
// R/O Check - Product/Warehouse Change // R/O Check - Product/Warehouse Change/Attribute set instance
if (!newRecord if (!newRecord
&& (is_ValueChanged("M_Product_ID") || is_ValueChanged("M_Warehouse_ID"))) && (is_ValueChanged("M_Product_ID") || is_ValueChanged("M_Warehouse_ID") || is_ValueChanged("M_AttributeSetInstance_ID")))
{ {
if (!canChangeWarehouse()) if (!canChangeWarehouse())
return false; return false;

View File

@ -59,6 +59,7 @@ import org.compiere.model.MClient;
import org.compiere.model.MColumn; import org.compiere.model.MColumn;
import org.compiere.model.MLookupCache; import org.compiere.model.MLookupCache;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.compiere.model.MRefList;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.MSession; import org.compiere.model.MSession;
import org.compiere.model.MSysConfig; import org.compiere.model.MSysConfig;
@ -1686,6 +1687,12 @@ public final class Env
} }
} }
} }
} else if (v instanceof String && !Util.isEmpty((String) v) && !Util.isEmpty(foreignTable) && foreignTable.equals(MRefList.Table_Name) && !Util.isEmpty(format)) {
int refID = colToken.getAD_Reference_Value_ID();
if (format.equals("Name"))
outStr.append(MRefList.getListName(getCtx(), refID, (String) v));
else if (format.equals("Description"))
outStr.append(MRefList.getListDescription(getCtx(), DB.getSQLValueStringEx(null, "SELECT Name FROM AD_Reference WHERE AD_Reference_ID = ?", refID), (String) v));
} else if (v instanceof Date) { } else if (v instanceof Date) {
SimpleDateFormat df = new SimpleDateFormat(format); SimpleDateFormat df = new SimpleDateFormat(format);
outStr.append(df.format((Date)v)); outStr.append(df.format((Date)v));

View File

@ -296,6 +296,7 @@ public class ConfigurationData
} }
InetAddress localhost = null; InetAddress localhost = null;
@SuppressWarnings("unused")
String hostName = "unknown"; String hostName = "unknown";
try try
{ {
@ -318,7 +319,7 @@ public class ConfigurationData
setKeyStore(KEYSTORE_PASSWORD); setKeyStore(KEYSTORE_PASSWORD);
// AppsServer // AppsServer
initAppsServer(); initAppsServer();
setAppsServer(hostName); setAppsServer("0.0.0.0");
// Database Server // Database Server
initDatabase(Database.DB_POSTGRESQL); initDatabase(Database.DB_POSTGRESQL);
String connectionName = getDatabaseDiscovered(); String connectionName = getDatabaseDiscovered();
@ -326,18 +327,16 @@ public class ConfigurationData
setDatabaseName(resolveDatabaseName(connectionName)); setDatabaseName(resolveDatabaseName(connectionName));
} }
setDatabaseSystemPassword(""); setDatabaseSystemPassword("");
setDatabaseServer(hostName); setDatabaseServer("localhost");
setDatabaseUser("adempiere"); setDatabaseUser("adempiere");
setDatabasePassword("adempiere"); setDatabasePassword("adempiere");
// Mail Server // Mail Server
if (p_panel != null) setMailServer("localhost");
{ //setMailUser("info");
p_panel.fMailServer.setText(hostName); setMailUser("");
p_panel.fMailUser.setText("info"); setMailPassword("");
p_panel.fMailPassword.setText(""); //setAdminEMail("info@" + hostName);
p_panel.fAdminEMail.setText("info@" + hostName); setAdminEMail("");
}
//
} // !envLoaded } // !envLoaded
// Default FTP stuff // Default FTP stuff
@ -535,24 +534,28 @@ public class ConfigurationData
? p_panel.fAdminEMail.getText() ? p_panel.fAdminEMail.getText()
: (String)p_properties.get(ADEMPIERE_ADMIN_EMAIL); : (String)p_properties.get(ADEMPIERE_ADMIN_EMAIL);
InternetAddress adminEMail = null; InternetAddress adminEMail = null;
try if (adminEMailString != null && adminEMailString.length() > 0) {
{ try
adminEMail = new InternetAddress (adminEMailString); {
} adminEMail = new InternetAddress (adminEMailString);
catch (Exception e) }
{ catch (Exception e)
error = "Not valid: " + adminEMailString + " - " + e.getMessage(); {
error = "Not valid: " + adminEMailString + " - " + e.getMessage();
pass = false;
}
//
if (pass)
{
error = "Not verified EMail = " + adminEMail;
pass = testMailServer(mailServer, adminEMail, mailUser, mailPassword);
}
if (p_panel != null)
p_panel.signalOK(p_panel.okMailUser, "ErrorMail",
pass, false, error);
} else {
pass = false; pass = false;
} }
//
if (pass)
{
error = "Not verified EMail = " + adminEMail;
pass = testMailServer(mailServer, adminEMail, mailUser, mailPassword);
}
if (p_panel != null)
p_panel.signalOK(p_panel.okMailUser, "ErrorMail",
pass, false, error);
if (pass) if (pass)
{ {
if (log.isLoggable(Level.INFO)) log.info("OK: EMail = " + adminEMail); if (log.isLoggable(Level.INFO)) log.info("OK: EMail = " + adminEMail);
@ -563,7 +566,11 @@ public class ConfigurationData
} }
else else
{ {
log.warning(error); if (adminEMailString != null && adminEMailString.length() > 0) {
log.warning(error);
} else {
if (log.isLoggable(Level.INFO)) log.info("OK: EMail not configured");
}
p_properties.setProperty(ADEMPIERE_ADMIN_EMAIL, ""); p_properties.setProperty(ADEMPIERE_ADMIN_EMAIL, "");
p_properties.setProperty(ADEMPIERE_MAIL_USER, ""); p_properties.setProperty(ADEMPIERE_MAIL_USER, "");
p_properties.setProperty(ADEMPIERE_MAIL_PASSWORD, ""); p_properties.setProperty(ADEMPIERE_MAIL_PASSWORD, "");

View File

@ -602,6 +602,8 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
} }
if (!pass && critical) if (!pass && critical)
cb.setBackground(Color.RED); cb.setBackground(Color.RED);
else if (!pass && !critical)
cb.setBackground(Color.YELLOW);
else else
cb.setBackground(Color.GREEN); cb.setBackground(Color.GREEN);
} // setOK } // setOK

View File

@ -300,7 +300,7 @@ public class KeyStoreMgt
: System.getProperty("user.name"); : System.getProperty("user.name");
String o = mgt.organizationUnit != null String o = mgt.organizationUnit != null
? mgt.organizationUnit ? mgt.organizationUnit
: "AdempiereUser"; : "iDempiereUser";
String l = mgt.location != null String l = mgt.location != null
? mgt.location ? mgt.location
: "MyTown"; : "MyTown";

View File

@ -99,6 +99,7 @@ public class Setup_Help extends JDialog implements ActionListener
} }
catch (Exception ex) catch (Exception ex)
{ {
ex.printStackTrace();
} }
} // init } // init
@ -139,7 +140,7 @@ public class Setup_Help extends JDialog implements ActionListener
{ {
try try
{ {
editorPane.setPage("http://www.adempiere.com/wiki/index.php/ServerSetupHelp"); editorPane.setPage("http://wiki.idempiere.org/en/Server_Setup_Help");
} }
catch (IOException ex) catch (IOException ex)
{ {

View File

@ -322,7 +322,7 @@ public class ConfigurationConsole {
cn = System.getProperty("user.name"); cn = System.getProperty("user.name");
String ou = data.getProperty(ConfigurationData.ADEMPIERE_CERT_ORG_UNIT); String ou = data.getProperty(ConfigurationData.ADEMPIERE_CERT_ORG_UNIT);
if (ou == null) if (ou == null)
ou = "AdempiereUser"; ou = "iDempiereUser";
String o = data.getProperty(ConfigurationData.ADEMPIERE_CERT_ORG); String o = data.getProperty(ConfigurationData.ADEMPIERE_CERT_ORG);
if (o == null) if (o == null)
o = System.getProperty("user.name"); o = System.getProperty("user.name");

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 936 B

View File

@ -20,6 +20,7 @@ import java.awt.Dimension;
import java.awt.Insets; import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.net.URL;
import javax.swing.AbstractAction; import javax.swing.AbstractAction;
import javax.swing.AbstractButton; import javax.swing.AbstractButton;
@ -33,6 +34,7 @@ import javax.swing.JMenuItem;
import javax.swing.JToggleButton; import javax.swing.JToggleButton;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import org.compiere.install.ConfigurationPanel;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Msg; import org.compiere.util.Msg;
@ -178,8 +180,11 @@ public final class AppsAction extends AbstractAction
*/ */
private ImageIcon getIcon(String name, boolean small) private ImageIcon getIcon(String name, boolean small)
{ {
String fullName = name + (small ? "16" : "24"); String fullName = name + (small ? "16" : "24") + ".gif";
return Env.getImageIcon2(fullName); URL imageURL = ConfigurationPanel.class.getResource("images/"+fullName);
if (imageURL == null)
return null;
return new ImageIcon(imageURL);
} // getIcon } // getIcon
/** /**

View File

@ -94,7 +94,7 @@ public class OnlineHelp extends JEditorPane implements HyperlinkListener
} // OnlineHelp } // OnlineHelp
/** Base of Online Help System */ /** Base of Online Help System */
protected static final String BASE_URL = "http://www.adempiere.com/wiki/index.php/OnlineLoginHelp"; protected static final String BASE_URL = "http://wiki.idempiere.org/en/Server_Setup_Help";
public static void openInDefaultBrowser() public static void openInDefaultBrowser()
{ {

View File

@ -40,8 +40,10 @@ import org.adempiere.pipo2.PackOut;
import org.adempiere.pipo2.PackoutItem; import org.adempiere.pipo2.PackoutItem;
import org.adempiere.pipo2.SQLElementParameters; import org.adempiere.pipo2.SQLElementParameters;
import org.compiere.model.X_AD_Package_Imp_Detail; import org.compiere.model.X_AD_Package_Imp_Detail;
import org.compiere.util.CacheMgt;
import org.compiere.util.DB; import org.compiere.util.DB;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Util;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl; import org.xml.sax.helpers.AttributesImpl;
@ -89,6 +91,15 @@ public class SQLMandatoryElementHandler extends AbstractElementHandler {
} }
logImportDetail (ctx, impDetail, 1, "SQLMandatory",count,"Execute"); logImportDetail (ctx, impDetail, 1, "SQLMandatory",count,"Execute");
ctx.packIn.getNotifier().addSuccessLine("-> " + sql); ctx.packIn.getNotifier().addSuccessLine("-> " + sql);
// Cache Reset when deleting records via SQL
if (sql.toLowerCase().startsWith("delete from ")) {
String[] words = sql.split("[ \r\n]");
String table = words[2];
String tableName = DB.getSQLValueString(null, "SELECT TableName FROM AD_Table WHERE LOWER(TableName)=?", table.toLowerCase());
if (! Util.isEmpty(tableName)) {
CacheMgt.get().reset(tableName);
}
}
} catch (Exception e) { } catch (Exception e) {
ctx.packIn.getNotifier().addFailureLine("SQL Mandatory failed, error (" + e.getLocalizedMessage() + "):"); ctx.packIn.getNotifier().addFailureLine("SQL Mandatory failed, error (" + e.getLocalizedMessage() + "):");
logImportDetail (ctx, impDetail, 0, "SQLMandatory",-1,"Execute"); logImportDetail (ctx, impDetail, 0, "SQLMandatory",-1,"Execute");

View File

@ -31,9 +31,11 @@ import org.adempiere.pipo2.PackOut;
import org.adempiere.pipo2.PackoutItem; import org.adempiere.pipo2.PackoutItem;
import org.adempiere.pipo2.SQLElementParameters; import org.adempiere.pipo2.SQLElementParameters;
import org.compiere.model.X_AD_Package_Imp_Detail; import org.compiere.model.X_AD_Package_Imp_Detail;
import org.compiere.util.CacheMgt;
import org.compiere.util.DB; import org.compiere.util.DB;
import org.compiere.util.Env; import org.compiere.util.Env;
import org.compiere.util.Trx; import org.compiere.util.Trx;
import org.compiere.util.Util;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl; import org.xml.sax.helpers.AttributesImpl;
@ -90,6 +92,15 @@ public class SQLStatementElementHandler extends AbstractElementHandler {
} }
logImportDetail (ctx, impDetail, 1, "SQLStatement",count,"Execute"); logImportDetail (ctx, impDetail, 1, "SQLStatement",count,"Execute");
ctx.packIn.getNotifier().addSuccessLine("-> " + sql); ctx.packIn.getNotifier().addSuccessLine("-> " + sql);
// Cache Reset when deleting records via SQL
if (sql.toLowerCase().startsWith("delete from ")) {
String[] words = sql.split("[ \r\n]");
String table = words[2];
String tableName = DB.getSQLValueString(null, "SELECT TableName FROM AD_Table WHERE LOWER(TableName)=?", table.toLowerCase());
if (! Util.isEmpty(tableName)) {
CacheMgt.get().reset(tableName);
}
}
} catch (Exception e) { } catch (Exception e) {
// rollback immediately on exception to avoid a wrong SQL stop the whole process // rollback immediately on exception to avoid a wrong SQL stop the whole process
if (savepoint != null) if (savepoint != null)

View File

@ -3,7 +3,7 @@ Version: 6.2
Section: web Section: web
Priority: extra Priority: extra
Architecture: all Architecture: all
Pre-Depends: openjdk-10-jdk|openjdk-11-jdk|openjdk-12-jdk, postgresql-11|postgresql-10|postgresql-9.6, postgresql-contrib, adduser Pre-Depends: openjdk-11-jdk|openjdk-12-jdk, postgresql-11|postgresql-10|postgresql-9.6, postgresql-contrib, adduser
Suggests: firefox Suggests: firefox
Installed-Size: 968668 Installed-Size: 968668
Maintainer: Carlos Ruiz <carg67@gmail.com> Maintainer: Carlos Ruiz <carg67@gmail.com>

View File

@ -40,8 +40,7 @@ esac
IDEMPIERE_USER=idempiere IDEMPIERE_USER=idempiere
IDEMPIERE_HOME=/opt/idempiere-server IDEMPIERE_HOME=/opt/idempiere-server
# 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 # 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=`ls -r /usr/lib/jvm/java-1[12]-openjdk*/bin/javac | head -1`
JAVA_HOME=`dirname $JAVA_HOME`
JAVA_HOME=`dirname $JAVA_HOME` JAVA_HOME=`dirname $JAVA_HOME`
SU=su SU=su
export IDEMPIERE_HOME export IDEMPIERE_HOME
@ -256,9 +255,9 @@ configure_perform()
if [ "x${ADEMPIERE_DB_SYSTEM}" = "x^TryLocalConnection^" ] if [ "x${ADEMPIERE_DB_SYSTEM}" = "x^TryLocalConnection^" ]
then then
# recreate idempiere user from here as the RUN_ImportIdempiere requires it # recreate idempiere user from here as the RUN_ImportIdempiere requires it
$SU postgres -c "dropdb -U postgres idempiere" # > /dev/null 2>&1 $SU postgres -c "cd; dropdb -U postgres idempiere" # > /dev/null 2>&1
$SU postgres -c "dropuser -U postgres idempiere" # > /dev/null 2>&1 $SU postgres -c "cd; dropuser -U postgres idempiere" # > /dev/null 2>&1
$SU postgres -c "psql -U postgres -c \"CREATE ROLE adempiere SUPERUSER LOGIN PASSWORD '${ADEMPIERE_DB_PASSWORD}'\"" # > /dev/null 2>&1 $SU postgres -c "cd; psql -U postgres -c \"CREATE ROLE adempiere SUPERUSER LOGIN PASSWORD '${ADEMPIERE_DB_PASSWORD}'\"" # > /dev/null 2>&1
fi fi
if [ -f ${IDEMPIERE_HOME}/utils/RUN_ImportIdempiere.sh ] if [ -f ${IDEMPIERE_HOME}/utils/RUN_ImportIdempiere.sh ]
@ -267,13 +266,13 @@ configure_perform()
$SU ${IDEMPIERE_USER} -c "cd ${IDEMPIERE_HOME}/utils; ( echo "" | ./RUN_ImportIdempiere.sh )" # > /dev/null 2>&1 $SU ${IDEMPIERE_USER} -c "cd ${IDEMPIERE_HOME}/utils; ( echo "" | ./RUN_ImportIdempiere.sh )" # > /dev/null 2>&1
echo "Done" echo "Done"
fi fi
$SU ${IDEMPIERE_USER} -c "export PGPASSWORD=${ADEMPIERE_DB_PASSWORD}; psql -d idempiere -U adempiere -h localhost -p 5432 -c ''" > /dev/null 2>&1 $SU ${IDEMPIERE_USER} -c "cd; export PGPASSWORD=${ADEMPIERE_DB_PASSWORD}; psql -d idempiere -U adempiere -h localhost -p 5432 -c ''" > /dev/null 2>&1
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "Cannot connect to idempiere database, please verify and try again" echo "Cannot connect to idempiere database, please verify and try again"
exit 1 exit 1
fi fi
$SU ${IDEMPIERE_USER} -c "export PGPASSWORD=${ADEMPIERE_DB_PASSWORD}; psql -d idempiere -U adempiere -h localhost -p 5432 -c 'select count(*) from ad_system' 2>&1 | grep '1$'" > /dev/null 2>&1 $SU ${IDEMPIERE_USER} -c "cd; export PGPASSWORD=${ADEMPIERE_DB_PASSWORD}; psql -d idempiere -U adempiere -h localhost -p 5432 -c 'select count(*) from ad_system' 2>&1 | grep '1$'" > /dev/null 2>&1
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
echo "Database not imported correctly, please verify and try again" echo "Database not imported correctly, please verify and try again"
@ -465,7 +464,7 @@ EOF
if [ -z "$LINE" ] if [ -z "$LINE" ]
then then
# Empty postgres password verify connection with local postgres user # Empty postgres password verify connection with local postgres user
$SU postgres -c "psql -U postgres -c ''" $SU postgres -c "cd; psql -U postgres -c ''"
if [ $? -eq 0 ] if [ $? -eq 0 ]
then then
break break

View File

@ -53,6 +53,7 @@ import org.compiere.model.Lookup;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.compiere.model.MLookupFactory; import org.compiere.model.MLookupFactory;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.model.X_AD_CtxHelp; import org.compiere.model.X_AD_CtxHelp;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.DB; import org.compiere.util.DB;
@ -473,10 +474,8 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
if(!getComponent().isEnabled()) if(!getComponent().isEnabled())
return; return;
int zoomWindowId = gridField != null ? lookup.getZoom(Env.isSOTrx(Env.getCtx(), gridField.getWindowNo())) : lookup.getZoom(Env.isSOTrx(Env.getCtx())); int zoomWindowId = -1;
final WQuickEntry vqe = new WQuickEntry (lookup.getWindowNo(), zoomWindowId);
if (vqe.getQuickFields()<=0)
return;
int Record_ID = 0; int Record_ID = 0;
// if update, get current value // if update, get current value
@ -488,6 +487,20 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
Record_ID = Integer.parseInt(value.toString()); Record_ID = Integer.parseInt(value.toString());
} }
if (lookup.getColumnName() != null) {
String tableName = lookup.getColumnName().substring(0, lookup.getColumnName().indexOf("."));
int zoomWinID = Env.getZoomWindowID(MTable.getTable_ID(tableName), Record_ID, lookup.getWindowNo());
if (zoomWinID > 0)
zoomWindowId = zoomWinID;
}
if (zoomWindowId < 0) {
zoomWindowId = gridField != null ? lookup.getZoom(Env.isSOTrx(Env.getCtx(), gridField.getWindowNo())) : lookup.getZoom(Env.isSOTrx(Env.getCtx()));
}
final WQuickEntry vqe = new WQuickEntry (lookup.getWindowNo(), zoomWindowId);
if (vqe.getQuickFields()<=0)
return;
vqe.loadRecord (Record_ID); vqe.loadRecord (Record_ID);
final int finalRecord_ID = Record_ID; final int finalRecord_ID = Record_ID;

View File

@ -506,6 +506,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
if (ThemeManager.isUseFontIconForImage()) if (ThemeManager.isUseFontIconForImage())
LayoutUtils.addSclass("medium-toolbarbutton", bRefresh); LayoutUtils.addSclass("medium-toolbarbutton", bRefresh);
bWizard.setName("Wizard");
if (ThemeManager.isUseFontIconForImage()) if (ThemeManager.isUseFontIconForImage())
bWizard.setIconSclass("z-icon-Wizard"); bWizard.setIconSclass("z-icon-Wizard");
else else

View File

@ -392,9 +392,13 @@ public class ConfigOracle implements IDatabaseConfig
// Ignore result as it might not be imported // Ignore result as it might not be imported
pass = testJDBC(url, databaseUser, databasePassword); pass = testJDBC(url, databaseUser, databasePassword);
error = "Cannot connect to User: " + databaseUser + "/" + databasePassword + " - Database may not be imported yet (OK on initial run)."; error = "Cannot connect to User: " + databaseUser + "/" + databasePassword + " - Database may not be imported yet (OK on initial run).";
if (monitor != null) if (monitor != null) {
monitor.update(new DBConfigStatus(DBConfigStatus.DATABASE_USER, "ErrorJDBC", boolean critical = true;
pass, true, error)); if (!isDBExists) {
critical = false;
}
monitor.update(new DBConfigStatus(DBConfigStatus.DATABASE_USER, "ErrorJDBC", pass, critical, error));
}
if (pass) if (pass)
{ {
if (log.isLoggable(Level.INFO)) log.info("OK: Database User = " + databaseUser); if (log.isLoggable(Level.INFO)) log.info("OK: Database User = " + databaseUser);

View File

@ -158,9 +158,13 @@ public class ConfigPostgreSQL implements IDatabaseConfig
// Ignore result as it might not be imported // Ignore result as it might not be imported
pass = testJDBC(url, databaseUser, databasePassword); pass = testJDBC(url, databaseUser, databasePassword);
error = "Database imported? Cannot connect to User: " + databaseUser + "/" + databasePassword; error = "Database imported? Cannot connect to User: " + databaseUser + "/" + databasePassword;
if (monitor != null) if (monitor != null) {
monitor.update(new DBConfigStatus(DBConfigStatus.DATABASE_USER, "ErrorJDBC", boolean critical = true;
pass, true, error)); if (!isDBExists) {
critical = false;
}
monitor.update(new DBConfigStatus(DBConfigStatus.DATABASE_USER, "ErrorJDBC", pass, critical, error));
}
if (pass) if (pass)
{ {
if (log.isLoggable(Level.INFO)) log.info("OK: Database User = " + databaseUser); if (log.isLoggable(Level.INFO)) log.info("OK: Database User = " + databaseUser);