Openbravo Issue Tracking System - Retail Modules | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0038825 | Retail Modules | Web POS | public | 2018-06-25 13:27 | 2018-06-27 08:59 | |||||||
Reporter | aaroncalero | |||||||||||
Assigned To | jorge-garcia | |||||||||||
Priority | high | Severity | critical | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | RR18Q3 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | marvintm | |||||||||||
OBNetwork customer | OBPS | |||||||||||
Support ticket | ||||||||||||
Regression level | Pre packaging ( pi ) | |||||||||||
Regression date | 2018-05-18 | |||||||||||
Regression introduced in release | pi | |||||||||||
Regression introduced by commit | https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/69f7c826e004 [^] | |||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0038825: Order not saved in WebSQL if the customer is changed while the first product is being added. | |||||||||||
Description | When we have a new order in web pos (without an id) and the first action is adding a product, if this process to add a product is slow and, before it is finished, the customer of the ticket is changed, the order is never saved in WebSQL. When this happens, the WebPOS will continue to work with the receipt object stored in memory, but if the application is refreshed (F5) or the ticket is completed, since there is no WebSQL information for the ticket, it is forever lost. | |||||||||||
Steps To Reproduce | Login in Web POS Open developer tools/browser console and execute the following code: OB.UTIL.HookManager.registerHook('OBPOS_PreCheckDiscount', function(a,b){ setTimeout(function(){ OB.UTIL.HookManager.callbackExecutor(a,b); }, 7000); }); This will delay the execution of the calculateReceipt function for 7 seconds for testing purposes. Create a new ticket Add a product Before the process has finished, change the customer of the receipt. After the calculateReceipt has finished and the webpos is fully usable again, verify in devtools that the following error is shown: [checkBlocked][no-transaction] No result after getInTransaction for [A113684D86C8CE63428A4BAFA0B0D3A1][VBS1/0000108]. This update doesnt make sense - Caller: G.d.save (https://livebuilds.openbravo.com/retail_pi_pgsql/web/js/gen/11b2a41537f5f5d36ddd165e9ed3dfa3.js:27693:16 [^]) - callerInfo: Object.OB.Dal.save (https://livebuilds.openbravo.com/retail_pi_pgsql/web/js/gen/11b2a41537f5f5d36ddd165e9ed3dfa3.js:5440:22 [^]); G.d.save (https://livebuilds.openbravo.com/retail_pi_pgsql/web/js/gen/11b2a41537f5f5d36ddd165e9ed3dfa3.js:27693:16 [^]); saveAndTriggerEvents (https://livebuilds.openbravo.com/retail_pi_pgsql/web/js/gen/11b2a41537f5f5d36ddd165e9ed3dfa3.js:27897:16 [^]); https://livebuilds.openbravo.com/retail_pi_pgsql/web/js/gen/11b2a41537f5f5d36ddd165e9ed3dfa3.js:27937:11; [^] https://livebuilds.openbravo.com/retail_pi_pgsql/web/js/gen/11b2a41537f5f5d36ddd165e9ed3dfa3.js:43118:9; [^] line: https://livebuilds.openbravo.com/retail_pi_pgsql/web/js/gen/11b2a41537f5f5d36ddd165e9ed3dfa3.js:5716:18 [^] (*,+) Finally verify that the c_order table in WebSQL is empty | |||||||||||
Proposed Solution | Move the checking of this.pendingCalculateReceipt (and also OB.MobileApp.model.get('preventOrderSave') as potentially it can provoke the same error) to a few lines earlier, so that the if wraps also the generation of the id in case it doesn't exist. | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=11896&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2018-06-25 13:27 | aaroncalero | New Issue | ||||||||||
2018-06-25 13:27 | aaroncalero | Assigned To | => Retail | |||||||||
2018-06-25 13:27 | aaroncalero | OBNetwork customer | => Yes | |||||||||
2018-06-25 13:27 | aaroncalero | Resolution time | => 1499551200 | |||||||||
2018-06-25 13:27 | aaroncalero | Triggers an Emergency Pack | => No | |||||||||
2018-06-25 15:35 | aaroncalero | Regression level | => Pre packaging ( pi ) | |||||||||
2018-06-25 15:35 | aaroncalero | Regression date | => 2018-05-18 | |||||||||
2018-06-25 15:35 | aaroncalero | Regression introduced in release | => pi | |||||||||
2018-06-25 15:35 | aaroncalero | Regression introduced by commit | => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/69f7c826e004 [^] | |||||||||
2018-06-25 15:36 | aaroncalero | Relationship added | caused by 0038573 | |||||||||
2018-06-25 15:38 | aaroncalero | Proposed Solution updated | ||||||||||
2018-06-25 16:35 | asiermartirena | File Added: issue_38825.export | ||||||||||
2018-06-25 17:40 | jorge-garcia | Status | new => scheduled | |||||||||
2018-06-25 17:40 | jorge-garcia | Assigned To | Retail => jorge-garcia | |||||||||
2018-06-26 08:26 | hgbot | Checkin | ||||||||||
2018-06-26 08:26 | hgbot | Note Added: 0105377 | ||||||||||
2018-06-26 08:26 | hgbot | Status | scheduled => resolved | |||||||||
2018-06-26 08:26 | hgbot | Resolution | open => fixed | |||||||||
2018-06-26 08:26 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/50cea6ba09ebc4b135a52aa89224fc28abcbd8e7 [^] | |||||||||
2018-06-27 08:59 | marvintm | Review Assigned To | => marvintm | |||||||||
2018-06-27 08:59 | marvintm | Status | resolved => closed | |||||||||
2018-06-27 08:59 | marvintm | Fixed in Version | => RR18Q3 |
Notes | |||||
|
|||||
|
|