IDEMPIERE-2477 Generate boolean in 2Pack as Y/N instead of true/false
This commit is contained in:
parent
639d830e1f
commit
0cea1c7fe1
|
@ -121,7 +121,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements
|
||||||
|
|
||||||
if(columnName.equalsIgnoreCase("IsActive") ||
|
if(columnName.equalsIgnoreCase("IsActive") ||
|
||||||
columnName.equalsIgnoreCase("IsTranslated")){
|
columnName.equalsIgnoreCase("IsTranslated")){
|
||||||
value = "true".equals(value) ? "Y" : "N";
|
value = "true".equals(value) || "Y".equals(value) ? "Y" : "N";
|
||||||
}
|
}
|
||||||
pstm.setString(i, value);
|
pstm.setString(i, value);
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements
|
||||||
if(columnName.equalsIgnoreCase("IsActive") ||
|
if(columnName.equalsIgnoreCase("IsActive") ||
|
||||||
columnName.equalsIgnoreCase("IsTranslated")){
|
columnName.equalsIgnoreCase("IsTranslated")){
|
||||||
|
|
||||||
value = "true".equals(value) ? "Y" : "N";
|
value = "true".equals(value) || "Y".equals(value) ? "Y" : "N";
|
||||||
}
|
}
|
||||||
|
|
||||||
pstm.setString(i, value);
|
pstm.setString(i, value);
|
||||||
|
|
|
@ -133,17 +133,8 @@ public class MenuElementHandler extends AbstractElementHandler {
|
||||||
int columnID = DB.getSQLValue(getTrxName(ctx), sql, colName, tableID);
|
int columnID = DB.getSQLValue(getTrxName(ctx), sql, colName, tableID);
|
||||||
sql = "SELECT AD_Reference_ID FROM AD_COLUMN WHERE AD_Column_ID = ?";
|
sql = "SELECT AD_Reference_ID FROM AD_COLUMN WHERE AD_Column_ID = ?";
|
||||||
int referenceID = DB.getSQLValue(getTrxName(ctx), sql, columnID);
|
int referenceID = DB.getSQLValue(getTrxName(ctx), sql, columnID);
|
||||||
if (referenceID == 20 || referenceID == 28)
|
|
||||||
if (rs.getObject(q).equals("Y"))
|
|
||||||
colValue = "true";
|
|
||||||
else
|
|
||||||
colValue = "false";
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Object obj = rs.getObject(q);
|
Object obj = rs.getObject(q);
|
||||||
colValue = obj == null ? "" : obj.toString();
|
colValue = obj == null ? "" : obj.toString();
|
||||||
}
|
|
||||||
|
|
||||||
X_AD_Package_Imp_Backup backup = new X_AD_Package_Imp_Backup(ctx.ctx, 0, getTrxName(ctx));
|
X_AD_Package_Imp_Backup backup = new X_AD_Package_Imp_Backup(ctx.ctx, 0, getTrxName(ctx));
|
||||||
backup.setAD_Package_Imp_Detail_ID(impDetail.getAD_Package_Imp_Detail_ID());
|
backup.setAD_Package_Imp_Detail_ID(impDetail.getAD_Package_Imp_Detail_ID());
|
||||||
backup.setAD_Package_Imp_ID(getPackageImpId(ctx.ctx));
|
backup.setAD_Package_Imp_ID(getPackageImpId(ctx.ctx));
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class PoExporter {
|
||||||
* @param boolValue
|
* @param boolValue
|
||||||
*/
|
*/
|
||||||
public void addBoolean(String name, boolean boolValue, AttributesImpl atts){
|
public void addBoolean(String name, boolean boolValue, AttributesImpl atts){
|
||||||
addTextElement(name, boolValue == true ? "true" : "false", atts);
|
addTextElement(name, boolValue == true ? "Y" : "N", atts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public class PoExporter {
|
||||||
if(value instanceof String){
|
if(value instanceof String){
|
||||||
addTextElement(columnName, (String)value, atts);
|
addTextElement(columnName, (String)value, atts);
|
||||||
} else if(value instanceof Boolean) {
|
} else if(value instanceof Boolean) {
|
||||||
addTextElement(columnName, (Boolean)value == true ? "true" : "false", atts);
|
addTextElement(columnName, (Boolean)value == true ? "Y" : "N", atts);
|
||||||
} else if(value instanceof Integer) {
|
} else if(value instanceof Integer) {
|
||||||
addTextElement(columnName, value.toString(), atts);
|
addTextElement(columnName, value.toString(), atts);
|
||||||
} else if(value instanceof BigDecimal) {
|
} else if(value instanceof BigDecimal) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class PoFiller{
|
||||||
Element e = element.properties.get(columnName);
|
Element e = element.properties.get(columnName);
|
||||||
String value = e != null ? e.contents.toString() : null;
|
String value = e != null ? e.contents.toString() : null;
|
||||||
|
|
||||||
boolean bool = "true".equals(value) ? true : false;
|
boolean bool = "true".equals(value) || "Y".equals(value) ? true : false;
|
||||||
|
|
||||||
if (po.get_Value(columnName) != null && po.get_ValueAsBoolean(columnName) == bool)
|
if (po.get_Value(columnName) != null && po.get_ValueAsBoolean(columnName) == bool)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue