Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020058Openbravo ERP04. Warehouse managementpublic2012-03-20 11:462012-04-02 06:11
vmromanos 
dmiguelez 
normalmajoralways
closedfixed 
20Debian 5.0
 
 
Core
No
0020058: NullPointerException in SL_Requisition_BPartner_PriceList callout
The SL_Requisition_BPartner_PriceList callout throws a NullPointerException in case the Business Partner has not defined a Price List.

a3196480 1093170 [http-8080-1] ERROR org.openbravo.erpCommon.ad_callouts.SL_Requisition_BPartner_PriceList - Error captured:
java.lang.NullPointerException
    at org.openbravo.erpCommon.ad_callouts.SL_Requisition_BPartner_PriceList.printPage(SL_Requisition_BPartner_PriceList.java:85)
    at org.openbravo.erpCommon.ad_callouts.SL_Requisition_BPartner_PriceList.doPost(SL_Requisition_BPartner_PriceList.java:56)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
Go to Requisition Window
Select USA org
Select Creditor Business Partner (which doesn't have a Price List)
The NPE is thrown
strResult.append("new Array(\"inpmPricelistId\", \""
              + bPartner.getPurchasePricelist().getId() + "\"),");
          strResult.append("new Array(\"inpcCurrencyId\", \""
              + bPartner.getPurchasePricelist().getCurrency().getId() + "\")");

check bPartner.getPurchasePricelist() is not null
No tags attached.
related to defect 0018658 closed dmiguelez Requisition window shows the currency setup at Client level regardless the Organization being selected. 
Issue History
2012-03-20 11:46vmromanosNew Issue
2012-03-20 11:46vmromanosAssigned To => dmiguelez
2012-03-20 11:46vmromanosModules => Core
2012-03-20 11:46vmromanosRelationship addedrelated to 0018658
2012-03-20 13:15dmiguelezStatusnew => scheduled
2012-03-20 13:15dmiguelezfix_in_branch => pi
2012-03-20 13:56dmiguelezNote Added: 0046559
2012-03-22 10:21hgbotCheckin
2012-03-22 10:21hgbotNote Added: 0046640
2012-03-22 10:21hgbotStatusscheduled => resolved
2012-03-22 10:21hgbotResolutionopen => fixed
2012-03-22 10:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/72ef117e9d711114da81e23b393cfb840af36137 [^]
2012-03-22 10:22vmromanosNote Added: 0046641
2012-03-22 10:22vmromanosStatusresolved => closed
2012-04-02 06:11hudsonbotCheckin
2012-04-02 06:11hudsonbotNote Added: 0047199

Notes
(0046559)
dmiguelez   
2012-03-20 13:56   
Test Plan:

Go to Requisition Window
Select USA org
Select Creditor Business Partner (which doesn't have a Price List)
Check that not NPE is thrown in the console
(0046640)
hgbot   
2012-03-22 10:21   
Repository: erp/devel/pi
Changeset: 72ef117e9d711114da81e23b393cfb840af36137
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Mar 20 13:56:02 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/72ef117e9d711114da81e23b393cfb840af36137 [^]

Fixes issue 20058: Checks for a possible null pointer exception when selecting PriceList

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Requisition_BPartner_PriceList.java
---
(0046641)
vmromanos   
2012-03-22 10:22   
code review + testing OK
(0047199)
hudsonbot   
2012-04-02 06:11   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7814864461ac [^]

Maturity status: Test