IDEMPIERE-2373 Master Role Document Action Access not working for inventory subtypes
This commit is contained in:
parent
bc7b58145b
commit
71c842e7f5
|
@ -2551,6 +2551,8 @@ public final class MRole extends X_AD_Role
|
||||||
+ " WHERE ro.AD_Role_ID=?"
|
+ " WHERE ro.AD_Role_ID=?"
|
||||||
+ " AND ty.DocBaseType=?"
|
+ " AND ty.DocBaseType=?"
|
||||||
+ (MDocType.DOCBASETYPE_SalesOrder.equals(doc.getDocBaseType()) ? " AND ty.DocSubTypeSO=?" : "")
|
+ (MDocType.DOCBASETYPE_SalesOrder.equals(doc.getDocBaseType()) ? " AND ty.DocSubTypeSO=?" : "")
|
||||||
|
+ (MDocType.DOCBASETYPE_PurchaseOrder.equals(doc.getDocBaseType()) && doc.getDocSubTypeSO() != null ? " AND ty.DocSubTypeSO=?" : "")
|
||||||
|
+ (MDocType.DOCBASETYPE_MaterialPhysicalInventory.equals(doc.getDocBaseType()) ? " AND ty.DocSubTypeInv=?" : "")
|
||||||
+ " AND rl.Value IN ("
|
+ " AND rl.Value IN ("
|
||||||
+ sql_values
|
+ sql_values
|
||||||
+ ")";
|
+ ")";
|
||||||
|
@ -2560,6 +2562,10 @@ public final class MRole extends X_AD_Role
|
||||||
pstmt.setString(idxpar++, doc.getDocBaseType());
|
pstmt.setString(idxpar++, doc.getDocBaseType());
|
||||||
if (MDocType.DOCBASETYPE_SalesOrder.equals(doc.getDocBaseType()))
|
if (MDocType.DOCBASETYPE_SalesOrder.equals(doc.getDocBaseType()))
|
||||||
pstmt.setString(idxpar++, doc.getDocSubTypeSO());
|
pstmt.setString(idxpar++, doc.getDocSubTypeSO());
|
||||||
|
else if (MDocType.DOCBASETYPE_PurchaseOrder.equals(doc.getDocBaseType()) && doc.getDocSubTypeSO() != null)
|
||||||
|
pstmt.setString(idxpar++, doc.getDocSubTypeSO());
|
||||||
|
else if (MDocType.DOCBASETYPE_MaterialPhysicalInventory.equals(doc.getDocBaseType()))
|
||||||
|
pstmt.setString(idxpar++, doc.getDocSubTypeInv());
|
||||||
} else {
|
} else {
|
||||||
// master role on tenant - check options based on doctypeid
|
// master role on tenant - check options based on doctypeid
|
||||||
sql = "SELECT DISTINCT rl.Value, a.IsActive"
|
sql = "SELECT DISTINCT rl.Value, a.IsActive"
|
||||||
|
|
Loading…
Reference in New Issue