IDEMPIERE-6072 Record ID Editor not working well on detail tabs with multi-ID key (#2270)

* IDEMPIERE-6072 Record ID Editor not working well on detail tabs with multi-ID key

* - add fix for the case when Record_ID is the link column to parent tab

* - add fix for the case when Record_ID is the link column to parent tab
This commit is contained in:
Carlos Ruiz 2024-03-16 16:03:48 +01:00
parent 96898995ec
commit 5cd8d937e2
2 changed files with 5 additions and 1 deletions

View File

@ -47,6 +47,10 @@ public class TableIDCallout implements IColumnCallout {
@Override
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
// do not trigger change if the table didn't change
if (oldValue != null && value != null && oldValue.equals(value))
return null;
GridField recordId = mTab.getField("Record_ID");
if (recordId != null) {
mTab.setValue(recordId, null);

View File

@ -168,7 +168,7 @@ public class WRecordIDDialog extends Window implements EventListener<Event>, Val
parentTextBox.setReadonly(true);
MTable parentTable = MTable.get(editor.getGridField().getGridTab().getAD_Table_ID());
Serializable parentRecordId;
if (parentTable.isUUIDKeyTable())
if (! parentTable.isIDKeyTable())
parentRecordId = (Serializable) editor.getGridField().getGridTab().getValue(PO.getUUIDColumnName(parentTable.getTableName()));
else
parentRecordId = editor.getGridField().getGridTab().getRecord_ID();