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") ||
|
||||
columnName.equalsIgnoreCase("IsTranslated")){
|
||||
value = "true".equals(value) ? "Y" : "N";
|
||||
value = "true".equals(value) || "Y".equals(value) ? "Y" : "N";
|
||||
}
|
||||
pstm.setString(i, value);
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public class CommonTranslationHandler extends AbstractElementHandler implements
|
|||
if(columnName.equalsIgnoreCase("IsActive") ||
|
||||
columnName.equalsIgnoreCase("IsTranslated")){
|
||||
|
||||
value = "true".equals(value) ? "Y" : "N";
|
||||
value = "true".equals(value) || "Y".equals(value) ? "Y" : "N";
|
||||
}
|
||||
|
||||
pstm.setString(i, value);
|
||||
|
|
|
@ -133,17 +133,8 @@ public class MenuElementHandler extends AbstractElementHandler {
|
|||
int columnID = DB.getSQLValue(getTrxName(ctx), sql, colName, tableID);
|
||||
sql = "SELECT AD_Reference_ID FROM AD_COLUMN WHERE AD_Column_ID = ?";
|
||||
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);
|
||||
colValue = obj == null ? "" : obj.toString();
|
||||
}
|
||||
|
||||
Object obj = rs.getObject(q);
|
||||
colValue = obj == null ? "" : obj.toString();
|
||||
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_ID(getPackageImpId(ctx.ctx));
|
||||
|
|
|
@ -90,7 +90,7 @@ public class PoExporter {
|
|||
* @param boolValue
|
||||
*/
|
||||
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){
|
||||
addTextElement(columnName, (String)value, atts);
|
||||
} 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) {
|
||||
addTextElement(columnName, value.toString(), atts);
|
||||
} else if(value instanceof BigDecimal) {
|
||||
|
|
|
@ -70,7 +70,7 @@ public class PoFiller{
|
|||
Element e = element.properties.get(columnName);
|
||||
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)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue