diff --git a/client/src/org/compiere/apps/ProcessDialog.java b/client/src/org/compiere/apps/ProcessDialog.java index 538435f161..e7a2192872 100644 --- a/client/src/org/compiere/apps/ProcessDialog.java +++ b/client/src/org/compiere/apps/ProcessDialog.java @@ -253,6 +253,11 @@ public class ProcessDialog extends CFrame // anyway show resulting window } } + + // Check if the process is a silent one + if(m_ShowHelp != null && m_ShowHelp.equals("S")) + bOK.doClick(); + dialog.revalidate(); return true; } // init @@ -320,6 +325,10 @@ public class ProcessDialog extends CFrame // Close automatically if (m_IsReport && !pi.isError()) bOK.doClick(); + + // If the process is a silent one and no errors occured, close the dialog + if(m_ShowHelp != null && m_ShowHelp.equals("S")) + bOK.doClick(); } // unlockUI /** diff --git a/client/src/org/compiere/apps/ProcessParameter.java b/client/src/org/compiere/apps/ProcessParameter.java index 42457bd692..aec42d7f23 100644 --- a/client/src/org/compiere/apps/ProcessParameter.java +++ b/client/src/org/compiere/apps/ProcessParameter.java @@ -475,24 +475,23 @@ public class ProcessParameter extends CDialog return m_isOK; } // isOK - /** deathmeat: POSTPONED TO END OF BUG FIXING BEFORE 3.2 */ -// public void setVisible(boolean b) -// { -// MProcess m_process = new MProcess(Env.getCtx(), -// m_processInfo.getAD_Process_ID(), null); -// if(m_process.getShowHelp() != null && m_process.getShowHelp().equals("S")) -// { -// // It is defined as a silent process -// if(saveParameters()) -// { -// m_isOK = true; -// dispose(); -// } -// } -// else -// { -// // Not a silent process -// super.setVisible(b); -// } -// } + public void setVisible(boolean b) + { + MProcess m_process = new MProcess(Env.getCtx(), + m_processInfo.getAD_Process_ID(), null); + if(m_process.getShowHelp() != null && m_process.getShowHelp().equals("S")) + { + // It is defined as a silent process + if(saveParameters()) + { + m_isOK = true; + dispose(); + } + } + else + { + // Not a silent process + super.setVisible(b); + } + } } // ProcessParameter diff --git a/migration/315-trunk/001_allow_silent_processes.sql b/migration/315-trunk/001_allow_silent_processes.sql index 20c192d085..ca9ccc393d 100644 --- a/migration/315-trunk/001_allow_silent_processes.sql +++ b/migration/315-trunk/001_allow_silent_processes.sql @@ -1,11 +1,9 @@ --- POSTPONED TO END OF BUG FIXING BEFORE 3.2 +Insert into "AD_REF_LIST" + ("AD_REF_LIST_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY", + "UPDATED","UPDATEDBY","VALUE","NAME","DESCRIPTION","AD_REFERENCE_ID","VALIDFROM", + "VALIDTO","ENTITYTYPE") + values + (50040,0,0,'Y',to_date('02.03.07','DD.MM.RR'),0,to_date('02.03.07','DD.MM.RR'), + 0,'S','Run silently - Take Defaults',null,50007,null,null,'D'); --- Insert into "AD_REF_LIST" --- ("AD_REF_LIST_ID","AD_CLIENT_ID","AD_ORG_ID","ISACTIVE","CREATED","CREATEDBY", --- "UPDATED","UPDATEDBY","VALUE","NAME","DESCRIPTION","AD_REFERENCE_ID","VALIDFROM", --- "VALIDTO","ENTITYTYPE") --- values --- (50040,0,0,'Y',to_date('02.03.07','DD.MM.RR'),0,to_date('02.03.07','DD.MM.RR'), --- 0,'S','Run silently - Take Defaults',null,50007,null,null,'D'); - ---COMMIT; +COMMIT;