Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027640Retail ModulesWeb POSpublic2014-09-18 18:032014-09-23 08:31
adrianromero 
adrianromero 
urgentmajorhave not tried
closedfixed 
5
 
RR14Q4 
migueldejuana
No
0027640: Errors in OB.Dal.save callbacks should not rollback the transaction.
The OB.Dal.save function:

OB.Dal.save = function (model, success, error, forceInsert)
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/da6fd82667d5/web/org.openbravo.mobile.core/source/data/ob-dal.js#l330 [^]

If the 'success' callback function throws an error, the websql transaction is rolled back

It is assumed in all calls to the OB.Dal.save that an error in the success callback does not have to rollback the transaction
In the line: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/79500303f4b7/web/org.openbravo.retail.posterminal/js/data/dataordersave.js#l109 [^]

Throw an error:

throw "error";

And verify that when closing an order, the order is kept in the websql database as not paid
No tags attached.
Issue History
2014-09-18 18:03adrianromeroNew Issue
2014-09-18 18:03adrianromeroAssigned To => adrianromero
2014-09-18 18:03adrianromeroTriggers an Emergency Pack => No
2014-09-18 18:12adrianromeroReview Assigned To => marvintm
2014-09-22 16:19mtaalTarget VersionRR14Q4 =>
2014-09-22 18:18hgbotCheckin
2014-09-22 18:18hgbotNote Added: 0070247
2014-09-22 18:18hgbotStatusnew => resolved
2014-09-22 18:18hgbotResolutionopen => fixed
2014-09-22 18:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/208a8f23b274b045c7522106e6c55f1a13b315a7 [^]
2014-09-23 08:31migueldejuanaReview Assigned Tomarvintm => migueldejuana
2014-09-23 08:31migueldejuanaNote Added: 0070263
2014-09-23 08:31migueldejuanaStatusresolved => closed
2014-09-23 08:31migueldejuanaFixed in Version => RR14Q4

Notes
(0070247)
hgbot   
2014-09-22 18:18   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 208a8f23b274b045c7522106e6c55f1a13b315a7
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Sep 22 18:16:57 2014 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/208a8f23b274b045c7522106e6c55f1a13b315a7 [^]

Fixes issue 0027640: Errors in OB.Dal.save callbacks should not rollback the transaction.

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
---
(0070263)
migueldejuana   
2014-09-23 08:31   
tested and reviewed in dac0cfbd526b