Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0026073 | Openbravo ERP | 09. Financial management | public | 2014-03-24 18:06 | 2014-03-31 15:25 |
|
Reporter | marvintm | |
Assigned To | pramakrishnan | |
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Review Assigned To | Sandrahuguet |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0026073: When a payment is processed, even if the process fails, the ProcessBundle returns 'success' |
Description | It's possible to call the FIN_PaymentProcess process in such a way that even if it fails, the final result is "success".
This happens due to the fact that the FIN_PaymentProcess indirectly calls the FIN_FinaccTransaction process (to create an automatic financial account transaction), and basically doesn't check if this process finished successfully or not.
This means that if the FIN_FinaccTransaction process ends with error, then the whole database transaction has been rolled back, but the main FIN_PaymentProcess still ends with an error.
We have been able to reproduce this problem with the Web POS (the ending result is very serious, as even though the POS receipts are not saved due to a validation failing in the FIN_FinaccTransaction process, an error is not saved either because the process finished successfully). |
Steps To Reproduce | The way we've been able to reproduce this is the following:
- Install Retail, with the White Valley sampledata.
- Go to the Open/Close Period Control window.
- Go to the current period in the The White Valley Group Calendar
- Close the period for all documents except: AP Payment, AR Receipt, Sales Order
- Go to the Web POS, and complete a receipt. Realize that this receipt cannot be found in Sales Order window, and cannot also be found in the Errors while processing POS data window. It's been lost forever.
|
Proposed Solution | The main problem is the triggerAutomaticFinancialAccountTransaction method in the FIN_PaymentProcess class. This method calls the processTransaction method, but basically ignores its result. Instead of ignoring it, it should get it and if it has returned an error, it should fill its own bundle with it, and return an error.
|
Additional Information | |
Tags | No tags attached. |
Relationships | related to | design defect | 0026020 | RR14Q3 | closed | marvintm | Retail Modules | Failure proof ticket synchronisation with ERP system |
|
Attached Files | issue26073.diff (2,260) 2014-03-24 19:00 https://issues.openbravo.com/file_download.php?file_id=6769&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2014-03-24 18:06 | marvintm | New Issue | |
2014-03-24 18:06 | marvintm | Assigned To | => dmiguelez |
2014-03-24 18:06 | marvintm | Modules | => Core |
2014-03-24 18:06 | marvintm | OBNetwork customer | => No |
2014-03-24 18:06 | marvintm | Triggers an Emergency Pack | => No |
2014-03-24 19:00 | marvintm | File Added: issue26073.diff | |
2014-03-24 19:01 | marvintm | Note Added: 0065408 | |
2014-03-24 19:23 | marvintm | Relationship added | related to 0026020 |
2014-03-30 15:08 | hgbot | Checkin | |
2014-03-30 15:08 | hgbot | Note Added: 0065591 | |
2014-03-30 15:08 | hgbot | Status | new => resolved |
2014-03-30 15:08 | hgbot | Resolution | open => fixed |
2014-03-30 15:08 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/548bfa48bd30d4d151c88e12dd2cec38da095e5c [^] |
2014-03-30 15:13 | hgbot | Checkin | |
2014-03-30 15:13 | hgbot | Note Added: 0065592 | |
2014-03-30 22:47 | hudsonbot | Checkin | |
2014-03-30 22:47 | hudsonbot | Note Added: 0065593 | |
2014-03-30 22:47 | hudsonbot | Checkin | |
2014-03-30 22:47 | hudsonbot | Note Added: 0065594 | |
2014-03-31 15:25 | Sandrahuguet | Assigned To | dmiguelez => pramakrishnan |
2014-03-31 15:25 | Sandrahuguet | Review Assigned To | => Sandrahuguet |
2014-03-31 15:25 | Sandrahuguet | Note Added: 0065616 | |
2014-03-31 15:25 | Sandrahuguet | Status | resolved => closed |
Notes |
|
|
I've attached a diff which should fix the reported issue. However, imho it's very important to review all cases of a process calling a second process, to ensure that in all cases the OBError which the second process returns is considered when building the result of the first process. |
|
|
(0065591)
|
hgbot
|
2014-03-30 15:08
|
|
Repository: erp/devel/pi
Changeset: 548bfa48bd30d4d151c88e12dd2cec38da095e5c
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Sun Mar 30 18:36:39 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/548bfa48bd30d4d151c88e12dd2cec38da095e5c [^]
Fixes Issue 26073: When a payment is processed, even if the process fails, the ProcessBundle returns 'success'
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
|
|
|
(0065592)
|
hgbot
|
2014-03-30 15:13
|
|
Repository: erp/devel/pi
Changeset: bb458216d9b1f8ec9536acb3be2bce74fd471166
Author: Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> openbravo.com>
Date: Sun Mar 30 18:42:52 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/bb458216d9b1f8ec9536acb3be2bce74fd471166 [^]
Related to Issue 26073: When a payment is processed, even if the process fails, the ProcessBundle returns 'success'
---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
---
|
|
|
|
|
|
|
|
|
|
|