Set default value on Callout_AD_Column don't respect null value
Description
Environment
Attachments
Activity

Hiep Lq November 24, 2017 at 1:57 AM
i think it isn't relative.
the key of this issue below:
1. AD_Element_ID is fill value
2. it again set value for client_id to 0 (so client_id change from nulll => 1) raise callout
3. callout set default value to AD_Reference_Value_ID with value = 0
4. in case AD_Reference_Value_ID is visible, it will re-fill value "NULL" from csv
but on my case AD_Reference_Value_ID is invisible so it keep value 0.
finally when save action happen it throw "violates foreign key constraint"
Carlos Ruiz November 23, 2017 at 1:51 PM
, by design the null values on CSV must be filled with (null) to differentiate from nulls where we want to manage the default value.
See http://wiki.idempiere.org/en/NF1.0_ImportCSV#Rules_for_CSV_Header_Format
Is that related to this ticket?

Hiep Lq May 25, 2017 at 5:54 AM
it's more general when add this logic to GridTab.setValue | GridField.setValue
but need more time to test than place on
Details
Details
Assignee
Reporter

test case:
1. open "Table and Column" go to "C_OrderLine" record
2. go down to column tab
3. export to csv (choose all record)
4. delete almost record, just keep record for default column
5. delete "Line No" default value expression
6. replay table name of csv file to "Payment Charge Allocate" (i sent my file on
)
7. create a new table name "Payment Charge Allocate"
8. go to tab column and import file Export_AD_Column.csv
9. have exception
reason:
1. on table column client don't display, so it have value is null
2. when fill up value of "AD_Element_ID" it set client to 0 and rise a callout to client column
3. this callout query default value for AD_Reference_Value_ID is null but it use getInt function so it get value 0
4. on some record, AD_Reference_Value_ID is don't display, so ever you set "null" to column AD_Reference_Value_ID, it don't effect
so when save record it get exception.