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:
parent
96898995ec
commit
5cd8d937e2
|
@ -47,6 +47,10 @@ public class TableIDCallout implements IColumnCallout {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
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");
|
GridField recordId = mTab.getField("Record_ID");
|
||||||
if (recordId != null) {
|
if (recordId != null) {
|
||||||
mTab.setValue(recordId, null);
|
mTab.setValue(recordId, null);
|
||||||
|
|
|
@ -168,7 +168,7 @@ public class WRecordIDDialog extends Window implements EventListener<Event>, Val
|
||||||
parentTextBox.setReadonly(true);
|
parentTextBox.setReadonly(true);
|
||||||
MTable parentTable = MTable.get(editor.getGridField().getGridTab().getAD_Table_ID());
|
MTable parentTable = MTable.get(editor.getGridField().getGridTab().getAD_Table_ID());
|
||||||
Serializable parentRecordId;
|
Serializable parentRecordId;
|
||||||
if (parentTable.isUUIDKeyTable())
|
if (! parentTable.isIDKeyTable())
|
||||||
parentRecordId = (Serializable) editor.getGridField().getGridTab().getValue(PO.getUUIDColumnName(parentTable.getTableName()));
|
parentRecordId = (Serializable) editor.getGridField().getGridTab().getValue(PO.getUUIDColumnName(parentTable.getTableName()));
|
||||||
else
|
else
|
||||||
parentRecordId = editor.getGridField().getGridTab().getRecord_ID();
|
parentRecordId = editor.getGridField().getGridTab().getRecord_ID();
|
||||||
|
|
Loading…
Reference in New Issue