1003423 2Pack failed to export AD_TreeNode data. IDEMPIERE-1507
This commit is contained in:
parent
a4ec500a56
commit
860a0a615d
|
@ -7,12 +7,12 @@ import javax.xml.transform.sax.TransformerHandler;
|
||||||
|
|
||||||
import org.adempiere.exceptions.AdempiereException;
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
import org.compiere.model.MTable;
|
import org.compiere.model.MTable;
|
||||||
|
import org.compiere.model.MTree;
|
||||||
import org.compiere.model.PO;
|
import org.compiere.model.PO;
|
||||||
import org.compiere.model.POInfo;
|
import org.compiere.model.POInfo;
|
||||||
import org.compiere.model.X_AD_Client;
|
import org.compiere.model.X_AD_Client;
|
||||||
import org.compiere.model.X_AD_Org;
|
import org.compiere.model.X_AD_Org;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
|
||||||
import org.compiere.util.DisplayType;
|
import org.compiere.util.DisplayType;
|
||||||
import org.xml.sax.SAXException;
|
import org.xml.sax.SAXException;
|
||||||
import org.xml.sax.helpers.AttributesImpl;
|
import org.xml.sax.helpers.AttributesImpl;
|
||||||
|
@ -240,12 +240,12 @@ public class PoExporter {
|
||||||
tableName = MTable.getTableName(ctx.ctx, AD_Table_ID);
|
tableName = MTable.getTableName(ctx.ctx, AD_Table_ID);
|
||||||
} else if (po.get_TableName().equals("AD_TreeNode") && columnName.equals("Parent_ID")) {
|
} else if (po.get_TableName().equals("AD_TreeNode") && columnName.equals("Parent_ID")) {
|
||||||
int AD_Tree_ID = po.get_ValueAsInt("AD_Tree_ID");
|
int AD_Tree_ID = po.get_ValueAsInt("AD_Tree_ID");
|
||||||
int AD_Table_ID = DB.getSQLValue(po.get_TrxName(), "SELECT AD_Table_ID From AD_Tree WHERE AD_Tree_ID="+AD_Tree_ID);
|
MTree tree = new MTree(ctx.ctx, AD_Tree_ID, ctx.trx.getTrxName());
|
||||||
tableName = MTable.getTableName(po.getCtx(), AD_Table_ID);
|
tableName = tree.getSourceTableName(true);
|
||||||
} else if (po.get_TableName().equals("AD_TreeNode") && columnName.equals("Node_ID")) {
|
} else if (po.get_TableName().equals("AD_TreeNode") && columnName.equals("Node_ID")) {
|
||||||
int AD_Tree_ID = po.get_ValueAsInt("AD_Tree_ID");
|
int AD_Tree_ID = po.get_ValueAsInt("AD_Tree_ID");
|
||||||
int AD_Table_ID = DB.getSQLValue(po.get_TrxName(), "SELECT AD_Table_ID From AD_Tree WHERE AD_Tree_ID="+AD_Tree_ID);
|
MTree tree = new MTree(ctx.ctx, AD_Tree_ID, ctx.trx.getTrxName());
|
||||||
tableName = MTable.getTableName(po.getCtx(), AD_Table_ID);
|
tableName = tree.getSourceTableName(true);
|
||||||
} else {
|
} else {
|
||||||
tableName = columnName.substring(0, columnName.length() - 3);
|
tableName = columnName.substring(0, columnName.length() - 3);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue