IDEMPIERE-5567 Support of UUID as Key (FHCA-4195) (#2006)
- fix for broken PackIn on AD_Menu.Parent_ID
This commit is contained in:
parent
826b47d6a4
commit
5dfd3cca8f
|
@ -181,25 +181,25 @@ public class PoFiller{
|
|||
String value = e.contents.toString();
|
||||
String columnName = qName;
|
||||
if (value != null && value.trim().length() > 0) {
|
||||
MColumn col = MColumn.get(ctx.ctx, po.get_TableName(), columnName, po.get_TrxName());
|
||||
if (col == null) {
|
||||
POInfo poInfo = POInfo.getPOInfo(ctx.ctx, po.get_Table_ID(), po.get_TrxName());
|
||||
col = new MColumn(ctx.ctx, poInfo.getAD_Column_ID(columnName), po.get_TrxName());
|
||||
if (col.get_ID() == 0)
|
||||
return -1;
|
||||
}
|
||||
boolean isMulti = DisplayType.isMultiID(col.getAD_Reference_ID());
|
||||
Object id;
|
||||
if (isMulti)
|
||||
id = ReferenceUtils.resolveReferenceMulti(ctx.ctx, e, po.get_TrxName());
|
||||
else
|
||||
id = ReferenceUtils.resolveReference(ctx.ctx, e, po.get_TrxName());
|
||||
if (columnName.equals("AD_Client_ID") && ((Number)id).intValue() > 0) {
|
||||
if (((Number)id).intValue() != Env.getAD_Client_ID(ctx.ctx)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (po.get_ColumnIndex(columnName) >= 0) {
|
||||
MColumn col = MColumn.get(ctx.ctx, po.get_TableName(), columnName, po.get_TrxName());
|
||||
if (col == null) {
|
||||
POInfo poInfo = POInfo.getPOInfo(ctx.ctx, po.get_Table_ID(), po.get_TrxName());
|
||||
col = new MColumn(ctx.ctx, poInfo.getAD_Column_ID(columnName), po.get_TrxName());
|
||||
if (col.get_ID() == 0)
|
||||
return -1;
|
||||
}
|
||||
boolean isMulti = DisplayType.isMultiID(col.getAD_Reference_ID());
|
||||
Object id;
|
||||
if (isMulti)
|
||||
id = ReferenceUtils.resolveReferenceMulti(ctx.ctx, e, po.get_TrxName());
|
||||
else
|
||||
id = ReferenceUtils.resolveReference(ctx.ctx, e, po.get_TrxName());
|
||||
if (columnName.equals("AD_Client_ID") && ((Number)id).intValue() > 0) {
|
||||
if (((Number)id).intValue() != Env.getAD_Client_ID(ctx.ctx)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
MTable foreignTable = null;
|
||||
String refTableName;
|
||||
if (isMulti)
|
||||
|
|
Loading…
Reference in New Issue