Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028391Retail ModulesWeb POSpublic2014-12-11 18:062015-04-16 15:15
aaroncalero 
aaroncalero 
lowminorhave not tried
closedfixed 
5
pi 
RR15Q2 
adrianromero
No
0028391: Changing main window before callbacks are executed causes javascript errors
Changing the main window of the WebPOS (e.g. from #retail.pointofsale to #retail.cashup) before the initial window has finished loading (all callbacks have finished executing) causes javascript errors because the initial window is destroyed upon navigation. If there are pending callbacks that access window components (which have already been destroyed), errors similar to the following will be logged to the console:
posterminal.main.js: Uncaught TypeError: Cannot read property 'createComponent' of undefined;
Go to https://livebuilds.openbravo.com/retail_pi_pgsql/web/org.openbravo.retail.posterminal/?terminal=VBS-1 [^]
Log in with demouser/openbravo
As soon as the menu is available, switch to Cash Management or Cash Up windows.
Error messages will appear on the upper right corner of the screen and they will also be logged to the browser console.
Callbacks that execute asynchronously should check that the elements they are referencing still exist (objects that have been destroyed have a 'destroyed' attribute set to true).
No tags attached.
depends on backport 0029328RR15Q1.3 closed aaroncalero Changing main window before callbacks are executed causes javascript errors 
depends on feature request 0028933RR16Q1 closed Retail QA: RR15Q2: Add tests for Mobile applications 
related to defect 0029575 new marvintm Changing main window just after login causes a double navigation 
Issue History
2014-12-11 18:06aaroncaleroNew Issue
2014-12-11 18:06aaroncaleroAssigned To => marvintm
2014-12-11 18:06aaroncaleroTriggers an Emergency Pack => No
2014-12-15 13:25aaroncaleroAssigned Tomarvintm => aaroncalero
2014-12-15 14:54hgbotCheckin
2014-12-15 14:54hgbotNote Added: 0072512
2014-12-15 14:54hgbotStatusnew => resolved
2014-12-15 14:54hgbotResolutionopen => fixed
2014-12-15 14:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/56c064f962a430657d343bb749c73a816f0875a2 [^]
2014-12-15 14:55hgbotCheckin
2014-12-15 14:55hgbotNote Added: 0072513
2014-12-15 14:55hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/56c064f962a430657d343bb749c73a816f0875a2 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/04113fd64d2f7c5716099f9de761afa7294ab241 [^]
2014-12-22 16:05aaroncaleroStatusresolved => new
2014-12-22 16:05aaroncaleroResolutionfixed => open
2015-01-07 10:19hgbotCheckin
2015-01-07 10:19hgbotNote Added: 0073321
2015-01-07 10:19hgbotStatusnew => resolved
2015-01-07 10:19hgbotResolutionopen => fixed
2015-01-07 10:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/04113fd64d2f7c5716099f9de761afa7294ab241 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0a062145cfd9da1d0845c08cc0ce4f9b4210e125 [^]
2015-01-07 10:19hgbotCheckin
2015-01-07 10:19hgbotNote Added: 0073322
2015-01-07 10:19hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0a062145cfd9da1d0845c08cc0ce4f9b4210e125 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d7d844ee8a819805d1c870289b1d36ac2205cbe9 [^]
2015-01-09 14:49OrekariaReview Assigned To => Orekaria
2015-01-09 14:49OrekariaStatusresolved => closed
2015-01-09 14:49OrekariaFixed in Version => pi
2015-03-18 10:29malsasuaNote Added: 0075724
2015-03-18 10:29malsasuaStatusclosed => new
2015-03-18 10:29malsasuaResolutionfixed => open
2015-03-18 10:29malsasuaFixed in Versionpi =>
2015-03-18 10:29malsasuaStatusnew => scheduled
2015-03-18 10:39hgbotCheckin
2015-03-18 10:39hgbotNote Added: 0075725
2015-03-18 10:39hgbotStatusscheduled => resolved
2015-03-18 10:39hgbotResolutionopen => fixed
2015-03-18 10:39hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d7d844ee8a819805d1c870289b1d36ac2205cbe9 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/541c0fca5e89784ea3ebf47ada89cd3f0e343de5 [^]
2015-03-18 11:12OrekariaRelationship addeddepends on 0028933
2015-03-27 13:18malsasuaReview Assigned ToOrekaria => malsasua
2015-03-27 13:18malsasuaNote Added: 0076082
2015-03-27 13:18malsasuaStatusresolved => closed
2015-03-27 13:18malsasuaFixed in Version => RR15Q2
2015-04-10 15:03hgbotCheckin
2015-04-10 15:03hgbotNote Added: 0076453
2015-04-10 15:03hgbotStatusclosed => resolved
2015-04-10 15:03hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/541c0fca5e89784ea3ebf47ada89cd3f0e343de5 [^] => http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.mobile.core/rev/4ae99dca0602336b10972fdd654a9931560292e1 [^]
2015-04-10 15:03hgbotCheckin
2015-04-10 15:03hgbotNote Added: 0076456
2015-04-10 15:03hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.mobile.core/rev/4ae99dca0602336b10972fdd654a9931560292e1 [^] => http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/4c5e04e84b70af3d4446424761a65674093ff322 [^]
2015-04-10 15:03hgbotCheckin
2015-04-10 15:03hgbotNote Added: 0076457
2015-04-10 15:03hgbotFixed in SCM revisionhttp://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/4c5e04e84b70af3d4446424761a65674093ff322 [^] => http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/bc6741e586427eaef63e022cc753b789ec9f9e83 [^]
2015-04-13 17:06hgbotCheckin
2015-04-13 17:06hgbotNote Added: 0076491
2015-04-13 18:37adrianromeroRelationship addedrelated to 0029575
2015-04-16 15:15adrianromeroReview Assigned Tomalsasua => adrianromero
2015-04-16 15:15adrianromeroNote Added: 0076590
2015-04-16 15:15adrianromeroStatusresolved => closed

Notes
(0072512)
hgbot   
2014-12-15 14:54   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 56c064f962a430657d343bb749c73a816f0875a2
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Mon Dec 15 13:42:20 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/56c064f962a430657d343bb749c73a816f0875a2 [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Fixed code in posterminal module. Added a check to the callback of the function that loads return reasons, in order to return inmediately if the component has already been destroyed.

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
---
(0072513)
hgbot   
2014-12-15 14:55   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 04113fd64d2f7c5716099f9de761afa7294ab241
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Mon Dec 15 13:51:22 2014 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/04113fd64d2f7c5716099f9de761afa7294ab241 [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Fixed code in mobile core module. Added several checks to return inmediately if components have already been destroyed.

---
M web/org.openbravo.mobile.core/source/component/ob-keyboard.js
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-product-browser.js
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproducts.js
---
(0073321)
hgbot   
2015-01-07 10:19   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 0a062145cfd9da1d0845c08cc0ce4f9b4210e125
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Jan 07 10:01:29 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/0a062145cfd9da1d0845c08cc0ce4f9b4210e125 [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Added check to the callback that loads products to return inmediately if the component has already been destroyed.

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-product-browser.js
---
(0073322)
hgbot   
2015-01-07 10:19   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d7d844ee8a819805d1c870289b1d36ac2205cbe9
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Jan 07 10:17:57 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d7d844ee8a819805d1c870289b1d36ac2205cbe9 [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Added check to the callback that loads sales representatives to return inmediately if the component has been destroyed

---
M web/org.openbravo.retail.posterminal/js/components/modalreceiptproperties.js
---
(0075724)
malsasua   
2015-03-18 10:29   
reopened to add a new changeset related with this issue, and to do the backport to PR15Q1
(0075725)
hgbot   
2015-03-18 10:39   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 541c0fca5e89784ea3ebf47ada89cd3f0e343de5
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Mar 18 10:37:48 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/541c0fca5e89784ea3ebf47ada89cd3f0e343de5 [^]

fixed issue 28391: added a line to check if the object has been destroyed when the callback is executed

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js
---
(0076082)
malsasua   
2015-03-27 13:18   
verified
(0076453)
hgbot   
2015-04-10 15:03   
Repository: retail/backports/3.0RR15Q1.3/org.openbravo.mobile.core
Changeset: 4ae99dca0602336b10972fdd654a9931560292e1
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Jan 07 10:01:29 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.mobile.core/rev/4ae99dca0602336b10972fdd654a9931560292e1 [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Added check to the callback that loads products to return inmediately if the component has already been destroyed.

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-product-browser.js
---
(0076456)
hgbot   
2015-04-10 15:03   
Repository: retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal
Changeset: 4c5e04e84b70af3d4446424761a65674093ff322
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Wed Jan 07 10:17:57 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/4c5e04e84b70af3d4446424761a65674093ff322 [^]

Fixed issue 28391: Changing main window before callbacks are executed causes javascript errors

Added check to the callback that loads sales representatives to return inmediately if the component has been destroyed

---
M web/org.openbravo.retail.posterminal/js/components/modalreceiptproperties.js
---
(0076457)
hgbot   
2015-04-10 15:03   
Repository: retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal
Changeset: bc6741e586427eaef63e022cc753b789ec9f9e83
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Mar 18 10:37:48 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/bc6741e586427eaef63e022cc753b789ec9f9e83 [^]

fixed issue 28391: added a line to check if the object has been destroyed when the callback is executed

---

---
(0076491)
hgbot   
2015-04-13 17:06   
Repository: retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal
Changeset: b71c669fc94bf4adb1e24e8934397a47bca6c0b2
Author: Miguel A. Alsasua <miguel.alsasua <at> openbravo.com>
Date: Wed Mar 18 10:37:48 2015 +0100
URL: http://code.openbravo.com/retail/backports/3.0RR15Q1.3/org.openbravo.retail.posterminal/rev/b71c669fc94bf4adb1e24e8934397a47bca6c0b2 [^]

Related to issue 28391, fixes issue 29328: Added a line to check if the object has been destroyed when the callback is executed

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js
---
(0076590)
adrianromero   
2015-04-16 15:15   
Verified. But still exists a new issue related with the same action. See https://issues.openbravo.com/view.php?id=29575 [^]