IDEMPIERE-2273:CSV Import fail on evaluate column mandatory logic
This commit is contained in:
parent
3a813602ea
commit
8d236a3a9d
|
@ -941,7 +941,16 @@ public class GridTabCSVImporter implements IGridTabImporter
|
|||
return new StringBuilder(Msg.getMsg(Env.getCtx(), "FieldNotDisplayed",new Object[] {header.get(i)}));
|
||||
|
||||
MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
|
||||
if((field.isMandatory(false) || column.isMandatory()) && value == null && field.getDefault()==null){
|
||||
boolean isWrongValueForMandatory = false;
|
||||
if (field.isMandatory(false) || column.isMandatory()){
|
||||
if (isInsertMode() && value == null && field.getDefault()==null){
|
||||
isWrongValueForMandatory = true;
|
||||
}else if (!isInsertMode() && "(null)".equals(value)){
|
||||
isWrongValueForMandatory = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(isWrongValueForMandatory){
|
||||
mandatoryColumns.append(" / ");
|
||||
mandatoryColumns.append(header.get(i));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue