IDEMPIERE-5560 Cannot save Material Receipt after filling Order if the User1_ID field is not displayed (#1896)
This commit is contained in:
parent
e89db4b287
commit
4f6b718ab1
|
@ -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 (log.isLoggable(Level.FINE)) log.fine(field.getColumnName() + "=" + value + " - Row=" + m_currentRow);
|
||||||
|
|
||||||
if (DisplayType.isID(field.getDisplayType()) && value instanceof Integer && ((Integer)value).intValue() < 0)
|
if (value instanceof Integer) {
|
||||||
value = null;
|
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());
|
int col = m_mTable.findColumn(field.getColumnName());
|
||||||
m_mTable.setValueAt(value, m_currentRow, col, false);
|
m_mTable.setValueAt(value, m_currentRow, col, false);
|
||||||
|
|
Loading…
Reference in New Issue