Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030314Openbravo ERP08. Project and service managementpublic2015-07-03 14:122015-10-05 19:11
ngarcia 
Triage Omni OMS 
immediatemajoralways
closedduplicate 
5
 
3.0PR15Q3.2 
ngarcia
No
Core
No
0030314: NullPointerException when launching the Create AP Expense Invoices process
NullPointerException when launching the Create AP Expense Invoices process. As new connection is opened, when trying to access the invoice through DAL in the getDeferredPlanForInvoiceProduct() of the AccDefUtility class is it not available:

Invoice invoice = OBDal.getInstance().get(Invoice.class, invoiceId);
isSOTRX = invoice.isSalesTransaction();



As group admin role:
   Create a new Product:
      Product Type = Expense Type
   Add a price to it
   Set Javier Martin as Vendor and set the default values for Purchase Price List, Payment method...
   Create a Expense Sheet for Javier Martin and add a line to it with the previously created product
      Time Sheet = 'N'
   Process it
   Launch the Create AP Expense Invoices process and NullPointerException error is shown

java.lang.NullPointerException
    at org.openbravo.erpCommon.utility.AccDefUtility.getDeferredPlanForInvoiceProduct(AccDefUtility.java:139)
    at org.openbravo.erpCommon.ad_process.ExpenseAPInvoice.processExpense(ExpenseAPInvoice.java:323)
    at org.openbravo.erpCommon.ad_process.ExpenseAPInvoice.doPost(ExpenseAPInvoice.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
No tags attached.
duplicate of defect 0030811 closed dmiguelez Openbravo ERP process: "Create expense AP Invoice" does not work 
caused by defect 0028934 closed inigosanchez Modules Error when launching "Create AP Expense Invoices" related to Openbravo External Connection Pools module. 
Issue History
2015-07-03 14:12ngarciaNew Issue
2015-07-03 14:12ngarciaAssigned To => Triage Finance
2015-07-03 14:12ngarciaOBNetwork customer => No
2015-07-03 14:12ngarciaModules => Core
2015-07-03 14:12ngarciaTriggers an Emergency Pack => No
2015-07-03 14:12ngarciaIssue Monitored: networkb
2015-07-03 14:13ngarciaRelationship addedcaused by 0028934
2015-07-03 14:20ngarciaAssigned ToTriage Finance => inigosanchez
2015-07-06 08:45alostaleNote Added: 0078647
2015-07-06 08:46alostaleAssigned Toinigosanchez => Triage Finance
2015-10-05 19:11ngarciaReview Assigned To => ngarcia
2015-10-05 19:11ngarciaRelationship addedduplicate of 0030811
2015-10-05 19:11ngarciaStatusnew => closed
2015-10-05 19:11ngarciaResolutionopen => duplicate
2015-10-05 19:11ngarciaFixed in Version => 3.0PR15Q3.2

Notes
(0078647)
alostale   
2015-07-06 08:45   
Changeset for issue 0028934 makes a correct use of transactional connection to create all invoices in a single transaction using sqlc, the problem is AccDefUtility is querying for those new created invoices in another transaction which has no visibility of the one creating the invoices.