IDEMPIERE-5238 Fix checkRecordIDCrossTenant failing in multi-key table (#1821)

This commit is contained in:
Carlos Ruiz 2023-05-03 20:32:59 +02:00 committed by GitHub
parent 31779a7611
commit 969a2e66df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -5709,6 +5709,8 @@ public abstract class PO
if (tableId <= 0)
return;
MTable ft = MTable.get(getCtx(), tableId);
if (ft.getKeyColumns().length > 1)
return; // multi-key-table
boolean systemAccess = false;
String accessLevel = ft.getAccessLevel();
if ( MTable.ACCESSLEVEL_All.equals(accessLevel)

View File

@ -104,7 +104,8 @@ public class GenericPOElementHandler extends AbstractElementHandler {
element.recordId = po.get_ID();
X_AD_Package_Imp_Detail impDetail = createImportDetail(ctx, element.qName, po.get_TableName(), po.get_Table_ID());
logImportDetail(ctx, impDetail, 1, po.toString(), element.recordId, action);
boolean isMultiKey = po.get_KeyColumns().length > 1;
logImportDetail(ctx, impDetail, 1, po.toString(), isMultiKey ? 0 : element.recordId, action);
if ( I_AD_Window.Table_Name.equals(tableName)
|| I_AD_Process.Table_Name.equals(tableName)