Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0038825 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | critical | always | 2018-06-25 13:27 | 2018-06-27 08:59 | |||
Reporter | aaroncalero | View Status | public | |||||
Assigned To | jorge-garcia | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR18Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 50cea6ba09eb | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
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. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
||||||||
|
![]() |
|
(0105377) hgbot (developer) 2018-06-26 08:26 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 50cea6ba09ebc4b135a52aa89224fc28abcbd8e7 Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Tue Jun 26 08:26:36 2018 +0200 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/50cea6ba09ebc4b135a52aa89224fc28abcbd8e7 [^] Fixed issue 38825: Ensure that an order is going to be saved before setting the id In Web POS, when doing a save action, if the order doesn't have an ID, the ID is generated and then the order is saved. But there can be the situation in which the ID is set and the order is not saved, so that order won't be saved again. Now, before setting the ID, it is verified that the order will be saved. --- M web/org.openbravo.retail.posterminal/js/model/order.js --- |
![]() |
|||
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 |
Copyright © 2000 - 2009 MantisBT Group |