Openbravo Issue Tracking System - Retail Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0034080 | Retail Modules | Web POS | public | 2016-09-21 11:52 | 2016-09-27 09:48 |
|
Reporter | aaroncalero | |
Assigned To | mtaal | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | RR16Q3.2 | Fixed in Version | RR16Q3.2 | |
Merge Request Status | |
Review Assigned To | guilleaer |
OBNetwork customer | OBPS |
Support ticket | |
Regression level | Production - QA Approved |
Regression date | 2016-05-19 |
Regression introduced in release | RR16Q3 |
Regression introduced by commit | https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e7408dbbf027 [^] |
Triggers an Emergency Pack | No |
|
Summary | 0034080: The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance |
Description | When the OBPOS_PreOrderSave hook is invoked, its args parameter contains three arguments: the context of the execution, the model representing the pos object, and the receipt.
The refactor to allow synchronous transactions moved the body of the body of the onclose functions to separate functions. This has caused the scope of these functions to be the window object instead of the OB.DATA instance (the former 'this').
Because of this, now the context argument during the execution of the OBPOS_PreOrderSave hooks is window, instead of the OB.DATA instance. |
Steps To Reproduce | Login in a 16Q2 web pos instance, set a breakpoint on the execution of the OBPOS_PreOrderSave hook, complete a ticket to trigger the breakpoint, and verify that the value of the 'this' variable equals the OB.DATA object.
Now login in a 16Q3 or a pi and repeat the same process. Verify that now the 'this' variable equals the window object. |
Proposed Solution | One posibility is to create the mainReceiptCloseFunction and multiOrdersFunction as members of the OB.DATA object (instead of creating them as vars). This way we ensure that the context of these functions during its execution is OB.DATA. |
Additional Information | |
Tags | No tags attached. |
Relationships | blocks | defect | 0034045 | | closed | mtaal | The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2016-09-25 11:42 | mtaal | Type | defect => backport |
2016-09-25 11:42 | mtaal | Target Version | => RR16Q3.3 |
2016-09-25 12:17 | mtaal | Review Assigned To | => migueldejuana |
2016-09-25 12:17 | mtaal | Target Version | RR16Q3.3 => RR16Q3.2 |
2016-09-25 14:42 | hgbot | Checkin | |
2016-09-25 14:42 | hgbot | Note Added: 0090233 | |
2016-09-25 14:42 | hgbot | Status | scheduled => resolved |
2016-09-25 14:42 | hgbot | Resolution | open => fixed |
2016-09-25 14:42 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/retail/backports/3.0RR16Q3.2/org.openbravo.retail.posterminal/rev/e6cb165d85e83f7e646ca473ac146838235a2a96 [^] |
2016-09-27 09:48 | guilleaer | Review Assigned To | migueldejuana => guilleaer |
2016-09-27 09:48 | guilleaer | Status | resolved => closed |
2016-09-27 09:48 | guilleaer | Fixed in Version | => RR16Q3.2 |