IDEMPIERE-5940 Move/Copy Client failing when there are tables without AD_Client_ID (#2117)

This commit is contained in:
Carlos Ruiz 2023-11-27 09:01:43 +01:00 committed by GitHub
parent d4f5aabe64
commit e9e2239d0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -454,6 +454,10 @@ public class MoveClient extends SvrProcess {
sqlCountData.append(" JOIN AD_PInstance ON (AD_PInstance_Log.AD_PInstance_ID=AD_PInstance.AD_PInstance_ID)"); sqlCountData.append(" JOIN AD_PInstance ON (AD_PInstance_Log.AD_PInstance_ID=AD_PInstance.AD_PInstance_ID)");
sqlCountData.append(" JOIN AD_Client ON (AD_PInstance.AD_Client_ID=AD_Client.AD_Client_ID)"); sqlCountData.append(" JOIN AD_Client ON (AD_PInstance.AD_Client_ID=AD_Client.AD_Client_ID)");
} else { } else {
if (MColumn.get(getCtx(), tableName, "AD_Client_ID") == null) {
if (log.isLoggable(Level.WARNING)) log.warning("Ignoring " + tableName + ", doesn't have column AD_Client_ID");
return;
}
sqlCountData.append(" JOIN AD_Client ON (").append(tableName).append(".AD_Client_ID=AD_Client.AD_Client_ID)"); sqlCountData.append(" JOIN AD_Client ON (").append(tableName).append(".AD_Client_ID=AD_Client.AD_Client_ID)");
} }
sqlCountData.append(" WHERE ").append(p_whereClient); sqlCountData.append(" WHERE ").append(p_whereClient);