IDEMPIERE-5560 Cannot save Material Receipt after filling Order if the User1_ID field is not displayed (#1896)

This commit is contained in:
Carlos Ruiz 2023-06-14 10:30:49 +02:00 committed by GitHub
parent e89db4b287
commit 4f6b718ab1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -2769,8 +2769,15 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
if (log.isLoggable(Level.FINE)) log.fine(field.getColumnName() + "=" + value + " - Row=" + m_currentRow);
if (DisplayType.isID(field.getDisplayType()) && value instanceof Integer && ((Integer)value).intValue() < 0)
value = null;
if (value instanceof Integer) {
if (((Integer)value).intValue() < 0 && DisplayType.isID(field.getDisplayType())) {
value = null;
} else if (((Integer)value).intValue() == 0 && field.isLookup()) {
MColumn column = MColumn.get(field.getAD_Column_ID());
if (! MTable.isZeroIDTable(column.getReferenceTableName()))
value = null;
}
}
int col = m_mTable.findColumn(field.getColumnName());
m_mTable.setValueAt(value, m_currentRow, col, false);