IDEMPIERE-2963 Error creating report after zoom across (#833)

- generate fully qualified where clause for generic zoom across
This commit is contained in:
hengsin 2021-08-17 22:10:52 +08:00 committed by GitHub
parent f8fbf5f3bb
commit e585d4417d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -204,7 +204,7 @@ public class GenericZoomProvider implements IZoomProvider {
break;
}
query.addRestriction(targetColumnName + "=" + po.get_ID());
query.addRestriction(targetTableName + "." + targetColumnName + "=" + po.get_ID());
query.setZoomTableName(targetTableName);
query.setZoomColumnName(targetColumnName);
query.setZoomValue(po.get_ID());
@ -217,9 +217,9 @@ public class GenericZoomProvider implements IZoomProvider {
if ( clientID != 0
&& ( MTable.ACCESSLEVEL_All.equals(accessLevel)
|| MTable.ACCESSLEVEL_SystemPlusClient.equals(accessLevel))) {
query.addRestriction("AD_Client_ID IN (0, " + clientID + ")");
query.addRestriction(targetTableName+".AD_Client_ID IN (0, " + clientID + ")");
} else {
query.addRestriction("AD_Client_ID=" + clientID);
query.addRestriction(targetTableName+".AD_Client_ID=" + clientID);
}
StringBuilder sqlb = new StringBuilder("SELECT COUNT(*) FROM ")