Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018752Openbravo ERP09. Financial managementpublic2011-10-11 13:102011-12-02 11:47
mirurita 
ioritzCia 
normalminoralways
closedfixed 
5
 
 
Advanced Payables and Receivables Mngmt
No
0018752: FIN_AddPayment - savePayment method not managing properly exceptions
org.openbravo.advpaymentmngt.process.FIN_AddPayment

savePayment method not managing properly exceptions.

it should raise the exception to be caught by caller method.
1) Modify APRM_FIN_PMT_CHECK_TRG adding a raise exception at the beginning
RAISE EXCEPTION '%', '@20501@'; --OBTG:-20000--
2) Create a new sales invoice and complete
3) Click on Add Payment In button
4) On the popup click on OK button
Realize that the message shown is a generic message (it provides useless information to the user) and if you raise the exception using the message search key (i.e. @20501@) the exception is not translated.
catch the flush event
 OBDal.getInstance().flush();

when calling this method you should manage then catch the exception this method can return. (for example in AddPaymentFromInvoice.)

No tags attached.
depends on backport 0019135 closed ioritzCia FIN_AddPayment - savePayment method not managing properly exceptions 
png Exception - savePayment.png (79,880) 2011-10-11 13:10
https://issues.openbravo.com/file_download.php?file_id=4632&type=bug
png

diff proposed_solution_TBD.diff (5,165) 2011-10-11 16:10
https://issues.openbravo.com/file_download.php?file_id=4633&type=bug
Issue History
2011-10-11 13:10miruritaNew Issue
2011-10-11 13:10miruritaAssigned To => jonalegriaesarte
2011-10-11 13:10miruritaFile Added: Exception - savePayment.png
2011-10-11 13:10miruritaModules => Advanced Payables and Receivables Mngmt
2011-10-11 13:10miruritaResolution time => 1324335600
2011-10-11 16:10miruritaFile Added: proposed_solution_TBD.diff
2011-11-10 13:07jonalegriaesarteAssigned Tojonalegriaesarte => ioritzCia
2011-11-22 12:34ioritzCiaStatusnew => scheduled
2011-11-22 12:34ioritzCiafix_in_branch => pi
2011-11-24 10:34hgbotCheckin
2011-11-24 10:34hgbotNote Added: 0043140
2011-11-24 10:34hgbotStatusscheduled => resolved
2011-11-24 10:34hgbotResolutionopen => fixed
2011-11-24 10:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b92d77dfa7d39d9611bfc69d359d98baf4847bc8 [^]
2011-11-24 13:23ioritzCiaNote Added: 0043155
2011-11-30 12:29hudsonbotCheckin
2011-11-30 12:29hudsonbotNote Added: 0043433
2011-12-02 11:47miruritaNote Added: 0043692
2011-12-02 11:47miruritaStatusresolved => closed

Notes
(0043140)
hgbot   
2011-11-24 10:34   
Repository: erp/devel/pi
Changeset: b92d77dfa7d39d9611bfc69d359d98baf4847bc8
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Mon Nov 21 09:38:04 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b92d77dfa7d39d9611bfc69d359d98baf4847bc8 [^]

Fixes issue 18752: FIN_AddPayment - savePayment method
not managing properly exceptions.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
---
(0043155)
ioritzCia   
2011-11-24 13:23   
Test Plan:

- Follow the steps to reproduce.
- Try to launch on purpose other exceptions inside that try block as Null Pointer Exceptions or other type. See that it handles properly the ones that it has to and that the shows the message of the ones that does not have to handle.
(0043433)
hudsonbot   
2011-11-30 12:29   
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/01809c7b3135 [^]

Maturity status: Test
(0043692)
mirurita   
2011-12-02 11:47   
Verified on revision 14787:d63e0b9b9bcc