IDEMPIERE-55 Document type ** New ** pretends having been changed. Make consistent with web client behavior where ID and non-integer value is allow to be out of list.
(transplanted from e8d96477f7278aa426669f5f9e0d14e8fe1f2a04)
This commit is contained in:
parent
033baccd24
commit
0e6ace57bf
|
@ -587,7 +587,7 @@ public class VLookup extends JComponent
|
||||||
m_text.setCaretPosition (0); // show beginning
|
m_text.setCaretPosition (0); // show beginning
|
||||||
notFound = m_lastDisplay.startsWith("<") && m_lastDisplay.endsWith(">");
|
notFound = m_lastDisplay.startsWith("<") && m_lastDisplay.endsWith(">");
|
||||||
}
|
}
|
||||||
if (notFound) // <key>
|
if (notFound && value instanceof Integer && m_lookup.getDisplayType() != DisplayType.ID) // for IDs is ok to be out of the list
|
||||||
{
|
{
|
||||||
m_value = null;
|
m_value = null;
|
||||||
actionCombo (null); // data binding
|
actionCombo (null); // data binding
|
||||||
|
@ -608,9 +608,12 @@ public class VLookup extends JComponent
|
||||||
// Not in Lookup - set to Null
|
// Not in Lookup - set to Null
|
||||||
if (m_combo.getSelectedItem() == null)
|
if (m_combo.getSelectedItem() == null)
|
||||||
{
|
{
|
||||||
log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL");
|
if (value instanceof Integer && m_lookup.getDisplayType() != DisplayType.ID) // for IDs is ok to be out of the list
|
||||||
actionCombo (null); // data binding (calls setValue again)
|
{
|
||||||
m_value = null;
|
log.info(m_columnName + "=" + value + ": not in Lookup - set to NULL");
|
||||||
|
actionCombo (null); // data binding (calls setValue again)
|
||||||
|
m_value = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_settingValue = false;
|
m_settingValue = false;
|
||||||
|
|
Loading…
Reference in New Issue