From 6b324babaf27dba329d0ce1092fbfabb7a267afd Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 4 Dec 2007 07:22:48 +0000 Subject: [PATCH] Fix bug [ 1843862 ] Lookups not working on Report Viewer window --- base/src/org/compiere/model/MLookup.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/base/src/org/compiere/model/MLookup.java b/base/src/org/compiere/model/MLookup.java index 4866980825..127ec0e5a2 100644 --- a/base/src/org/compiere/model/MLookup.java +++ b/base/src/org/compiere/model/MLookup.java @@ -665,8 +665,13 @@ public final class MLookup extends Lookup implements Serializable if (validation.length() == 0 && m_info.ValidationCode.length() > 0) { log.fine(m_info.KeyColumn + ": Loader NOT Validated: " + m_info.ValidationCode); - m_lookup.clear(); - return; + // Bug 1843862 - Lookups not working on Report Viewer window + // globalqss - when called from Viewer window ignore error about unparsabe context variables + // there is no context in report viewer windows + if (! Env.getWindow(m_info.WindowNo).getClass().getName().equals("org.compiere.print.Viewer")) { + m_lookup.clear(); + return; + } } else {