Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043333Retail ModulesSessionspublic2020-02-25 18:572020-08-04 14:33
adrianromero 
rqueralta 
urgentmajorhave not tried
closedfixed 
30Openbravo Appliance 14.04
 
RR20Q2 
jorge-garcia
No
0043333: The login hook is not executed when login after a cashup
The module sessions logs out the POS after a cashup. Then when the user logs in again functionality linked using the hook 'OBPOS_LoadPOSWindow' is not executed because the hook OBPOS_LoadPOSWindow implemented in the sessions module does not continue properly the hooks chain executing the function: OB.UTIL.HookManager.callbackExecutor(args, callbacks);

 
Login in https://livebuilds.openbravo.com/retail_modules_pgsql_pi/web/org.openbravo.retail.posterminal/?terminal=VBS-1 [^] as Vallblanca
Execute the cashup process and at the end observe the application goes to the login window.
Open the developer tools and set a breakpoint in the lines:

OB.UTIL.HookManager.executeHooks('OBPOS_LoadPOSWindow', ...

And at the beginning of the callback function:

var nextWindow = OB.MobileApp.model.get('nextWindow');

Log in
Observe the executeHooks line is executed but the callback function is not.

The reason is that the hook OBPOS_LoadPOSWindow in sessions does not invoke the callback executor in this case:

https://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/file/tip/web/org.openbravo.retail.sessions/js/components/loginhook.js#l274 [^]

This is wrong. The callback executor must be invoked in all cases.


No tags attached.
blocks defect 0044565 closed Retail WebPOS - NEXO provider - After a logout, time needed to login is important 
causes defect 0043874 closed ranjith_qualiantech_com Sessions module could execute twice callbaxkExecutor of OBPOS_LoadPOSWindow hook 
Issue History
2020-02-25 18:57adrianromeroNew Issue
2020-02-25 18:57adrianromeroAssigned To => Retail
2020-02-25 18:57adrianromeroTriggers an Emergency Pack => No
2020-02-25 19:05adrianromeroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=20453#r20453
2020-02-26 10:26marvintmResolution time => 1584399600
2020-02-26 18:55rqueraltaAssigned ToRetail => rqueralta
2020-02-26 18:55rqueraltaStatusnew => scheduled
2020-02-28 14:59hgbotCheckin
2020-02-28 14:59hgbotNote Added: 0118207
2020-02-28 14:59hgbotStatusscheduled => resolved
2020-02-28 14:59hgbotResolutionopen => fixed
2020-02-28 14:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/8ef9f48bb1934cd46a5fbaf42bb446cd5dc4447a [^]
2020-02-28 15:00hgbotCheckin
2020-02-28 15:00hgbotNote Added: 0118208
2020-02-28 15:00hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/8ef9f48bb1934cd46a5fbaf42bb446cd5dc4447a [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0a131525bc281ad0b9938e226a1385545b8e1b83 [^]
2020-03-11 16:35jorge-garciaReview Assigned To => jorge-garcia
2020-03-12 16:12jorge-garciaNote Added: 0118551
2020-03-12 16:12jorge-garciaStatusresolved => new
2020-03-12 16:12jorge-garciaResolutionfixed => open
2020-03-12 21:43hgbotCheckin
2020-03-12 21:43hgbotNote Added: 0118566
2020-03-12 21:43hgbotStatusnew => resolved
2020-03-12 21:43hgbotResolutionopen => fixed
2020-03-12 21:43hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0a131525bc281ad0b9938e226a1385545b8e1b83 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/3ae476973adbea4e2d87dc85bbf917922159fbf0 [^]
2020-03-13 10:55hgbotCheckin
2020-03-13 10:55hgbotNote Added: 0118580
2020-03-13 10:56jorge-garciaNote Added: 0118581
2020-03-13 10:56jorge-garciaStatusresolved => closed
2020-03-13 10:56jorge-garciaFixed in Version => RR20Q2
2020-03-13 15:28hgbotCheckin
2020-03-13 15:28hgbotNote Added: 0118597
2020-03-16 08:58hgbotCheckin
2020-03-16 08:58hgbotNote Added: 0118612
2020-04-27 10:26adrianromeroRelationship addedcauses 0043874
2020-08-04 13:58adrianromeroRelationship addedblocks 0044565
2020-08-04 14:32adrianromeroAssigned Torqueralta => prakashmurugesan88
2020-08-04 14:32adrianromeroNote Added: 0121805
2020-08-04 14:32adrianromeroStatusclosed => new
2020-08-04 14:32adrianromeroResolutionfixed => open
2020-08-04 14:32adrianromeroFixed in VersionRR20Q2 =>
2020-08-04 14:33adrianromeroAssigned Toprakashmurugesan88 => rqueralta
2020-08-04 14:33adrianromeroStatusnew => acknowledged
2020-08-04 14:33adrianromeroStatusacknowledged => scheduled
2020-08-04 14:33adrianromeroStatusscheduled => resolved
2020-08-04 14:33adrianromeroFixed in Version => RR20Q2
2020-08-04 14:33adrianromeroResolutionopen => fixed
2020-08-04 14:33adrianromeroStatusresolved => closed
2020-08-04 14:34adrianromeroNote Deleted: 0121805

Notes
(0118207)
hgbot   
2020-02-28 14:59   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: 8ef9f48bb1934cd46a5fbaf42bb446cd5dc4447a
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Feb 27 17:32:17 2020 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/8ef9f48bb1934cd46a5fbaf42bb446cd5dc4447a [^]

Fixed BUG-43333: The login hook is not executed when login after a cashup

- Invoked the callback executor in all cases, passing cancellation argument to
avoid execute the callback executeHooks if it is necessary

---
M web/org.openbravo.retail.sessions/js/components/loginhook.js
---
(0118208)
hgbot   
2020-02-28 15:00   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 0a131525bc281ad0b9938e226a1385545b8e1b83
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Feb 27 17:21:31 2020 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/0a131525bc281ad0b9938e226a1385545b8e1b83 [^]

Fixed BUG-43333: The login hook is not executed when login after a cashup

- Added cancellation argument to callback of executeHooks

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0118551)
jorge-garcia   
2020-03-12 16:12   
OB.UTIL.HookManager.callbackExecutor is not being called in all the places that are required in loginhook file
(0118566)
hgbot   
2020-03-12 21:43   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: 3ae476973adbea4e2d87dc85bbf917922159fbf0
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Thu Mar 12 16:41:12 2020 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/3ae476973adbea4e2d87dc85bbf917922159fbf0 [^]

Fixed BUG-43333: The login hook is not executed when login after a cashup

- Added call to OB.UTIL.HookManager.callbackExecutor in others places that are
required

---
M web/org.openbravo.retail.sessions/js/components/loginhook.js
---
(0118580)
hgbot   
2020-03-13 10:55   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: d6ca5aabac3fc4f2ea0ab3e5f3e9634852725e87
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Mar 13 10:55:14 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/d6ca5aabac3fc4f2ea0ab3e5f3e9634852725e87 [^]

Related to BUG-43333: Always cancel callback execution for
OBPOS_LoadPOSWindow hook

---
M web/org.openbravo.retail.sessions/js/components/loginhook.js
---
(0118581)
jorge-garcia   
2020-03-13 10:56   
Code reviewed and tested
(0118597)
hgbot   
2020-03-13 15:28   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: cfd879370c5f7b87f0da9862bd832b65dc20f268
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Fri Mar 13 10:28:19 2020 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/cfd879370c5f7b87f0da9862bd832b65dc20f268 [^]

Related to BUG-43333: At this point callback execution for
OBPOS_LoadPOSWindow hook is required

---
M web/org.openbravo.retail.sessions/js/components/loginhook.js
---
(0118612)
hgbot   
2020-03-16 08:58   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: adfb84be121fe0892c0fc893b654f1911d7f8db1
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Mar 16 08:58:30 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/adfb84be121fe0892c0fc893b654f1911d7f8db1 [^]

Related to BUG 43333: Backout last changes for issue

Backed out changesets cfd879370c5f and d6ca5aabac3f

---
M web/org.openbravo.retail.sessions/js/components/loginhook.js
---