FR [ 2391012 ] Invoke AD_Form from button
https://sourceforge.net/tracker/index.php?func=detail&aid=2391012&group_id=176962&atid=879335
This commit is contained in:
parent
50bebf4bd6
commit
dba4db09f7
|
@ -1,31 +1,22 @@
|
||||||
/**********************************************************************
|
/******************************************************************************
|
||||||
* This file is part of Adempiere ERP Bazaar *
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
* http://www.adempiere.org *
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
* *
|
* This program is free software;
|
||||||
* Copyright (C) Trifon Trifonov. *
|
you can redistribute it and/or modify it *
|
||||||
* Copyright (C) Contributors *
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
* *
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
* This program is free software, you can redistribute it and/or *
|
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
* modify it under the terms of the GNU General Public License *
|
without even the implied *
|
||||||
* as published by the Free Software Foundation, either version 2 *
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* of the License, or (at your option) any later version. *
|
* See the GNU General Public License for more details. *
|
||||||
* *
|
* You should have received a copy of the GNU General Public License along *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* with this program;
|
||||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
if not, write to the Free Software Foundation, Inc., *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
* GNU General Public License for more details. *
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
* *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* You should have received a copy of the GNU General Public License *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
* along with this program, if not, write to the Free Software *
|
*****************************************************************************/
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
|
||||||
* MA 02110-1301, USA. *
|
|
||||||
* *
|
|
||||||
* Contributors: *
|
|
||||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
|
||||||
* *
|
|
||||||
* Sponsors: *
|
|
||||||
* - Company (http://www.site.com) *
|
|
||||||
**********************************************************************/
|
|
||||||
package org.compiere.model;
|
package org.compiere.model;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -52,18 +43,33 @@ public interface I_AD_Process
|
||||||
|
|
||||||
/** Load Meta Data */
|
/** Load Meta Data */
|
||||||
|
|
||||||
/** Column name AccessLevel */
|
/** Column name AD_Form_ID */
|
||||||
public static final String COLUMNNAME_AccessLevel = "AccessLevel";
|
public static final String COLUMNNAME_AD_Form_ID = "AD_Form_ID";
|
||||||
|
|
||||||
/** Set Data Access Level.
|
/** Set Special Form.
|
||||||
* Access Level required
|
* Special Form
|
||||||
*/
|
*/
|
||||||
public void setAccessLevel (String AccessLevel);
|
public void setAD_Form_ID (int AD_Form_ID);
|
||||||
|
|
||||||
/** Get Data Access Level.
|
/** Get Special Form.
|
||||||
* Access Level required
|
* Special Form
|
||||||
*/
|
*/
|
||||||
public String getAccessLevel();
|
public int getAD_Form_ID();
|
||||||
|
|
||||||
|
public I_AD_Form getAD_Form() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
/** Column name AD_PrintFormat_ID */
|
/** Column name AD_PrintFormat_ID */
|
||||||
public static final String COLUMNNAME_AD_PrintFormat_ID = "AD_PrintFormat_ID";
|
public static final String COLUMNNAME_AD_PrintFormat_ID = "AD_PrintFormat_ID";
|
||||||
|
@ -78,7 +84,7 @@ public interface I_AD_Process
|
||||||
*/
|
*/
|
||||||
public int getAD_PrintFormat_ID();
|
public int getAD_PrintFormat_ID();
|
||||||
|
|
||||||
public I_AD_PrintFormat getAD_PrintFormat() throws Exception;
|
public I_AD_PrintFormat getAD_PrintFormat() throws RuntimeException;
|
||||||
|
|
||||||
/** Column name AD_Process_ID */
|
/** Column name AD_Process_ID */
|
||||||
public static final String COLUMNNAME_AD_Process_ID = "AD_Process_ID";
|
public static final String COLUMNNAME_AD_Process_ID = "AD_Process_ID";
|
||||||
|
@ -106,7 +112,7 @@ public interface I_AD_Process
|
||||||
*/
|
*/
|
||||||
public int getAD_ReportView_ID();
|
public int getAD_ReportView_ID();
|
||||||
|
|
||||||
public I_AD_ReportView getAD_ReportView() throws Exception;
|
public I_AD_ReportView getAD_ReportView() throws RuntimeException;
|
||||||
|
|
||||||
/** Column name AD_Workflow_ID */
|
/** Column name AD_Workflow_ID */
|
||||||
public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID";
|
public static final String COLUMNNAME_AD_Workflow_ID = "AD_Workflow_ID";
|
||||||
|
@ -121,7 +127,20 @@ public interface I_AD_Process
|
||||||
*/
|
*/
|
||||||
public int getAD_Workflow_ID();
|
public int getAD_Workflow_ID();
|
||||||
|
|
||||||
public I_AD_Workflow getAD_Workflow() throws Exception;
|
public I_AD_Workflow getAD_Workflow() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name AccessLevel */
|
||||||
|
public static final String COLUMNNAME_AccessLevel = "AccessLevel";
|
||||||
|
|
||||||
|
/** Set Data Access Level.
|
||||||
|
* Access Level required
|
||||||
|
*/
|
||||||
|
public void setAccessLevel (String AccessLevel);
|
||||||
|
|
||||||
|
/** Get Data Access Level.
|
||||||
|
* Access Level required
|
||||||
|
*/
|
||||||
|
public String getAccessLevel();
|
||||||
|
|
||||||
/** Column name Classname */
|
/** Column name Classname */
|
||||||
public static final String COLUMNNAME_Classname = "Classname";
|
public static final String COLUMNNAME_Classname = "Classname";
|
||||||
|
|
|
@ -40,8 +40,8 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
super (ctx, AD_Process_ID, trxName);
|
super (ctx, AD_Process_ID, trxName);
|
||||||
/** if (AD_Process_ID == 0)
|
/** if (AD_Process_ID == 0)
|
||||||
{
|
{
|
||||||
setAccessLevel (null);
|
|
||||||
setAD_Process_ID (0);
|
setAD_Process_ID (0);
|
||||||
|
setAccessLevel (null);
|
||||||
setEntityType (null);
|
setEntityType (null);
|
||||||
// U
|
// U
|
||||||
setIsBetaFunctionality (false);
|
setIsBetaFunctionality (false);
|
||||||
|
@ -80,39 +80,46 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** AccessLevel AD_Reference_ID=5 */
|
public I_AD_Form getAD_Form() throws RuntimeException
|
||||||
public static final int ACCESSLEVEL_AD_Reference_ID=5;
|
{
|
||||||
/** Organization = 1 */
|
Class<?> clazz = MTable.getClass(I_AD_Form.Table_Name);
|
||||||
public static final String ACCESSLEVEL_Organization = "1";
|
I_AD_Form result = null;
|
||||||
/** Client+Organization = 3 */
|
try {
|
||||||
public static final String ACCESSLEVEL_ClientPlusOrganization = "3";
|
Constructor<?> constructor = null;
|
||||||
/** System only = 4 */
|
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||||
public static final String ACCESSLEVEL_SystemOnly = "4";
|
result = (I_AD_Form)constructor.newInstance(new Object[] {getCtx(), new Integer(getAD_Form_ID()), get_TrxName()});
|
||||||
/** All = 7 */
|
} catch (Exception e) {
|
||||||
public static final String ACCESSLEVEL_All = "7";
|
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||||
/** System+Client = 6 */
|
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||||
public static final String ACCESSLEVEL_SystemPlusClient = "6";
|
throw new RuntimeException( e );
|
||||||
/** Client only = 2 */
|
}
|
||||||
public static final String ACCESSLEVEL_ClientOnly = "2";
|
return result;
|
||||||
/** Set Data Access Level.
|
}
|
||||||
@param AccessLevel
|
|
||||||
Access Level required
|
/** Set Special Form.
|
||||||
|
@param AD_Form_ID
|
||||||
|
Special Form
|
||||||
*/
|
*/
|
||||||
public void setAccessLevel (String AccessLevel)
|
public void setAD_Form_ID (int AD_Form_ID)
|
||||||
{
|
{
|
||||||
if (AccessLevel == null) throw new IllegalArgumentException ("AccessLevel is mandatory");
|
if (AD_Form_ID < 1)
|
||||||
if (AccessLevel.equals("1") || AccessLevel.equals("3") || AccessLevel.equals("4") || AccessLevel.equals("7") || AccessLevel.equals("6") || AccessLevel.equals("2")); else throw new IllegalArgumentException ("AccessLevel Invalid value - " + AccessLevel + " - Reference_ID=5 - 1 - 3 - 4 - 7 - 6 - 2"); set_Value (COLUMNNAME_AccessLevel, AccessLevel);
|
set_Value (COLUMNNAME_AD_Form_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_AD_Form_ID, Integer.valueOf(AD_Form_ID));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get Data Access Level.
|
/** Get Special Form.
|
||||||
@return Access Level required
|
@return Special Form
|
||||||
*/
|
*/
|
||||||
public String getAccessLevel ()
|
public int getAD_Form_ID ()
|
||||||
{
|
{
|
||||||
return (String)get_Value(COLUMNNAME_AccessLevel);
|
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Form_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public I_AD_PrintFormat getAD_PrintFormat() throws Exception
|
public I_AD_PrintFormat getAD_PrintFormat() throws RuntimeException
|
||||||
{
|
{
|
||||||
Class<?> clazz = MTable.getClass(I_AD_PrintFormat.Table_Name);
|
Class<?> clazz = MTable.getClass(I_AD_PrintFormat.Table_Name);
|
||||||
I_AD_PrintFormat result = null;
|
I_AD_PrintFormat result = null;
|
||||||
|
@ -123,7 +130,7 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||||
throw e;
|
throw new RuntimeException( e );
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -173,7 +180,7 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
return ii.intValue();
|
return ii.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public I_AD_ReportView getAD_ReportView() throws Exception
|
public I_AD_ReportView getAD_ReportView() throws RuntimeException
|
||||||
{
|
{
|
||||||
Class<?> clazz = MTable.getClass(I_AD_ReportView.Table_Name);
|
Class<?> clazz = MTable.getClass(I_AD_ReportView.Table_Name);
|
||||||
I_AD_ReportView result = null;
|
I_AD_ReportView result = null;
|
||||||
|
@ -184,7 +191,7 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||||
throw e;
|
throw new RuntimeException( e );
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +219,7 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
return ii.intValue();
|
return ii.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public I_AD_Workflow getAD_Workflow() throws Exception
|
public I_AD_Workflow getAD_Workflow() throws RuntimeException
|
||||||
{
|
{
|
||||||
Class<?> clazz = MTable.getClass(I_AD_Workflow.Table_Name);
|
Class<?> clazz = MTable.getClass(I_AD_Workflow.Table_Name);
|
||||||
I_AD_Workflow result = null;
|
I_AD_Workflow result = null;
|
||||||
|
@ -223,7 +230,7 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||||
throw e;
|
throw new RuntimeException( e );
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -251,6 +258,38 @@ public class X_AD_Process extends PO implements I_AD_Process, I_Persistent
|
||||||
return ii.intValue();
|
return ii.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** AccessLevel AD_Reference_ID=5 */
|
||||||
|
public static final int ACCESSLEVEL_AD_Reference_ID=5;
|
||||||
|
/** Organization = 1 */
|
||||||
|
public static final String ACCESSLEVEL_Organization = "1";
|
||||||
|
/** Client+Organization = 3 */
|
||||||
|
public static final String ACCESSLEVEL_ClientPlusOrganization = "3";
|
||||||
|
/** System only = 4 */
|
||||||
|
public static final String ACCESSLEVEL_SystemOnly = "4";
|
||||||
|
/** All = 7 */
|
||||||
|
public static final String ACCESSLEVEL_All = "7";
|
||||||
|
/** System+Client = 6 */
|
||||||
|
public static final String ACCESSLEVEL_SystemPlusClient = "6";
|
||||||
|
/** Client only = 2 */
|
||||||
|
public static final String ACCESSLEVEL_ClientOnly = "2";
|
||||||
|
/** Set Data Access Level.
|
||||||
|
@param AccessLevel
|
||||||
|
Access Level required
|
||||||
|
*/
|
||||||
|
public void setAccessLevel (String AccessLevel)
|
||||||
|
{
|
||||||
|
if (AccessLevel == null) throw new IllegalArgumentException ("AccessLevel is mandatory");
|
||||||
|
if (AccessLevel.equals("1") || AccessLevel.equals("3") || AccessLevel.equals("4") || AccessLevel.equals("7") || AccessLevel.equals("6") || AccessLevel.equals("2")); else throw new IllegalArgumentException ("AccessLevel Invalid value - " + AccessLevel + " - Reference_ID=5 - 1 - 3 - 4 - 7 - 6 - 2"); set_Value (COLUMNNAME_AccessLevel, AccessLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Data Access Level.
|
||||||
|
@return Access Level required
|
||||||
|
*/
|
||||||
|
public String getAccessLevel ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_AccessLevel);
|
||||||
|
}
|
||||||
|
|
||||||
/** Set Classname.
|
/** Set Classname.
|
||||||
@param Classname
|
@param Classname
|
||||||
Java Classname
|
Java Classname
|
||||||
|
|
|
@ -57,6 +57,7 @@ import javax.swing.SwingUtilities;
|
||||||
import javax.swing.event.ChangeEvent;
|
import javax.swing.event.ChangeEvent;
|
||||||
import javax.swing.event.ChangeListener;
|
import javax.swing.event.ChangeListener;
|
||||||
|
|
||||||
|
import org.compiere.apps.form.FormFrame;
|
||||||
import org.compiere.apps.search.Find;
|
import org.compiere.apps.search.Find;
|
||||||
import org.compiere.grid.APanelTab;
|
import org.compiere.grid.APanelTab;
|
||||||
import org.compiere.grid.GridController;
|
import org.compiere.grid.GridController;
|
||||||
|
@ -77,6 +78,7 @@ import org.compiere.model.GridWindow;
|
||||||
import org.compiere.model.GridWindowVO;
|
import org.compiere.model.GridWindowVO;
|
||||||
import org.compiere.model.GridWorkbench;
|
import org.compiere.model.GridWorkbench;
|
||||||
import org.compiere.model.Lookup;
|
import org.compiere.model.Lookup;
|
||||||
|
import org.compiere.model.MProcess;
|
||||||
import org.compiere.model.MQuery;
|
import org.compiere.model.MQuery;
|
||||||
import org.compiere.model.MRole;
|
import org.compiere.model.MRole;
|
||||||
import org.compiere.model.MUser;
|
import org.compiere.model.MUser;
|
||||||
|
@ -2337,6 +2339,7 @@ public final class APanel extends CPanel
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start Process ----
|
* Start Process ----
|
||||||
|
* or invoke user form
|
||||||
*/
|
*/
|
||||||
|
|
||||||
log.config("Process_ID=" + vButton.getProcess_ID() + ", Record_ID=" + record_ID);
|
log.config("Process_ID=" + vButton.getProcess_ID() + ", Record_ID=" + record_ID);
|
||||||
|
@ -2346,45 +2349,40 @@ public final class APanel extends CPanel
|
||||||
if (m_curTab.needSave(true, false))
|
if (m_curTab.needSave(true, false))
|
||||||
if (!cmd_save(true))
|
if (!cmd_save(true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// hengsin - [ 1639242 ] Inconsistent appearance of Process/Report Dialog
|
// call form
|
||||||
// globalqss - Add support for Don't ShowHelp option in Process
|
|
||||||
// this code must be changed if integrated the parameters and help in only one window
|
|
||||||
/*
|
|
||||||
MProcess pr = new MProcess(m_ctx, vButton.getProcess_ID(), null);
|
MProcess pr = new MProcess(m_ctx, vButton.getProcess_ID(), null);
|
||||||
if (pr.getShowHelp() != null && pr.getShowHelp().equals("N")) {
|
int form_ID = pr.getAD_Form_ID();
|
||||||
startWOasking = true;
|
if (form_ID != 0 )
|
||||||
}
|
|
||||||
// end globalqss
|
|
||||||
|
|
||||||
// Ask user to start process, if Description and Help is not empty
|
|
||||||
|
|
||||||
if (!startWOasking && !(vButton.getDescription().equals("") && vButton.getHelp().equals("")))
|
|
||||||
if (!ADialog.ask(m_curWindowNo, this, "StartProcess?",
|
|
||||||
// "<b><i>" + vButton.getText() + "</i></b><br>" +
|
|
||||||
vButton.getDescription() + "\n" + vButton.getHelp()))
|
|
||||||
return;
|
|
||||||
//
|
|
||||||
String title = vButton.getDescription();
|
|
||||||
if (title == null || title.length() == 0)
|
|
||||||
title = vButton.getName();
|
|
||||||
ProcessInfo pi = new ProcessInfo (title, vButton.getProcess_ID(), table_ID, record_ID);
|
|
||||||
pi.setAD_User_ID (Env.getAD_User_ID(m_ctx));
|
|
||||||
pi.setAD_Client_ID (Env.getAD_Client_ID(m_ctx));
|
|
||||||
pi.setIsBatch(batch);
|
|
||||||
|
|
||||||
// Trx trx = Trx.get(Trx.createTrxName("AppsPanel"), true);
|
|
||||||
ProcessCtl.process(this, m_curWindowNo, pi, null); // calls lockUI, unlockUI
|
|
||||||
*/
|
|
||||||
|
|
||||||
ProcessModalDialog dialog = new ProcessModalDialog(m_ctx, Env.getWindow(m_curWindowNo), Env.getHeader(m_ctx, m_curWindowNo),
|
|
||||||
this, m_curWindowNo, vButton.getProcess_ID(), table_ID,
|
|
||||||
record_ID, startWOasking);
|
|
||||||
if (dialog.isValid())
|
|
||||||
{
|
{
|
||||||
dialog.validate();
|
|
||||||
dialog.pack();
|
if (m_curTab.needSave(true, false))
|
||||||
AEnv.showCenterWindow(Env.getWindow(m_curWindowNo), dialog);
|
if (!cmd_save(true))
|
||||||
|
return;
|
||||||
|
|
||||||
|
FormFrame ff = new FormFrame();
|
||||||
|
String title = vButton.getDescription();
|
||||||
|
if (title == null || title.length() == 0)
|
||||||
|
title = vButton.getName();
|
||||||
|
ProcessInfo pi = new ProcessInfo (title, vButton.getProcess_ID(), table_ID, record_ID);
|
||||||
|
pi.setAD_User_ID (Env.getAD_User_ID(m_ctx));
|
||||||
|
pi.setAD_Client_ID (Env.getAD_Client_ID(m_ctx));
|
||||||
|
ff.setProcessInfo(pi);
|
||||||
|
ff.openForm(form_ID);
|
||||||
|
ff.pack();
|
||||||
|
AEnv.showCenterScreen(ff);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ProcessModalDialog dialog = new ProcessModalDialog(m_ctx, Env.getWindow(m_curWindowNo), Env.getHeader(m_ctx, m_curWindowNo),
|
||||||
|
this, m_curWindowNo, vButton.getProcess_ID(), table_ID,
|
||||||
|
record_ID, startWOasking);
|
||||||
|
if (dialog.isValid())
|
||||||
|
{
|
||||||
|
dialog.validate();
|
||||||
|
dialog.pack();
|
||||||
|
AEnv.showCenterWindow(Env.getWindow(m_curWindowNo), dialog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} // actionButton
|
} // actionButton
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,9 @@ import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Trace;
|
import org.compiere.util.Trace;
|
||||||
|
import org.compiere.process.ProcessInfo;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form Framework
|
* Form Framework
|
||||||
*
|
*
|
||||||
|
@ -85,6 +87,8 @@ public class FormFrame extends CFrame
|
||||||
}
|
}
|
||||||
} // FormFrame
|
} // FormFrame
|
||||||
|
|
||||||
|
private ProcessInfo m_pi;
|
||||||
|
|
||||||
/** WindowNo */
|
/** WindowNo */
|
||||||
private int m_WindowNo;
|
private int m_WindowNo;
|
||||||
/** The GlassPane */
|
/** The GlassPane */
|
||||||
|
@ -407,6 +411,21 @@ public class FormFrame extends CFrame
|
||||||
}
|
}
|
||||||
} // formWindowOpened
|
} // formWindowOpened
|
||||||
|
|
||||||
|
// Add window and tab no called from
|
||||||
|
|
||||||
|
public void setProcessInfo(ProcessInfo pi)
|
||||||
|
{
|
||||||
|
m_pi = pi;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessInfo getProcessInfo()
|
||||||
|
{
|
||||||
|
return m_pi;
|
||||||
|
}
|
||||||
|
|
||||||
|
// End
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start Batch
|
* Start Batch
|
||||||
* @param process
|
* @param process
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
-- 4/12/2008 17:08:52
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56515,1298,0,19,284,'AD_Form_ID',TO_DATE('2008-12-04 17:08:50','YYYY-MM-DD HH24:MI:SS'),100,'Special Form','D',10,'The Special Form field identifies a unique Special Form in the system.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Special Form',0,TO_DATE('2008-12-04 17:08:50','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:08:52
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56515 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:08:57
|
||||||
|
-- Call form from button
|
||||||
|
ALTER TABLE AD_Process ADD AD_Form_ID NUMBER(10)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:11:17
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,56515,56497,0,245,TO_DATE('2008-12-04 17:11:03','YYYY-MM-DD HH24:MI:SS'),100,'Special Form',14,'D','The Special Form field identifies a unique Special Form in the system.','Y','Y','Y','N','N','N','N','N','Special Form',155,0,TO_DATE('2008-12-04 17:11:03','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:11:17
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56497 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
-- 4/12/2008 17:08:52
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,56515,1298,0,19,284,'AD_Form_ID',TO_TIMESTAMP('2008-12-04 17:08:50','YYYY-MM-DD HH24:MI:SS'),100,'Special Form','D',10,'The Special Form field identifies a unique Special Form in the system.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Special Form',0,TO_TIMESTAMP('2008-12-04 17:08:50','YYYY-MM-DD HH24:MI:SS'),100,0)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:08:52
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56515 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:08:57
|
||||||
|
-- Call form from button
|
||||||
|
ALTER TABLE AD_Process ADD COLUMN AD_Form_ID NUMERIC(10)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:11:17
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Field (AD_Client_ID,AD_Column_ID,AD_Field_ID,AD_Org_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,SortNo,Updated,UpdatedBy) VALUES (0,56515,56497,0,245,TO_TIMESTAMP('2008-12-04 17:11:03','YYYY-MM-DD HH24:MI:SS'),100,'Special Form',14,'D','The Special Form field identifies a unique Special Form in the system.','Y','Y','Y','N','N','N','N','N','Special Form',155,0,TO_TIMESTAMP('2008-12-04 17:11:03','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
-- 4/12/2008 17:11:17
|
||||||
|
-- Call form from button
|
||||||
|
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56497 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
|
||||||
|
;
|
||||||
|
|
Loading…
Reference in New Issue