Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037080Retail ModulesWeb POSpublic2017-10-16 18:172018-03-06 18:44
migueldejuana 
jorge-garcia 
normalminoralways
closedfixed 
5
 
RR18Q1 
marvintm
No
0037080: addPaidReceipt function do not finish when ob.dal.save fails (remains locked)
If addPaidReceipt gives an error doing "OB.Dal.save(model" SynchronizationHelper remains busy because it is never finished in the SynchronizationHelper.

If we do not finish an action, the SynchronizationHelper gets locked(this.isLocked === true) and Done button is disabled forever.
- Login Web POS
- Open Layaways modal and load one
- Make this save fail: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/88b97ce3fcd9/web/org.openbravo.retail.posterminal/js/model/order.js#l5180 [^]
- We do not Synchronization when failing: https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/88b97ce3fcd9/web/org.openbravo.retail.posterminal/js/model/order.js#l5184 [^]
Add these lines:

    enyo.$.scrim.hide();
    OB.UTIL.SynchronizationHelper.finished(synchId, 'addPaidReceipt');

before:

https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/88b97ce3fcd9/web/org.openbravo.retail.posterminal/js/model/order.js#l5184 [^]
No tags attached.
Issue History
2017-10-16 18:17migueldejuanaNew Issue
2017-10-16 18:17migueldejuanaAssigned To => Retail
2017-10-16 18:17migueldejuanaTriggers an Emergency Pack => No
2017-10-17 16:04hgbotCheckin
2017-10-17 16:04hgbotNote Added: 0099928
2017-10-17 16:04hgbotStatusnew => resolved
2017-10-17 16:04hgbotResolutionopen => fixed
2017-10-17 16:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.scanreceipt/rev/18b563ea421cb518bff43270e47d94f9473fd64a [^]
2017-10-17 17:23jorge-garciaAssigned ToRetail => jorge-garcia
2017-10-18 09:05hgbotCheckin
2017-10-18 09:05hgbotNote Added: 0099932
2017-10-24 16:03migueldejuanaNote Added: 0100034
2017-10-26 12:49marvintmResolution time => 1509490800
2017-10-26 12:55marvintmReview Assigned To => marvintm
2017-10-26 12:55marvintmStatusresolved => closed
2017-10-26 12:55marvintmFixed in Version => RR18Q1
2018-02-20 15:00hgbotCheckin
2018-02-20 15:00hgbotNote Added: 0102529
2018-02-20 15:00hgbotStatusclosed => resolved
2018-02-20 15:00hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.scanreceipt/rev/18b563ea421cb518bff43270e47d94f9473fd64a [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0722d188e2dc9681b832dcef85a8a3904df6937f [^]
2018-02-26 08:51marvintmResolution time1509490800 =>
2018-03-06 18:44marvintmStatusresolved => closed

Notes
(0099928)
hgbot   
2017-10-17 16:04   
Repository: erp/pmods/org.openbravo.retail.scanreceipt
Changeset: 18b563ea421cb518bff43270e47d94f9473fd64a
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Oct 17 15:46:49 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.scanreceipt/rev/18b563ea421cb518bff43270e47d94f9473fd64a [^]

Fixed issue 37080: addPaidReceipt function do not finish when ob.dal.save
fails (remains locked)

The solution proposed is to sequentially load scanned receipts, waiting until
the receipt is fully loaded (shown in the UI and recalculated).

---
M web/org.openbravo.retail.scanreceipt/js/OBSRUtils.js
---
(0099932)
hgbot   
2017-10-18 09:05   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 25fb161fe29739286e42041111c39f2e3eeaea1d
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Oct 17 15:48:24 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/25fb161fe29739286e42041111c39f2e3eeaea1d [^]

Related to issue 37080: addPaidReceipt function do not finish when ob.dal.save
fails (remains locked)

The function addPaidReceipt need to execute a callback. This is needed to
avoid execution in parallel of the function.

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0100034)
migueldejuana   
2017-10-24 16:03   
Tests following flows:

- Scan a layaway twice very fast
- Scan 2 layaways very fasta
- Scan 2 related layaways. When scanning first layaway, a modal will show "Do you want to load related receipts?" Do not select any option in the modal an scan another layaway.

Ensure that this 3 cases do not give a js error. You also can check if SynchronizationHelper has finished all requests.
(0102529)
hgbot   
2018-02-20 15:00   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 0722d188e2dc9681b832dcef85a8a3904df6937f
Author: Asier Martirena <asier.martirena <at> openbravo.com>
Date: Tue Oct 24 10:58:03 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0722d188e2dc9681b832dcef85a8a3904df6937f [^]

Fixed issue 37080: addPaidReceipt function do not finish when ob.dal.save
fails (remains locked)

The solution proposed is to sequentially load scanned receipts, waiting until
the receipt is fully loaded (shown in the UI and recalculated).

---
M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/utils/orderSelectorUtils.js
---