IDEMPIERE-4911 Silent fail when translated column is shorter than original column (FHCA-2888) / fix issue with 2Pack (#855)

This commit is contained in:
Carlos Ruiz 2021-08-30 18:24:25 +02:00 committed by GitHub
parent 0ace1aa246
commit fcef8e1c15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -526,11 +526,11 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
} }
// IDEMPIERE-4911 // IDEMPIERE-4911
MTable table = MTable.get(getAD_Table_ID()); MTable table = MTable.get(getCtx(), getAD_Table_ID(), get_TrxName());
String tableName = table.getTableName(); String tableName = table.getTableName();
if (tableName.toLowerCase().endsWith("_trl")) { if (tableName.toLowerCase().endsWith("_trl")) {
String parentTable = tableName.substring(0, tableName.length()-4); String parentTable = tableName.substring(0, tableName.length()-4);
MColumn column = MColumn.get(getCtx(), parentTable, colname); MColumn column = MColumn.get(getCtx(), parentTable, colname, get_TrxName());
if (column != null && column.isTranslated()) { if (column != null && column.isTranslated()) {
if (getFieldLength() < column.getFieldLength()) { if (getFieldLength() < column.getFieldLength()) {
log.saveWarning("Warning", "Size increased to " + column.getFieldLength() + " in translated column " + tableName + "." + colname); log.saveWarning("Warning", "Size increased to " + column.getFieldLength() + " in translated column " + tableName + "." + colname);