Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

How to open invoice window from process?

Developers
KienDX
2013-01-31
2013-03-08
  • KienDX
    KienDX
    2013-01-31

    I wrote a process to create an invoice. Process is placed in the package org.adempiere.process
    How to open invoice window from prcess? I do in the WebUI.

     
  • Hi,

    you'll find the details in our wiki:
    http://www.adempiere.com/Open_Window_and_Tab
    The AD_Window_ID of the invoice customer window is 167. The id of invoice (vendor) is 183.

    Best regards,
    Karsten

     
  • KienDX
    KienDX
    2013-01-31

    I have tried to do so but failed because I run adempiere WebUI. Library when the writing process is the use of client. Is there a way to write process open invoice has run on the client and the WebUI ?

     
  • Hi Adempiere Community

    I'm trying to do this for web, but I'm having some problems with swing, anybody knows How can I do this works in Web.

    Thanks a lot !!!

    The log error:
    ERROR  ===========> zkoss.handleError:1130: >>java.lang.NoClassDefFoundError: org/jdesktop/swingx/J
    XImageView
    >>java.lang.ClassNotFoundException: No ClassLoaders found for: org.jdesktop.swingx.JXImageView
    >>      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
    >>      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
    >>      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
    >>      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    >>      at org.compiere.apps.APanel.createMenu(APanel.java:463)
    >>      at org.compiere.apps.APanel.<init>(APanel.java:203)
    >>      at org.compiere.apps.AWindow.<init>(AWindow.java:72)
    >>…
     ERROR  ===========> zkoss.handleError:1130: >>java.lang.NoClassDefFoundError: org/jdesktop/swingx/J
    XImageView
    >>java.lang.ClassNotFoundException: No ClassLoaders found for: org.jdesktop.swingx.JXImageView
    >>      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
    >>      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
    >>      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
    >>      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    >>      at org.compiere.apps.APanel.createMenu(APanel.java:463)
    >>      at org.compiere.apps.APanel.<init>(APanel.java:203)
    >>      at org.compiere.apps.AWindow.<init>(AWindow.java:72)
    >>…

     
  • Teo Sarca
    Teo Sarca
    2013-02-06

    Hi,

    In ZK you should use: org.adempiere.webui.apps.AEnv.zoom(int, int)

    More, in case you are trying to open the generated invoice from a process i would recommend to do that by overwritting org.compiere.process.SvrProcess.postProcess(boolean) method.

    Best regards,
    Teo Sarca

     
  • Thanks a lot!!

    It Works perfectly, the code that I used is:

    String whereString = " C_Invoice_ID=1000082 "; //invoice code
    MQuery query = new MQuery("C_Invoice"); //invoice table
    query.addRestriction(whereString);
    int AD_Window_ID = 167; // invoice customer number window
    AEnv.zoom(AD_Window_ID, query); //open window

    Freddy