Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039884Retail ModulesWeb POSpublic2019-01-03 12:562019-01-16 10:45
gorka_gil 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR19Q1RR19Q1 
jorge-garcia
Automated tests
2018-12-18
pi
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7c3c0cb548f6 [^]
No
0039884: Javascript error is displayed when trying to close pending documents when opening store from a terminal - Cannot read 'models'
This commit (from issue 39816):
 https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7c3c0cb548f6 [^]

Makes that this issue happens again:
  https://issues.openbravo.com/view.php?id=39488 [^]

With a new error message:
  TypeError: Cannot read property 'models' of undefined at removeReceiptFromDatabase.


Details of error:
In function removeReceiptFromDatabase,
OB.MobileApp.model.orderList is undefined, previously it checks if undefined before use it, now try to get the models from it without check.

Run test: I39488_VerifyNoErrorWhenClosingPendingDocs

or follow steps to reproduce of issue 39488
No tags attached.
blocks defect 0039872 closed ranjith_qualiantech_com Javascript error is displayed when trying to close pending documents when opening store from a terminal - Cannot read 'models' 
Issue History
2019-01-08 13:51ranjith_qualiantech_comTypedefect => backport
2019-01-08 13:51ranjith_qualiantech_comTarget Version => RR19Q1
2019-01-08 14:40hgbotCheckin
2019-01-08 14:40hgbotNote Added: 0108855
2019-01-08 14:40hgbotStatusscheduled => resolved
2019-01-08 14:40hgbotResolutionopen => fixed
2019-01-08 14:40hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/7b1a591c616a4292262cc235a8306bb47c2aa73a [^] => http://code.openbravo.com/retail/backports/3.0RR19Q1/org.openbravo.retail.posterminal/rev/09a23417abb5091733c188574526d9d2d92ed147 [^]
2019-01-16 10:45jorge-garciaReview Assigned To => jorge-garcia
2019-01-16 10:45jorge-garciaNote Added: 0108975
2019-01-16 10:45jorge-garciaStatusresolved => closed
2019-01-16 10:45jorge-garciaFixed in Version => RR19Q1

Notes
(0108855)
hgbot   
2019-01-08 14:40   
Repository: retail/backports/3.0RR19Q1/org.openbravo.retail.posterminal
Changeset: 09a23417abb5091733c188574526d9d2d92ed147
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Jan 08 19:09:49 2019 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR19Q1/org.openbravo.retail.posterminal/rev/09a23417abb5091733c188574526d9d2d92ed147 [^]

Fixed issue 39884 : Receipt should be removed from database even if orderList is empty

* With Sessions module, Cashup window will be loaded before rendering the pointofsale window whem sessions closed in backoffice.
In that case, if receipt is saved in database and not completed, It will shown in cashup window to delete it.
OB.MobileApp.model.orderList will not be initiated while deleting the receipt.
So if orderList is present, receipt to be removed will be deleted from database and orderlist
else receipt will be removed from database only

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0108975)
jorge-garcia   
2019-01-16 10:45   
Code reviewed and tested