IDEMPIERE-2563:packout with datatype without sql make NPE

This commit is contained in:
hieplq 2015-04-07 11:58:18 +07:00
parent 90d8e8c2c5
commit 3c0db87bc3
1 changed files with 4 additions and 0 deletions

View File

@ -255,6 +255,10 @@ public class GenericPOElementHandler extends AbstractElementHandler {
{
tableId = (Integer)detail.getProperty(DataElementParameters.AD_TABLE_ID);
sql = (String)detail.getProperty(DataElementParameters.SQL_STATEMENT);
if (sql == null){
m_tableName = MTable.get(packout.getCtx().ctx, tableId).getTableName();
sql = "SELECT * FROM " + m_tableName;
}
}
else
{