IDEMPIERE-1297 2Pack: Remove code for the lookup of record and reference using business key. Fixed handling of column that reference zero id table.
This commit is contained in:
parent
9b84f465db
commit
01807c9191
|
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.compiere.model.MColumn;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.POInfo;
|
||||
|
@ -161,6 +162,12 @@ public class PoFiller{
|
|||
po.set_ValueNoCheck(columnName, id);
|
||||
}
|
||||
return id;
|
||||
} else if (id == 0) {
|
||||
MColumn col = MColumn.get(ctx.ctx, po.get_TableName(), columnName);
|
||||
if (MTable.isZeroIDTable(col.getReferenceTableName())) {
|
||||
po.set_ValueNoCheck(columnName, id);
|
||||
return id;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue