Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028384Retail ModulesWeb POSpublic2014-12-11 09:122014-12-15 00:31
aaroncalero 
aaroncalero 
normalminorhave not tried
closedfixed 
5
 
RR15Q1 
mtaal
No
0028384: Console error when logging out from WebPOS if there are orders pending to be paid
The following console error shows in the browser console if the user logs out of WebPOS when there are open tickets:
 OB.Dal.removeAll: table 'c_order'; {"message":"could not prepare statement (1 no such column: undefined)","code":5}; http://localhost:8080/openbravo/web/js/gen/9a323447488c7aad99090a112bee00ad_WebPOS.js:1983:11 [^]
9a323447488c7aad99090a112bee00ad_WebPOS.js:7109 postCloseSession; {}; line: errorFunc (http://localhost:8080/openbravo/web/js/gen/9a323447488c7aad99090a112bee00ad_WebPOS.js:19228:16 [^]) (*,+)
Log in in the WebPOS
Create a new ticket and add a product
Log out of the application
Check the browser console output and search for errors (make sure the log is preserved across different pages, otherwise the error will disappear the moment the login page loads again)
No tags attached.
Issue History
2014-12-11 09:12aaroncaleroNew Issue
2014-12-11 09:12aaroncaleroAssigned To => aaroncalero
2014-12-11 09:12aaroncaleroTriggers an Emergency Pack => No
2014-12-11 10:18hgbotCheckin
2014-12-11 10:18hgbotNote Added: 0072419
2014-12-11 10:18hgbotStatusnew => resolved
2014-12-11 10:18hgbotResolutionopen => fixed
2014-12-11 10:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/049dcd9e1e09e0918585d9ec95372f09e083df61 [^]
2014-12-15 00:31mtaalReview Assigned To => mtaal
2014-12-15 00:31mtaalNote Added: 0072480
2014-12-15 00:31mtaalStatusresolved => closed
2014-12-15 00:31mtaalFixed in Version => RR15Q1

Notes
(0072419)
hgbot   
2014-12-11 10:18   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 049dcd9e1e09e0918585d9ec95372f09e083df61
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Thu Dec 11 10:13:11 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/049dcd9e1e09e0918585d9ec95372f09e083df61 [^]

Fixed issue 28384: Console error when logging out from WebPOS if there are orders pending to be paid

The code executed in the postCloseSession function has been refactored and simplified.
Before, a find was executed to retrieve pending orders. For each order, two removes were executed: the first remove was wrong and was causing a console error. The second remove was removing the order from the database.
After the fix, the find has been replaced by a removeAll with the same criteria, and all pending orders are deleted in a single query.

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0072480)
mtaal   
2014-12-15 00:31   
Reviewed and tested