Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036868Retail ModulesWeb POSpublic2017-08-31 11:102017-10-31 09:18
umartirena 
ranjith_qualiantech_com 
immediatemajoralways
closedfixed 
5
 
RR17Q2.4RR17Q2.4 
marvintm
Production - Confirmed Stable
2015-10-26
RR16Q2
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/diff/6c588264876f/web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js [^]
No
0036868: Caller variable sent as parameter to OBPOS_CheckPaymentApproval hook has changed
Caller variable sent as parameter to OBPOS_CheckPaymentApproval hook has changed.

Now, the following code executed inside the hook, that previously was working, fails:

args.caller.doShowPopup({
      popup: 'bpartnerselector',
      args: {
        bp: args.context.get('order').get('bp'),
        caller: args.caller
      }
    });
In a RR17Q3 add the following hook programatically:

OB.UTIL.HookManager.registerHook('OBPOS_CheckPaymentApproval', function (args, callbacks) {
  OB.UTIL.HookManager.callbackExecutor(args, callbacks);
    args.caller.doShowPopup({
      popup: 'bpartnerselector',
      args: {
        bp: args.context.get('order').get('bp'),
        caller: args.caller
      }
    });
});

Login to web pos.
Add a product.
Click on Total Amount Button.
The following javascript issue is raised:


8d29ca2….js:79406 Uncaught TypeError: args.caller.doShowPopup is not a function
    at 8d29ca2….js:79406
    at G.d.callbackExecutor (8d29ca2….js:12190)
    at 8d29ca2….js:75205
    at G.d.callbackExecutor (8d29ca2….js:12190)
    at callback (8d29ca2….js:24956)
    at 8d29ca2….js:24962
    at G.d.callbackExecutor (8d29ca2….js:12190)
    at G.d.executeHooks (8d29ca2….js:12179)
    at G.d.checkPaymentApproval (8d29ca2….js:53189)
    at 8d29ca2….js:53177
Find attached patch
No tags attached.
blocks defect 0036756 closed ranjith_qualiantech_com Caller variable sent as parameter to OBPOS_CheckPaymentApproval hook has changed 
Issue History
2017-09-15 13:03marvintmTypedefect => backport
2017-09-15 13:03marvintmTarget Version => RR17Q2.4
2017-09-21 11:59hgbotCheckin
2017-09-21 11:59hgbotNote Added: 0099206
2017-09-21 11:59hgbotStatusscheduled => resolved
2017-09-21 11:59hgbotResolutionopen => fixed
2017-09-21 11:59hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e4725c9784813538d6fccd23287f074f04e0f50c [^] => http://code.openbravo.com/retail/backports/3.0RR17Q2.4/org.openbravo.retail.posterminal/rev/a7ce3e4e8b7aab55ff966199e1e675509cda8588 [^]
2017-10-31 09:18marvintmStatusresolved => closed
2017-10-31 09:18marvintmFixed in Version => RR17Q2.4

Notes
(0099206)
hgbot   
2017-09-21 11:59   
Repository: retail/backports/3.0RR17Q2.4/org.openbravo.retail.posterminal
Changeset: a7ce3e4e8b7aab55ff966199e1e675509cda8588
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Sep 21 15:09:29 2017 +0530
URL: http://code.openbravo.com/retail/backports/3.0RR17Q2.4/org.openbravo.retail.posterminal/rev/a7ce3e4e8b7aab55ff966199e1e675509cda8588 [^]

Fixed issue 36868 : Caller reference changes to Toal Amount Button

* For OBPOS_PrePaymentHook & OBPOS_PrePaymentApproval, caller reference is changed to Total Amount Button

---
M web/org.openbravo.retail.posterminal/js/pointofsale/view/toolbar-left.js
---