Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040465Openbravo ERP09. Financial managementpublic2019-03-27 11:242019-05-21 15:16
caristu 
AtulOpenbravo 
highminorhave not tried
closedfixed 
5
 
3.0PR19Q3 
Sandrahuguet
Core
No
0040465: NPE is thrown in SE_Payment_BPartner callout
A NPE is thrown in SE_Payment_BPartner callout after clearing the "Received From" field in "Payment In" window:

...
Caused by: java.lang.NullPointerException
    at org.openbravo.erpCommon.ad_callouts.SE_Payment_BPartner.execute(SE_Payment_BPartner.java:51) ~[classes/:?]
    at org.openbravo.erpCommon.ad_callouts.SimpleCallout.executeSimpleCallout(SimpleCallout.java:93) ~[classes/:?]
    at org.openbravo.client.application.window.FormInitializationComponent.runCallouts(FormInitializationComponent.java:1504) ~[classes/:?]
    ... 52 more

1) Go the [Payment In] window
2) Select a BP in the "Received From" field
3) Clear the "Received From" field. Note that the NPE is thrown.
No tags attached.
related to defect 0030954 closed aferraz NPE in Payment In/Out when selecting a BP with no default payment method or financial account 
Issue History
2019-03-27 11:24caristuNew Issue
2019-03-27 11:24caristuAssigned To => Triage Finance
2019-03-27 11:24caristuModules => Core
2019-03-27 11:24caristuTriggers an Emergency Pack => No
2019-03-27 11:25caristuRelationship addedrelated to 0030954
2019-03-27 11:42SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2019-03-27 18:34AtulOpenbravoStatusnew => scheduled
2019-03-28 03:47AtulOpenbravoNote Added: 0110710
2019-04-02 09:29hgbotCheckin
2019-04-02 09:29hgbotNote Added: 0110957
2019-04-02 09:29hgbotStatusscheduled => resolved
2019-04-02 09:29hgbotResolutionopen => fixed
2019-04-02 09:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a1661bb0744d6fb2207d83c217f8ba14a6b8f4e8 [^]
2019-04-02 09:30SandrahuguetReview Assigned To => Sandrahuguet
2019-04-02 09:30SandrahuguetNote Added: 0110958
2019-04-02 09:30SandrahuguetStatusresolved => closed
2019-04-02 09:30SandrahuguetFixed in Version => 3.0PR19Q3
2019-05-21 15:16hudsonbotCheckin
2019-05-21 15:16hudsonbotNote Added: 0111956

Notes
(0110710)
AtulOpenbravo   
2019-03-28 03:47   
Test Plan
- Login and F&B International Group admin role.
- Navigate to Payment In, select business partner in "Received From" field.
- Set "Received From" field as blank again.
- Realize that in console logs, NPE is not thrown any more.
(0110957)
hgbot   
2019-04-02 09:29   
Repository: erp/devel/pi
Changeset: a1661bb0744d6fb2207d83c217f8ba14a6b8f4e8
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Thu Mar 28 07:19:45 2019 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/a1661bb0744d6fb2207d83c217f8ba14a6b8f4e8 [^]

Fixes Issue 0040465: NPE is thrown in SE_Payment_BPartner callout

** Use StringUtils to avoid NPE and check whether strcBpartnerId
is not empty before fetching default payment method & financial
account of business partner.

---
M src/org/openbravo/erpCommon/ad_callouts/SE_Payment_BPartner.java
---
(0110958)
Sandrahuguet   
2019-04-02 09:30   
Code review + testing OK
(0111956)
hudsonbot   
2019-05-21 15:16   
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/9b8f37d9d85e [^]
Maturity status: Test