Openbravo Issue Tracking System - Retail Modules
View Issue Details
0023869Retail ModulesWeb POSpublic2013-05-21 18:032013-06-18 19:11
Orekaria 
marvintm 
normalmajoralways
closedfixed 
5Windows
 
RMP24 
guilleaer
No
0023869: Events are registered multiple times when they should be registered once
Events are registered multiple times when they should be registered once, causing the same function to be called multiple times.
Unexpected behavior after some POS use is expected.
In the ob-terminal-model.js

In the renderGenericWindow

Set a console.log('I was here') line into the function

 this.on('window:ready', function (w) {


Login into the POS
Navigate from pointofsale to cashup to pointofsale

Check the log
Implement an eventHelper to centralize backbone event registering
or
Fine tune objects destruction



No tags attached.
Issue History
2013-05-21 18:03OrekariaNew Issue
2013-05-21 18:03OrekariaAssigned To => marvintm
2013-05-21 18:05OrekariaNote Added: 0058736
2013-05-21 18:05OrekariaProposed Solution updated
2013-05-21 18:06OrekariaNote Edited: 0058736bug_revision_view_page.php?bugnote_id=0058736#r4738
2013-05-29 09:47OrekariaTypedesign defect => defect
2013-05-30 19:18OrekariaNote Added: 0059081
2013-05-30 19:18OrekariaNote Edited: 0059081bug_revision_view_page.php?bugnote_id=0059081#r4756
2013-06-10 10:29hgbotCheckin
2013-06-10 10:29hgbotNote Added: 0059287
2013-06-10 10:29hgbotStatusnew => resolved
2013-06-10 10:29hgbotResolutionopen => fixed
2013-06-10 10:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2f801ac9ceb7b6dce478275da8147f387a3bf4c4 [^]
2013-06-11 13:29hgbotCheckin
2013-06-11 13:29hgbotNote Added: 0059351
2013-06-11 13:29hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2f801ac9ceb7b6dce478275da8147f387a3bf4c4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core.multiorder/rev/2f801ac9ceb7b6dce478275da8147f387a3bf4c4 [^]
2013-06-18 19:11guilleaerReview Assigned To => guilleaer
2013-06-18 19:11guilleaerNote Added: 0059501
2013-06-18 19:11guilleaerStatusresolved => closed
2013-06-18 19:11guilleaerFixed in Version => RMP24

Notes
(0058736)
Orekaria   
2013-05-21 18:05   
(edited on: 2013-05-21 18:06)
Check:
http://lostechies.com/derickbailey/2011/09/15/zombies-run-managing-page-transitions-in-backbone-apps/ [^]
http://stackoverflow.com/questions/7883947/event-triggered-multiple-times-after-using-back-button-in-backbone-js [^]

(0059081)
Orekaria   
2013-05-30 19:18   
Need closer look/change:

- ob-terminal-model.js: cleaned but renderLogin is still there
- ob-datasource.js: OB.DS.DataSource.prototype.find and OB.DS.DataSource.prototype.exec
- ob-retail-searchproducts.js: receiptChanged
- listreceiptscounter.js: orderListChanged
- tabcashtokeep.js: paymentToKeepChanged
- tabpostprintclose.js: modelChanged
- bussinesspartner.js: orderChanged
- listreceiptscounter.js: orderListChanged
- modalreceipts.js: receiptsListChanged
- order.js: orderChanged
- orderdetails.js: orderChanged
- salesrepresentative.js: orderChanged
- login-model.js: renderMain 'seqNoReady'
- executor.js: nextEvent, applyRule?
- pointofsale-print.js: PrintReceiptLine
- editline.js: selectedListener, receiptChanged
- keyboardorder.js: receiptChanged
- payment.js: receiptChanged
- scan.js: receiptChanged
- toolbar-right.js: receiptChanged
- dal.js: asyncTest
- offline-data.js: asyncTest

(0059287)
hgbot   
2013-06-10 10:29   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2f801ac9ceb7b6dce478275da8147f387a3bf4c4
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Mon Jun 10 10:04:19 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2f801ac9ceb7b6dce478275da8147f387a3bf4c4 [^]

Fixed issue 0023869. Now, events in the terminal-model are being registered once.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0059351)
hgbot   
2013-06-11 13:29   
Repository: erp/pmods/org.openbravo.mobile.core.multiorder
Changeset: 2f801ac9ceb7b6dce478275da8147f387a3bf4c4
Author: Rafa Alonso <ral <at> openbravo.com>
Date: Mon Jun 10 10:04:19 2013 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core.multiorder/rev/2f801ac9ceb7b6dce478275da8147f387a3bf4c4 [^]

Fixed issue 0023869. Now, events in the terminal-model are being registered once.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0059501)
guilleaer   
2013-06-18 19:11   
verified