From 1fa4f0c3842b5287a370cb2021749c9c56196333 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Mon, 27 Dec 2010 08:29:31 +0800 Subject: [PATCH] Export of AD_Element_ID reference is not correct, search column for AD_Element is ColumnName, not Name. --- .../src/org/adempiere/pipo2/PoExporter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java index 2af7887451..506c7d20b1 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoExporter.java @@ -154,7 +154,7 @@ public class PoExporter { } public void addTableReference(String tableName, String searchColumn, AttributesImpl atts) { - String columnName = tableName + "_ID"; + String columnName = tableName + "_ID"; addTableReference(columnName, tableName, searchColumn, atts); } @@ -162,7 +162,7 @@ public class PoExporter { int id = po.get_Value(columnName) != null ? (Integer)po.get_Value(columnName) : 0; addTableReference(columnName, tableName, searchColumn, id, atts); } - + public void addTableReference(String columnName, String tableName, String searchColumn, int id, AttributesImpl atts) { String value = ReferenceUtils.getTableReference(tableName, searchColumn, id, atts); addString(columnName, value, atts); @@ -232,7 +232,7 @@ public class PoExporter { tableName = columnName.substring(0, columnName.length() - 3); if (tableName.equalsIgnoreCase("ad_table")) { searchColumn = "TableName"; - } else if (tableName.equalsIgnoreCase("ad_column")) { + } else if (tableName.equalsIgnoreCase("ad_column") || tableName.equalsIgnoreCase("ad_element")) { searchColumn = "ColumnName"; } } @@ -268,7 +268,7 @@ public class PoExporter { if (searchColumn.endsWith("_ID")) { if (tableName.equalsIgnoreCase("ad_table")) { searchColumn = "TableName"; - } else if (tableName.equalsIgnoreCase("ad_column")){ + } else if (tableName.equalsIgnoreCase("ad_column") || tableName.equalsIgnoreCase("ad_element")){ searchColumn = "ColumnName"; } else { int AD_Table_ID = MTable.getTable_ID(tableName);