IDEMPIERE-4777 New table whose name ends in "Line" and does not have a Header table (#675)

This commit is contained in:
Carlos Ruiz 2021-05-07 12:23:38 +02:00 committed by GitHub
parent 9d40f6b5df
commit 3211c449cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1749,7 +1749,7 @@ public final class DB
if (noIsSOTrxColumn && TableName.endsWith("Line")) {
noIsSOTrxColumn = false;
String hdr = TableName.substring(0, TableName.indexOf("Line"));
if (MTable.get(Env.getCtx(), hdr).getColumn("IsSOTrx") == null) {
if (MTable.get(Env.getCtx(), hdr) == null || MTable.get(Env.getCtx(), hdr).getColumn("IsSOTrx") == null) {
noIsSOTrxColumn = true;
} else {
// use IN instead of EXISTS as the subquery should be highly selective