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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034080
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POSmajoralways2016-09-21 11:522016-09-27 09:48
ReporteraaroncaleroView Statuspublic 
Assigned Tomtaal 
PriorityurgentResolutionfixedFixed in VersionRR16Q3.2
StatusclosedFix in branchFixed in SCM revisione6cb165d85e8
ProjectionnoneETAnoneTarget VersionRR16Q3.2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toguilleaer
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

0034080: 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 ]
blocks defect 0034045 closedmtaal The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance 

-  Notes
(0090233)
hgbot (developer)
2016-09-25 14:42

Repository: retail/backports/3.0RR16Q3.2/org.openbravo.retail.posterminal
Changeset: e6cb165d85e83f7e646ca473ac146838235a2a96
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Sun Sep 25 14:41:18 2016 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR16Q3.2/org.openbravo.retail.posterminal/rev/e6cb165d85e83f7e646ca473ac146838235a2a96 [^]

Fixes issue 34080: The context argument of the OBPOS_PreOrderSave is no longer the OB.DATA instance
Pass the context to the inner functions

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---

- 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker