Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028564Retail ModulesWeb POSpublic2015-01-12 12:202015-01-19 15:31
adrianromero 
adrianromero 
normalmajorhave not tried
closedfixed 
5
 
pi 
Orekaria
No
0028564: Errors processing receipt templates are not managed
Any error in the receipt template throws a message in the javascript console like:

Uncaught TypeError: Cannot read property 'replace' of null. Line number: 6452

For example if the error is in the receipt template. When closing the receipt, the previous message appears in the javascript console and the application ends in an inconsistent state: Button "Done" disabled and the receipt loaded. This receipt cannot be closed and the user must refresh the application to continue working.
* Edit the receipt template: "printreceipt" and include a javascript syntax error.
* Load the Web POS, create a receipt and try to close
* A javascript error will appear in the console and the application ends in an inconsistent state.
No tags attached.
related to defect 0028611 closed marvintm if print receipt does not work, error message should be displayed and the process should finish 
Issue History
2015-01-12 12:20adrianromeroNew Issue
2015-01-12 12:20adrianromeroAssigned To => adrianromero
2015-01-12 12:20adrianromeroTriggers an Emergency Pack => No
2015-01-12 12:36hgbotCheckin
2015-01-12 12:36hgbotNote Added: 0073418
2015-01-12 12:36hgbotStatusnew => resolved
2015-01-12 12:36hgbotResolutionopen => fixed
2015-01-12 12:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0b01262ffa5ef748d34133f103dbd68a85fea922 [^]
2015-01-12 13:12hgbotCheckin
2015-01-12 13:12hgbotNote Added: 0073422
2015-01-12 13:12hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0b01262ffa5ef748d34133f103dbd68a85fea922 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1b51b69b7b05372020c0f8a8918e62355a2c0c93 [^]
2015-01-12 13:34hgbotCheckin
2015-01-12 13:34hgbotNote Added: 0073423
2015-01-12 13:34hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1b51b69b7b05372020c0f8a8918e62355a2c0c93 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90884ac78843230832e1807eae61f0d1b2e96a74 [^]
2015-01-12 13:34hgbotCheckin
2015-01-12 13:34hgbotNote Added: 0073424
2015-01-12 13:34hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90884ac78843230832e1807eae61f0d1b2e96a74 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/012a637f88f4456c419be0b71084fab18c9a55ba [^]
2015-01-15 18:18OrekariaNote Added: 0073536
2015-01-15 18:18OrekariaStatusresolved => new
2015-01-15 18:18OrekariaResolutionfixed => open
2015-01-15 19:38OrekariaRelationship addedrelated to 0028617
2015-01-15 19:39OrekariaRelationship addedrelated to 0028611
2015-01-15 19:39OrekariaRelationship deletedrelated to 0028617
2015-01-19 12:33hgbotCheckin
2015-01-19 12:33hgbotNote Added: 0073594
2015-01-19 12:33hgbotStatusnew => resolved
2015-01-19 12:33hgbotResolutionopen => fixed
2015-01-19 12:33hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/012a637f88f4456c419be0b71084fab18c9a55ba [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2bb813318526c5e9916d1ac6b055a88b35b1b0ef [^]
2015-01-19 15:31OrekariaReview Assigned To => Orekaria
2015-01-19 15:31OrekariaStatusresolved => closed
2015-01-19 15:31OrekariaFixed in Version => pi

Notes
(0073418)
hgbot   
2015-01-12 12:36   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0b01262ffa5ef748d34133f103dbd68a85fea922
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jan 12 12:33:14 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0b01262ffa5ef748d34133f103dbd68a85fea922 [^]

Fixes issue 0028564: Errors processing receipt templates are not managed
Sanitiy check

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0073422)
hgbot   
2015-01-12 13:12   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 1b51b69b7b05372020c0f8a8918e62355a2c0c93
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jan 12 13:04:01 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/1b51b69b7b05372020c0f8a8918e62355a2c0c93 [^]

Fixes issue 0028564: Errors processing receipt templates are not managed
Sanity check in encodeXMLMultiLineComponent

---
M web/org.openbravo.mobile.core/source/utils/ob-utilities.js
---
(0073423)
hgbot   
2015-01-12 13:34   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 90884ac78843230832e1807eae61f0d1b2e96a74
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jan 12 13:25:47 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/90884ac78843230832e1807eae61f0d1b2e96a74 [^]

Fixes issue 0028564: Errors processing receipt templates are not managed
If there is an error processing the template, it is captured and the callback is invoked with an exception message

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/datasource.js
---
(0073424)
hgbot   
2015-01-12 13:34   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 012a637f88f4456c419be0b71084fab18c9a55ba
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jan 12 13:30:24 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/012a637f88f4456c419be0b71084fab18c9a55ba [^]

Fixes issue 0028564: Errors processing receipt templates are not managed
Fixing jslint warning.

---
M web/org.openbravo.retail.posterminal/js/datasource.js
---
(0073536)
Orekaria   
2015-01-15 18:18   
The message is working fine, but...

a message must be shown in the error log (OB.error), so it is logged in the server and in the console, and can be analyzed later
(0073594)
hgbot   
2015-01-19 12:33   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2bb813318526c5e9916d1ac6b055a88b35b1b0ef
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Jan 19 12:26:18 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2bb813318526c5e9916d1ac6b055a88b35b1b0ef [^]

Fixes issue 0028564: Errors processing receipt templates are not managed
Adding log function in the case of error computing the template to print.

---
M web/org.openbravo.retail.posterminal/js/datasource.js
---