From e91fdb28b41452e0355bbc62fd2950d2cefd35b4 Mon Sep 17 00:00:00 2001 From: hieplq Date: Tue, 17 Oct 2017 15:48:02 +0700 Subject: [PATCH] IDEMPIERE-3508:2pack: suport export from normal string column to text long string column --- .../src/org/adempiere/pipo2/PoFiller.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java index 75413f12e6..25a1a6334c 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java @@ -48,6 +48,17 @@ public class PoFiller{ value = "".equals(value) ? null : value; return value; } + + protected boolean isBlobOnPackinFile (String columnName){ + String value = getStringValue(columnName); + if(value == null) + return false; + + String strParts [] = value.split("[|]"); + return strParts.length == 2; + + } + /** * * @param columnName @@ -292,7 +303,7 @@ public class PoFiller{ } else if (info.getColumnClass(index) == Timestamp.class) { setTimestamp(qName); }else if(DisplayType.TextLong == info.getColumnDisplayType(index)) {// export column from system have type is normal string, but import to system have this column but type is textlong (mean blob) - if (getStringValue (qName) != null) { + if (getStringValue (qName) != null || !isBlobOnPackinFile(qName)) { setString(qName); }else { setBlob(qName);