IDEMPIERE-6228 - Info Window and Info Windows process support for tables with UUID as key / IDEMPIERE-5567 (#2450)
This commit is contained in:
parent
514bf2fc21
commit
976d5ff19a
|
|
@ -39,6 +39,7 @@ import org.compiere.model.I_M_InOut;
|
||||||
import org.compiere.model.Lookup;
|
import org.compiere.model.Lookup;
|
||||||
import org.compiere.model.MDocType;
|
import org.compiere.model.MDocType;
|
||||||
import org.compiere.model.MInfoWindow;
|
import org.compiere.model.MInfoWindow;
|
||||||
|
import org.compiere.model.MTable;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -233,7 +234,10 @@ public class DefaultInfoFactory implements IInfoFactory {
|
||||||
public InfoWindow create(int windowNo, int AD_InfoWindow_ID, String predefinedContextVariables) {
|
public InfoWindow create(int windowNo, int AD_InfoWindow_ID, String predefinedContextVariables) {
|
||||||
MInfoWindow infoWindow = MInfoWindow.getInfoWindow(AD_InfoWindow_ID);
|
MInfoWindow infoWindow = MInfoWindow.getInfoWindow(AD_InfoWindow_ID);
|
||||||
String tableName = infoWindow.getAD_Table().getTableName();
|
String tableName = infoWindow.getAD_Table().getTableName();
|
||||||
|
MTable table = (MTable)infoWindow.getAD_Table();
|
||||||
String keyColumn = tableName + "_ID";
|
String keyColumn = tableName + "_ID";
|
||||||
|
if(table.isUUIDKeyTable())
|
||||||
|
keyColumn = tableName + "_UU";
|
||||||
InfoPanel info = create(windowNo, tableName, keyColumn, null, false, null, AD_InfoWindow_ID, false, predefinedContextVariables, null);
|
InfoPanel info = create(windowNo, tableName, keyColumn, null, false, null, AD_InfoWindow_ID, false, predefinedContextVariables, null);
|
||||||
if (info instanceof InfoWindow)
|
if (info instanceof InfoWindow)
|
||||||
return (InfoWindow) info;
|
return (InfoWindow) info;
|
||||||
|
|
|
||||||
|
|
@ -2785,9 +2785,9 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
||||||
else if (data instanceof UUIDColumn)
|
else if (data instanceof UUIDColumn)
|
||||||
{
|
{
|
||||||
UUIDColumn id = (UUIDColumn) data;
|
UUIDColumn id = (UUIDColumn) data;
|
||||||
parameters.add(null);
|
|
||||||
parameters.add(id.getRecord_UU());
|
parameters.add(id.getRecord_UU());
|
||||||
parameters.add(null);
|
parameters.add(null);
|
||||||
|
parameters.add(null);
|
||||||
}
|
}
|
||||||
else if (data instanceof String)
|
else if (data instanceof String)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue