IDEMPIERE-5405 - Drill Assistant - potential Cross Tenant Issue on Table tab (#1461)
* IDEMPIERE-5405 - Drill Assistant - potential Cross Tenant Issue on Table tab * IDEMPIERE-5405 - include System Print Formats, add ORDER BY
This commit is contained in:
parent
1646074a59
commit
4474a0ede2
|
@ -387,7 +387,9 @@ public class WDrillReport extends Window implements EventListener<Event> {
|
|||
|
||||
private KeyNamePair findTablePrintFormat(KeyNamePair drillTable) {
|
||||
|
||||
Integer printFormatID = new Query(Env.getCtx(), MPrintFormat.Table_Name, " AD_Table_ID = ? ", null).setParameters(drillTable.getKey()).firstId();
|
||||
Integer printFormatID = new Query(Env.getCtx(), MPrintFormat.Table_Name, " AD_Table_ID = ? AND AD_Client_ID IN (0,?) ", null)
|
||||
.setOrderBy(" IsDefault DESC, Created DESC ")
|
||||
.setParameters(drillTable.getKey(), Env.getAD_Client_ID(Env.getCtx())).firstId();
|
||||
return new KeyNamePair((printFormatID != null && printFormatID > 0) ? printFormatID : 0, drillTable.getName());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue