IDEMPIERE-3285 Empty string Attribute Sets filled with numbers
This commit is contained in:
parent
76424a05fb
commit
ad7b5180b5
|
@ -227,11 +227,14 @@ public class MAttributeSetInstance extends X_M_AttributeSetInstance
|
|||
for (int i = 0; i < attributes.length; i++)
|
||||
{
|
||||
MAttributeInstance mai = attributes[i].getMAttributeInstance(getM_AttributeSetInstance_ID());
|
||||
if (mai != null && mai.getValue() != null)
|
||||
if (mai != null)
|
||||
{
|
||||
if (sb.length() > 0)
|
||||
sb.append("_");
|
||||
sb.append(mai.getValue());
|
||||
if (mai.getValue() != null)
|
||||
sb.append(mai.getValue());
|
||||
else
|
||||
sb.append("");
|
||||
}
|
||||
}
|
||||
setDescription (sb.toString());
|
||||
|
|
|
@ -2762,16 +2762,22 @@ public abstract class PO
|
|||
set_ValueNoCheck(columnName, value);
|
||||
}
|
||||
}
|
||||
// Set empty Value
|
||||
columnName = "Value";
|
||||
index = p_info.getColumnIndex(columnName);
|
||||
if (index != -1)
|
||||
{
|
||||
String value = (String)get_Value(index);
|
||||
if (value == null || value.length() == 0)
|
||||
// ticket 1007459 - exclude M_AttributeInstance from filling Value column
|
||||
if (! MAttributeInstance.Table_Name.equals(get_TableName())) {
|
||||
// Set empty Value
|
||||
columnName = "Value";
|
||||
index = p_info.getColumnIndex(columnName);
|
||||
if (index != -1)
|
||||
{
|
||||
value = DB.getDocumentNo (getAD_Client_ID(), p_info.getTableName(), m_trxName, this);
|
||||
set_ValueNoCheck(columnName, value);
|
||||
if (!p_info.isVirtualColumn(index))
|
||||
{
|
||||
String value = (String)get_Value(index);
|
||||
if (value == null || value.length() == 0)
|
||||
{
|
||||
value = DB.getDocumentNo (getAD_Client_ID(), p_info.getTableName(), m_trxName, this);
|
||||
set_ValueNoCheck(columnName, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue