Fixed can't use centralized id from webui after enable the use of native sequence.

This commit is contained in:
Heng Sin Low 2013-10-23 16:09:58 +08:00
parent 3dd1ebbc73
commit 2f3f51f42f
1 changed files with 11 additions and 1 deletions

View File

@ -1792,7 +1792,17 @@ public final class DB
public static int getNextID (int AD_Client_ID, String TableName, String trxName)
{
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue(MSysConfig.SYSTEM_NATIVE_SEQUENCE,false);
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
// Check AdempiereSys
boolean adempiereSys = false;
if (Ini.isClient())
{
adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
}
else
{
String sysProperty = Env.getCtx().getProperty("AdempiereSys", "N");
adempiereSys = "y".equalsIgnoreCase(sysProperty) || "true".equalsIgnoreCase(sysProperty);
}
if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys)
{