IDEMPIERE-5567 Support of UUID as Key (FHCA-4195) (#1985)
- Fix issue caused by last changes - the *SelectionGrid fields are not working because they don't have a formal Reference
This commit is contained in:
parent
fd986b4130
commit
eee6f449c3
|
@ -535,7 +535,8 @@ public final class DisplayType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if DisplayType is a VLookup (List, Table, TableDir, Search).
|
* Returns true if DisplayType is a VLookup (List, Table, TableDir, Search).
|
||||||
* (stored as Integer)
|
* (stored as Integer or multi-ID string separated by commas)
|
||||||
|
* The column must have the lookup defined in AD_Reference_Value_ID
|
||||||
* @param displayType Display Type
|
* @param displayType Display Type
|
||||||
* @return true if Lookup
|
* @return true if Lookup
|
||||||
*/
|
*/
|
||||||
|
@ -548,9 +549,7 @@ public final class DisplayType
|
||||||
|| displayType == RadiogroupList
|
|| displayType == RadiogroupList
|
||||||
|| displayType == ChosenMultipleSelectionTable
|
|| displayType == ChosenMultipleSelectionTable
|
||||||
|| displayType == ChosenMultipleSelectionSearch
|
|| displayType == ChosenMultipleSelectionSearch
|
||||||
|| displayType == ChosenMultipleSelectionList
|
|| displayType == ChosenMultipleSelectionList)
|
||||||
|| displayType == SingleSelectionGrid
|
|
||||||
|| displayType == MultipleSelectionGrid)
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//not custom type, don't have to check factory
|
//not custom type, don't have to check factory
|
||||||
|
|
|
@ -1004,10 +1004,8 @@ public class MoveClient extends SvrProcess {
|
||||||
if ( ! (key instanceof Number && ((Number)key).intValue() == 0 && ("Parent_ID".equalsIgnoreCase(columnName) || "Node_ID".equalsIgnoreCase(columnName))) // Parent_ID/Node_ID=0 is valid
|
if ( ! (key instanceof Number && ((Number)key).intValue() == 0 && ("Parent_ID".equalsIgnoreCase(columnName) || "Node_ID".equalsIgnoreCase(columnName))) // Parent_ID/Node_ID=0 is valid
|
||||||
&& (key instanceof String || (key instanceof Number && ((Number)key).intValue() >= MTable.MAX_OFFICIAL_ID) || p_IsCopyClient)) {
|
&& (key instanceof String || (key instanceof Number && ((Number)key).intValue() >= MTable.MAX_OFFICIAL_ID) || p_IsCopyClient)) {
|
||||||
Object convertedId = null;
|
Object convertedId = null;
|
||||||
if ( column.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionSearch
|
|
||||||
|| column.getAD_Reference_ID() == DisplayType.ChosenMultipleSelectionTable
|
if (DisplayType.isMultiID(column.getAD_Reference_ID())) {
|
||||||
|| column.getAD_Reference_ID() == DisplayType.SingleSelectionGrid
|
|
||||||
|| column.getAD_Reference_ID() == DisplayType.MultipleSelectionGrid) {
|
|
||||||
// multiple IDs or UUIDs separated by commas
|
// multiple IDs or UUIDs separated by commas
|
||||||
String[] multiKeys = ((String)key).split(",");
|
String[] multiKeys = ((String)key).split(",");
|
||||||
for (String multiKey : multiKeys) {
|
for (String multiKey : multiKeys) {
|
||||||
|
@ -1168,8 +1166,8 @@ public class MoveClient extends SvrProcess {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("AD_ChangeLog".equalsIgnoreCase(tableName)) {
|
if ("AD_ChangeLog".equalsIgnoreCase(tableName) || "AD_PInstance_Log".equalsIgnoreCase(tableName)) {
|
||||||
// skip orphan records in AD_ChangeLog, can be log of deleted records, skip
|
// skip orphan records in AD_ChangeLog and AD_PInstance_Log, can be log of deleted records, skip
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -292,7 +292,7 @@ public class PoExporter {
|
||||||
addTableReference(columnName, tableName, new AttributesImpl());
|
addTableReference(columnName, tableName, new AttributesImpl());
|
||||||
} else if (DisplayType.isList(displayType)) {
|
} else if (DisplayType.isList(displayType)) {
|
||||||
add(columnName, "", new AttributesImpl());
|
add(columnName, "", new AttributesImpl());
|
||||||
} else if (DisplayType.isLookup(displayType)) {
|
} else if (DisplayType.isLookup(displayType) || DisplayType.isMultiID(displayType)) {
|
||||||
String tableName = null;
|
String tableName = null;
|
||||||
if (("Record_ID".equalsIgnoreCase(columnName) || "Record_UU".equalsIgnoreCase(columnName)) && po.get_ColumnIndex("AD_Table_ID") >= 0) {
|
if (("Record_ID".equalsIgnoreCase(columnName) || "Record_UU".equalsIgnoreCase(columnName)) && po.get_ColumnIndex("AD_Table_ID") >= 0) {
|
||||||
int AD_Table_ID = po.get_ValueAsInt("AD_Table_ID");
|
int AD_Table_ID = po.get_ValueAsInt("AD_Table_ID");
|
||||||
|
|
Loading…
Reference in New Issue