IDEMPIERE-5944 - Default value of Yes/No columns (#2121)
* IDEMPIERE-5944 - Default value of Yes/No columns
This commit is contained in:
parent
d6121597b0
commit
342a243c1a
|
@ -562,6 +562,16 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
|
|||
}
|
||||
}
|
||||
|
||||
if (getAD_Reference_ID() == DisplayType.YesNo) {
|
||||
setIsMandatory(true);
|
||||
if (Util.isEmpty(getDefaultValue(), true)) {
|
||||
if (getAD_Element_ID() == SystemIDs.ELEMENT_ISACTIVE)
|
||||
setDefaultValue("Y");
|
||||
else
|
||||
setDefaultValue("N");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} // beforeSave
|
||||
|
||||
|
|
Loading…
Reference in New Issue