From f3321a3eba85be1f38ea97f9d38efd073f31a794 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 12 Mar 2014 15:59:58 -0500 Subject: [PATCH] =?UTF-8?q?IDEMPIERE-1536=20Error=20running=20a=20report?= =?UTF-8?q?=20with=20SQL=20columns=20/=20thanks=20to=20Antonio=20Ca=C3=B1a?= =?UTF-8?q?veral=20for=20suggested=20patch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- org.adempiere.base/src/org/compiere/model/MLookupFactory.java | 4 ++-- .../WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java index 992989a880..59f6e7b4a1 100644 --- a/org.adempiere.base/src/org/compiere/model/MLookupFactory.java +++ b/org.adempiere.base/src/org/compiere/model/MLookupFactory.java @@ -675,9 +675,9 @@ public class MLookupFactory embedSQL.append(BaseTable).append(".").append(BaseColumn); embedSQL.append("=").append(TableNameAlias).append(".").append(KeyColumn); } else if (translated) { - embedSQL.append(TableNameAlias).append(".").append(BaseColumn).append("=").append(column.getColumnSQL()); + embedSQL.append(TableNameAlias).append(".").append(KeyColumn).append("=").append(column.getColumnSQL()); } else { - embedSQL.append(BaseColumn).append("=").append(column.getColumnSQL()); + embedSQL.append(KeyColumn).append("=").append(column.getColumnSQL()); } return embedSQL.toString(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java index 6a49334c0f..bcfbfa902c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java @@ -61,7 +61,7 @@ public class HTMLExtension implements IHTMLExtension { href.setStyle("text-decoration: none; font-size: 11px; vertical-align: middle;"); href.addAttribute("onclick", "parent.zoom('" + componentId + "', '" - + dataElement.getColumnName() + "', '" + + dataElement.getForeignColumnName() + "', '" + dataElement.getValueAsString() + "')"); window.addElement(href); menu.addElement(window);