IDEMPIERE-3603 checking permission on doctype instead of doctypetarge

This commit is contained in:
Carlos Ruiz 2018-01-08 17:11:42 +01:00
parent 3c10b2c455
commit a96a27c12a
1 changed files with 2 additions and 2 deletions

View File

@ -178,9 +178,9 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
index = ((DocOptions) po).customizeValidActions(DocStatus, Processing, OrderType, IsSOTrx, index = ((DocOptions) po).customizeValidActions(DocStatus, Processing, OrderType, IsSOTrx,
m_AD_Table_ID, docActionHolder, options, index); m_AD_Table_ID, docActionHolder, options, index);
Integer doctypeId = (Integer)gridTab.getValue("C_DocType_ID"); Integer doctypeId = (Integer)gridTab.getValue("C_DocTypeTarget_ID");
if(doctypeId==null || doctypeId.intValue()==0){ if(doctypeId==null || doctypeId.intValue()==0){
doctypeId = (Integer)gridTab.getValue("C_DocTypeTarget_ID"); doctypeId = (Integer)gridTab.getValue("C_DocType_ID");
} }
if (doctypeId == null && MAllocationHdr.Table_ID == m_AD_Table_ID) { if (doctypeId == null && MAllocationHdr.Table_ID == m_AD_Table_ID) {
doctypeId = MDocType.getDocType(MDocType.DOCBASETYPE_PaymentAllocation); doctypeId = MDocType.getDocType(MDocType.DOCBASETYPE_PaymentAllocation);