Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034045
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2016-09-21 11:522016-10-10 11:30
ReporteraaroncaleroView Statuspublic 
Assigned Tomtaal 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision4996685e5e52
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Merge Request Status
Review Assigned Tomigueldejuana
OBNetwork customerOBPS
Support ticket
Regression levelProduction - QA Approved
Regression date2016-05-19
Regression introduced in releaseRR16Q3
Regression introduced by commithttps://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e7408dbbf027 [^]
Triggers an Emergency PackNo
Summary

0034045: The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance

DescriptionWhen 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 ReproduceLogin 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 SolutionOne 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0034080RR16Q3.2 closedmtaal The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance 
causes defect 0033996 closedmtaal [STORE SERVER] Pay open tickets functionality is too poor. 

-  Notes
(0090225)
hgbot (developer)
2016-09-25 11:48

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 4996685e5e52681cd5b9211659a75dd0375d7b2c
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Sep 25 11:46:09 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4996685e5e52681cd5b9211659a75dd0375d7b2c [^]

Fixes issue 34045: The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance
Pass in the context argument to be used within the inner functions

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0090514)
migueldejuana (viewer)
2016-10-10 11:30

Tested and reviewed

- Issue History
Date Modified Username Field Change
2016-09-21 11:52 aaroncalero New Issue
2016-09-21 11:52 aaroncalero Assigned To => Retail
2016-09-21 11:52 aaroncalero OBNetwork customer => Yes
2016-09-21 11:52 aaroncalero Resolution time => 1475618400
2016-09-21 11:52 aaroncalero Regression level => Production - QA Approved
2016-09-21 11:52 aaroncalero Regression date => 2016-05-19
2016-09-21 11:52 aaroncalero Regression introduced in release => RR16Q3
2016-09-21 11:52 aaroncalero Regression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/e7408dbbf027 [^]
2016-09-21 11:52 aaroncalero Triggers an Emergency Pack => No
2016-09-21 12:28 mtaal Assigned To Retail => mtaal
2016-09-25 11:42 mtaal Status new => scheduled
2016-09-25 11:48 hgbot Checkin
2016-09-25 11:48 hgbot Note Added: 0090225
2016-09-25 11:48 hgbot Status scheduled => resolved
2016-09-25 11:48 hgbot Resolution open => fixed
2016-09-25 11:48 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4996685e5e52681cd5b9211659a75dd0375d7b2c [^]
2016-09-25 11:51 mtaal Relationship added causes 0033996
2016-09-25 11:54 mtaal Review Assigned To => migueldejuana
2016-10-10 11:30 migueldejuana Note Added: 0090514
2016-10-10 11:30 migueldejuana Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker