Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030954Openbravo ERP09. Financial managementpublic2015-09-29 10:342017-05-16 11:34
aferraz 
aferraz 
lowtrivialalways
closedfixed 
30Professional Appliance
 
3.0PR16Q1 
vmromanos
Core
No
0030954: NPE in Payment In/Out when selecting a BP with no default payment method or financial account
When selecting a Business Partner in Payment In or Payment Out window without a defualt Payment Method or a default Financial Account, a NPE is raised in SE_Payment_BPartner.java callout.
Go to Business Partner window and select "Alimentos y Supermercados, S.A"
Move to Customer tab and leave Payment Method and Financial Account empty.

Go to Payment In, and create a new header.
Select "Alimentos y Supermercados, S.A" as Received From
Realize a NPE is raised in the log.

The same happens in Payment Out window.
No tags attached.
related to defect 0029368 closed jorge-garcia It is possible to create a payment header when a payment method is disabled in a given financial account 
related to defect 0040465 closed AtulOpenbravo NPE is thrown in SE_Payment_BPartner callout 
Issue History
2015-09-29 10:34aferrazNew Issue
2015-09-29 10:34aferrazAssigned To => aferraz
2015-09-29 10:34aferrazModules => Core
2015-09-29 10:34aferrazTriggers an Emergency Pack => No
2015-09-29 10:41aferrazRelationship addedrelated to 0029368
2015-10-05 15:03psanjuanNote Added: 0080825
2015-10-06 12:03psanjuanNote Edited: 0080825bug_revision_view_page.php?bugnote_id=0080825#r9617
2015-10-06 12:03psanjuanNote Added: 0080841
2015-12-15 18:12vmromanosStatusnew => scheduled
2015-12-15 18:25hgbotCheckin
2015-12-15 18:25hgbotNote Added: 0082780
2015-12-15 18:25hgbotStatusscheduled => resolved
2015-12-15 18:25hgbotResolutionopen => fixed
2015-12-15 18:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e7bf20e738da0845ea7aed3fa64e2c495a3b9320 [^]
2015-12-15 18:25vmromanosReview Assigned To => vmromanos
2015-12-15 18:25vmromanosNote Added: 0082781
2015-12-15 18:25vmromanosStatusresolved => closed
2015-12-17 17:49hudsonbotCheckin
2015-12-17 17:49hudsonbotNote Added: 0082843
2017-05-16 11:34aferrazFixed in Version => 3.0PR16Q1
2019-03-27 11:25caristuRelationship addedrelated to 0040465

Notes
(0080825)
psanjuan   
2015-10-05 15:03   
(edited on: 2015-10-06 12:03)
Test Plan
Do not apply the patch

Go to Business Partner window and select "Alimentos y Supermercados, S.A"
Move to Customer tab and leave Payment Method and Financial Account empty.

Go to Payment In, and create a new header.
Select "Alimentos y Supermercados, S.A" as Received From
Realize a NPE is raised in the log (Eclipse, if configured as log4j.category.reloadXml=DEBUG)

ERROR org.openbravo.erpCommon.ad_callouts.SE_Payment_BPartner - Error captured:
java.lang.NullPointerException

Apply the patch.

Follow the same steps and verify that the NPE is not shown but this message:
INFO org.openbravo.erpCommon.ad_callouts.SE_Payment_BPartner - No default info for the selected business partner

(0080841)
psanjuan   
2015-10-06 12:03   
Test Plan above verified.
(0082780)
hgbot   
2015-12-15 18:25   
Repository: erp/devel/pi
Changeset: e7bf20e738da0845ea7aed3fa64e2c495a3b9320
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Sep 29 12:00:47 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e7bf20e738da0845ea7aed3fa64e2c495a3b9320 [^]

Fixes issue 30954: NPE in SE_Payment_BPartner callout

A NPE was raised in SE_Payment_BPartner callout, when selecting a business partner in Payment In or Payment Out window with no default payment method or financial account.

---
M src/org/openbravo/erpCommon/ad_callouts/SE_Payment_BPartner.java
---
(0082781)
vmromanos   
2015-12-15 18:25   
Code review OK
(0082843)
hudsonbot   
2015-12-17 17:49   
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/7bb1cbcee3ce [^]
Maturity status: Test