IDEMPIERE-6228 - Info Window and Info Windows process support for tables with UUID as key / IDEMPIERE-5567 (#2450)

This commit is contained in:
muriloht 2024-09-09 14:09:41 -03:00 committed by Carlos Ruiz
parent 514bf2fc21
commit 976d5ff19a
2 changed files with 5 additions and 1 deletions

View File

@ -39,6 +39,7 @@ import org.compiere.model.I_M_InOut;
import org.compiere.model.Lookup;
import org.compiere.model.MDocType;
import org.compiere.model.MInfoWindow;
import org.compiere.model.MTable;
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) {
MInfoWindow infoWindow = MInfoWindow.getInfoWindow(AD_InfoWindow_ID);
String tableName = infoWindow.getAD_Table().getTableName();
MTable table = (MTable)infoWindow.getAD_Table();
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);
if (info instanceof InfoWindow)
return (InfoWindow) info;

View File

@ -2785,9 +2785,9 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
else if (data instanceof UUIDColumn)
{
UUIDColumn id = (UUIDColumn) data;
parameters.add(null);
parameters.add(id.getRecord_UU());
parameters.add(null);
parameters.add(null);
}
else if (data instanceof String)
{