Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013852Openbravo ERP07. Sales managementpublic2010-06-30 18:492010-07-24 00:00
jonalegriaesarte 
adrianromero 
urgentmajorhave not tried
closedfixed 
5
pi 
2.50MP20 
Core
No
0013852: Rollback missed in CreateFrom class
In file src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java, method saveInvoice a rollback is missed in this piece of code:
if (isSOTrx.equals("Y"))
       data = CreateFromInvoiceData.selectFromShipmentUpdateSOTrx(conn, this, strClaves);
else
       data = CreateFromInvoiceData.selectFromShipmentUpdate(conn, this, strClaves);

dataAux = CreateFromInvoiceData.selectPriceList(conn, this, strDateInvoiced, strPriceList);
if (dataAux == null || dataAux.length == 0) {
      myMessage = Utility.translateError(this, vars, vars.getLanguage(),
"PriceListVersionNotFound");
      return myMessage;
}

The rollback (releaseRollbackConnection(conn) line) must be before the return. This problem could happen in other pieces of code.
The code must be

if (dataAux == null || dataAux.length == 0) {
      myMessage = Utility.translateError(this, vars, vars.getLanguage(),
"PriceListVersionNotFound");
      releaseRollbackConnection(conn);
      return myMessage;
}
No tags attached.
Issue History
2010-06-30 18:49jonalegriaesarteNew Issue
2010-06-30 18:49jonalegriaesarteAssigned To => adrianromero
2010-07-05 13:25adrianromeroStatusnew => scheduled
2010-07-05 13:25adrianromerofix_in_branch => pi
2010-07-11 07:30hgbotCheckin
2010-07-11 07:30hgbotNote Added: 0029210
2010-07-11 07:30hgbotStatusscheduled => resolved
2010-07-11 07:30hgbotResolutionopen => fixed
2010-07-11 07:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5dd3d4843cb36bbb63b134f51e2a3c79ac68484b [^]
2010-07-11 07:31harikrishnanNote Added: 0029211
2010-07-14 04:43hudsonbotCheckin
2010-07-14 04:43hudsonbotNote Added: 0029280
2010-07-23 11:16psarobeNote Added: 0029511
2010-07-23 11:16psarobeStatusresolved => closed
2010-07-24 00:00anonymoussf_bug_id0 => 3033806

Notes
(0029210)
hgbot   
2010-07-11 07:30   
Repository: erp/devel/pi
Changeset: 5dd3d4843cb36bbb63b134f51e2a3c79ac68484b
Author: Harikrishnan Raja <harikrishnan.raja <at> openbravo.com>
Date: Sun Jul 11 10:56:34 2010 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/5dd3d4843cb36bbb63b134f51e2a3c79ac68484b [^]

Fixes issue 13852: Rollback missed in CreateFrom class.

---
M src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
---
(0029211)
harikrishnan   
2010-07-11 07:31   
Steps to test:

*The fix is to be tested in "Create Lines From" button in sales invoice.

Root Cause:

*Before when error is thrown this rolling back is not their.

Impact:

Their is no impact of this changeset.
(0029280)
hudsonbot   
2010-07-14 04:43   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/5dd3d4843cb3 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/2a91111beef4 [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17878.obx [^]
(0029511)
psarobe   
2010-07-23 11:16   
Verified by code review