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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0035311
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminoralways2017-02-20 16:202017-03-14 17:20
ReporteraaroncaleroView Statuspublic 
Assigned Tomario_castello 
PrioritynormalResolutionfixedFixed in VersionRR17Q2
StatusclosedFix in branchFixed in SCM revision2f43cffd88a6
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0035311: Changes done to the receipt on the OBPOS_PreOrderSave hook are not saved using multiorders

DescriptionThe OBPOS_PreOrderSave hook can be used to modify ticket properties just before the ticket is synchronized to the server.
After all the hook executions have finished, the order's json attribute is updated (using the serializeToJSON method) and all these modifications are saved.
During the multiorders flow, however, the call to serializeToJSON is placed before the call to the OBPOS_PreOrderSave hook, so any modification done to the receipt object on the hooks is never saved.
Steps To ReproduceLogin in web pos
Using the browser console, implement the following hook:
OB.UTIL.HookManager.registerHook('OBPOS_PreOrderSave', function (args, callback) {
  args.receipt.set('description', 'test description');
  OB.UTIL.HookManager.callbackExecutor(args, callback);
});
Create a ticket and pay it using the standard flow and verify that the description is correctly shown in backend after the ticket is synchronized.
Create a ticket and pay it using the multiorders flow and verify that the description is NOT shown in backend after the ticket is synchronized.
Proposed SolutionAttached a patch that moves the call to currentReceipt.serializeToJSON to the callback of the preordersave hook on the multiorders flow.
TagsNo tags attached.
Attached Filesdiff file icon Issue35311.diff [^] (797 bytes) 2017-02-20 16:21 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0094799)
hgbot (developer)
2017-03-07 16:15

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 2f43cffd88a61f15e427056e5b71660062345045
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Mon Feb 20 12:02:01 2017 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2f43cffd88a61f15e427056e5b71660062345045 [^]

Fixed issue 0035311: Changes done to the receipt on the OBPOS_PreOrderSave hook are not saved using multiorders

- Moves the call to currentReceipt.serializeToJSON to the callback of the preordersave hook on the multiorders flow.

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

- Issue History
Date Modified Username Field Change
2017-02-20 16:20 aaroncalero New Issue
2017-02-20 16:20 aaroncalero Assigned To => Retail
2017-02-20 16:20 aaroncalero Resolution time => 1488754800
2017-02-20 16:20 aaroncalero Triggers an Emergency Pack => No
2017-02-20 16:21 aaroncalero File Added: Issue35311.diff
2017-02-20 18:56 mario_castello Assigned To Retail => mario_castello
2017-02-20 18:56 mario_castello Status new => acknowledged
2017-02-20 19:14 mario_castello Status acknowledged => scheduled
2017-03-07 16:15 hgbot Checkin
2017-03-07 16:15 hgbot Note Added: 0094799
2017-03-07 16:15 hgbot Status scheduled => resolved
2017-03-07 16:15 hgbot Resolution open => fixed
2017-03-07 16:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/2f43cffd88a61f15e427056e5b71660062345045 [^]
2017-03-14 17:20 marvintm Review Assigned To => marvintm
2017-03-14 17:20 marvintm Status resolved => closed
2017-03-14 17:20 marvintm Fixed in Version => RR17Q2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker