fix IDEMPIERE-56 Zoom on empty "Document Sequence" field opens "AP Payment" document sequence

This commit is contained in:
Carlos Ruiz 2011-09-12 09:31:27 -05:00
parent fd4c1062fc
commit fc7bce6434
2 changed files with 6 additions and 0 deletions

View File

@ -1291,6 +1291,9 @@ public class VLookup extends JComponent
Object value = getValue(); Object value = getValue();
if (value == null) if (value == null)
value = selectedItem; value = selectedItem;
// still null means the field is empty or not selected item
if (value == null)
value = -1;
// If not already exist or exact value // If not already exist or exact value
if (zoomQuery == null || value != null) if (zoomQuery == null || value != null)
{ {

View File

@ -411,6 +411,9 @@ public final class AEnv
return; return;
// //
MQuery zoomQuery = lookup.getZoomQuery(); MQuery zoomQuery = lookup.getZoomQuery();
// still null means the field is empty or not selected item
if (value == null)
value = -1;
// If not already exist or exact value // If not already exist or exact value
if (zoomQuery == null || value != null) if (zoomQuery == null || value != null)