Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032459Openbravo ERP09. Financial managementpublic2016-03-11 11:292016-03-11 11:34
alostale 
Triage Omni OMS 
normalminorN/A
newopen 
5
 
 
Core
No
0032459: Invoice processing cannot be easily invoked programmatically
Invoice completion process (implemented by org.openbravo.advpaymentmngt.ad_actionbutton.ProcessInvoice) cannot be easily programmatically invoked.

A real use case:

A customer wants to directly invoke from UI invoice processing without displaying the intermediate popup asking for action for the document because in their flow there is always a single option there. Additionally to processing, they want to do extra actions afterwards but always when the button is clicked.

Implementation:

The problem can be solved by implementing a Process Definition which doesn't show any UI, invokes a Java handler which does the processing and the extra required steps. In order to implement the processing part, it is required to get a servlet instance in order to call the post method on it, which is an overhead in terms of code clarity as well as stack. See attached example.
-A new class should be created for Invoice processing, with the only responsibility of doing the process
-Servlet should be just an entry point which finally invokes this new class

Having this in place invoices could be processed without the need of the Servlet, by just using the new class.
No tags attached.
? CompleteInvoice.java (3,897) 2016-03-11 11:34
https://issues.openbravo.com/file_download.php?file_id=9151&type=bug
Issue History
2016-03-11 11:29alostaleNew Issue
2016-03-11 11:29alostaleAssigned To => Triage Finance
2016-03-11 11:29alostaleModules => Core
2016-03-11 11:29alostaleTriggers an Emergency Pack => No
2016-03-11 11:34alostaleFile Added: CompleteInvoice.java

There are no notes attached to this issue.