Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043874Retail ModulesWeb POSpublic2020-04-27 08:362020-08-04 14:31
jorge-garcia 
ranjith_qualiantech_com 
urgentmajorsometimes
closedfixed 
5
 
RR20Q3 
marvintm
No
0043874: Sessions module could execute twice callbaxkExecutor of OBPOS_LoadPOSWindow hook
Sometimes, sessions module hook OBPOS_LoadPOSWindow could execute twice the callbackExcutor, allowing the execution of the callback of OBPOS_LoadPOSWindow before all register hooks has finished.
1) Login in WebPOS with sessions module, fill required steps
2) Put three breakpoints in the code:
    2.1) Before the execution of OBPOS_LoadPOSWindow hook:
      OB.UTIL.HookManager.executeHooks('OBPOS_LoadPOSWindow', {}, function(args) {
    2.2) In tillCallback function
      } else {
        OB.MobileApp.model.hookManager.callbackExecutor(args, callbacks);
      }
    2.3) At the end of session register hook for OBPOS_LoadPOSWindow:
        args.cancellation = true;
        OB.UTIL.HookManager.callbackExecutor(args, callbacks);
3) Copy this code in Developers Tools:
  OB.UTIL.HookManager.registerHook('OBPOS_LoadPOSWindow', function(args, callbacks) {
    OB.UTIL.showConfirmation.display('Hola', 'hola', [{
      label: OB.I18N.getLabel('OBMOBC_LblOk'),
      isConfirmButton: true,
      action: function () {
        debugger;
        OB.UTIL.HookManager.callbackExecutor(args, callbacks);
      }
    }]);
  });
4) If no business partner is required to set, no initial count cash is needed to be counted, and no cashup is required to be done, the logic of sessions hook calls twice to the callbackExecutor, making the logic of the executeHook to continue before the copied hook has finisehd (it ends once the ok button from popup is clicked).
No tags attached.
caused by defect 0043333 closed rqueralta The login hook is not executed when login after a cashup 
Issue History
2020-04-27 08:36jorge-garciaNew Issue
2020-04-27 08:36jorge-garciaAssigned To => Retail
2020-04-27 08:36jorge-garciaTriggers an Emergency Pack => No
2020-04-27 08:38jorge-garciaResolution time => 1589752800
2020-04-27 08:45jorge-garciaPrioritynormal => urgent
2020-04-27 10:26adrianromeroRelationship addedcaused by 0043333
2020-04-27 13:18ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-04-27 15:34jorge-garciaIssue Monitored: jorge-garcia
2020-04-28 04:55hgbotCheckin
2020-04-28 04:55hgbotNote Added: 0119446
2020-04-28 04:55ranjith_qualiantech_comStatusnew => scheduled
2020-04-28 06:03hgbotCheckin
2020-04-28 06:03hgbotNote Added: 0119448
2020-04-28 08:42hgbotCheckin
2020-04-28 08:42hgbotNote Added: 0119453
2020-04-28 08:52ranjith_qualiantech_comNote Deleted: 0119453
2020-04-28 08:53ranjith_qualiantech_comNote Deleted: 0119448
2020-04-28 08:53ranjith_qualiantech_comStatusscheduled => resolved
2020-04-28 08:53ranjith_qualiantech_comResolutionopen => fixed
2020-04-29 18:02marvintmReview Assigned To => marvintm
2020-04-29 18:02marvintmStatusresolved => closed
2020-04-29 18:02marvintmFixed in Version => RR20Q3
2020-05-05 03:02hgbotCheckin
2020-05-05 03:02hgbotNote Added: 0119535
2020-05-05 03:03ranjith_qualiantech_comNote Deleted: 0119535
2020-08-04 14:30adrianromeroNote Added: 0121804
2020-08-04 14:30adrianromeroStatusclosed => new
2020-08-04 14:30adrianromeroResolutionfixed => open
2020-08-04 14:30adrianromeroFixed in VersionRR20Q3 =>
2020-08-04 14:31adrianromeroNote Deleted: 0121804
2020-08-04 14:31adrianromeroStatusnew => scheduled
2020-08-04 14:31adrianromeroStatusscheduled => resolved
2020-08-04 14:31adrianromeroFixed in Version => RR20Q3
2020-08-04 14:31adrianromeroResolutionopen => fixed
2020-08-04 14:31adrianromeroStatusresolved => closed

Notes
(0119446)
hgbot   
2020-04-28 04:55   
Repository: erp/pmods/org.openbravo.retail.sessions
Changeset: 1de0d222cd8aa89dde3cc875df7c48b1950d6ac7
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Apr 28 08:25:13 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sessions/rev/1de0d222cd8aa89dde3cc875df7c48b1950d6ac7 [^]

Related to issue-43874 : Refactored hookCallback in OBPOS_LoadPOSWindow hook

* Removed unwannted hook Callback

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