Troubleshoot 2pack for IDEMPIERE-1265
Related to IDEMPIERE-1178 2Pack was exporting wrongly AD_ReportView_ID=NULL as a zero value Also AD_Table_ID was being exported as NULL on columns
This commit is contained in:
parent
7d12418fc3
commit
e6337d1837
|
@ -312,7 +312,7 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
||||||
filler.add("AD_Column_ID", new AttributesImpl());
|
filler.add("AD_Column_ID", new AttributesImpl());
|
||||||
|
|
||||||
filler.addString("IsSyncDatabase", "Y", new AttributesImpl());
|
filler.addString("IsSyncDatabase", "Y", new AttributesImpl());
|
||||||
filler.addTableReference("AD_Table", "TableName", new AttributesImpl());
|
filler.addTableReference("AD_Table_ID", "TableName", new AttributesImpl());
|
||||||
filler.addTableReference("AD_Reference_Value_ID", "AD_Reference", new AttributesImpl());
|
filler.addTableReference("AD_Reference_Value_ID", "AD_Reference", new AttributesImpl());
|
||||||
|
|
||||||
excludes.add("IsSyncDatabase");
|
excludes.add("IsSyncDatabase");
|
||||||
|
|
|
@ -159,7 +159,7 @@ public class PoExporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addTableReference(String columnName, String tableName, AttributesImpl atts) {
|
public void addTableReference(String columnName, String tableName, AttributesImpl atts) {
|
||||||
int id = po.get_Value(columnName) != null ? (Integer)po.get_Value(columnName) : 0;
|
int id = po.get_Value(columnName) != null ? (Integer)po.get_Value(columnName) : -1;
|
||||||
addTableReference(columnName, tableName, id, atts);
|
addTableReference(columnName, tableName, id, atts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,9 +72,9 @@ public class ReferenceUtils {
|
||||||
String value = Integer.toString(id);
|
String value = Integer.toString(id);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
else if (id == 0)
|
else if (id <= 0)
|
||||||
{
|
{
|
||||||
//no id, should never happen
|
//no id, -1 indicates it was read a null
|
||||||
atts.addAttribute("", "", "reference", "CDATA", "id");
|
atts.addAttribute("", "", "reference", "CDATA", "id");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue