Allow to set explicit NULL value for fields

Description

None

Environment

Following https://groups.google.com/d/msg/idempiere/b2nzwFNUwyk/bF2_Zwq_0rUJ, the idea is to allow initialize field with empty value (by default BigDecimal fields are initialized with 0.00 and it could be useful to have nothing in some cases)

Regards,

Nicolas

Activity

Show:
萩原秀明
August 6, 2016, 6:58 AM

I think that this topic is sometimes useful.
My customer want to set numeric fields null by default logic.
But, I can not it now.

I think it needs a little bit more improvement.

for example: to set numeric fields null by default logic.
last sentence of GridField.defaultFromDatatype() method ※The neighborhood of 940th line of GridField

// actual Numbers default to zero
if (DisplayType.isNumeric(m_vo.displayType))
{
if (log.isLoggable(Level.FINE)) log.fine("[Number=0] " + m_vo.ColumnName);
return getDefaultValue().toUpperCase().equals("NULL") ? createDefault(getDefaultValue()) :createDefault("0");
}

return null;

But, GridField.getDefault(ParseSeq seqGetDefaultValue) method may be need to improvement fundamentally.
GridField.getDefault(ParseSeq seqGetDefaultValue) method does not allow NULL till the last.
※The neighborhood of 610th line of GridField

I'm sorry for my poor English.
I am happy if my opinion become improvement for iDempiere.

Carlos Ruiz
August 6, 2016, 8:50 AM

, I think you better discuss this in forums, this ticket was closed some time ago and your comment can be unnoticed.

I didn't understand your issue, you mean you cannot set NULL to an integer?

implemented sysconfig ZK_SEQ_DEFAULT_VALUE_PANEL with ticket IDEMPIERE-2296, but I feel sometimes there is something about the default setting that is not working fine. Sometimes my preference is not honored.

Anyways, can we discuss in forums the use case and try to solve it?

Regards,

Carlos Ruiz

萩原秀明
August 6, 2016, 9:19 AM

Dear Carlos,
Thank you for your reply and information.

And,I am sorry for comment to close ticket.
I am careful not to comment on a closed ticket from now on.

Thank you and sorry.

Carlos Ruiz
August 6, 2016, 8:12 PM
Fixed

Assignee

Nicolas Micoud

Reporter

Nicolas Micoud

Labels

Tested By

None

Priority

Major