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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028102
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2014-11-05 21:512014-12-01 18:50
ReporterjecharriView Statuspublic 
Assigned Tomario_castello 
PriorityurgentResolutionfixedFixed in VersionRR15Q1
StatusclosedFix in branchFixed in SCM revisionb804c4dfe156
ProjectionnoneETAnoneTarget VersionRR15Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomalsasua
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028102: Hook OBPOS_PreOrderSave is not working fine if you cancel the save process

DescriptionHook OBPOS_PreOrderSave is not working fine if you cancel the save process

Steps To Reproduce-Create a hook using OBPOS_PreOrderSave
-Change the value of property "cancellation" to true
-After the hook is executed verify that orders is still in the screen but it is not really loaded. For example if you execute a refresh you will see that order is not longer in the screen

The following code should not be executed before the confirmation of the hook:
OB.UTIL.updateDocumentSequenceInDB(docno);

      delete this.receipt.attributes.json;
      this.receipt.set('timezoneOffset', creationDate.getTimezoneOffset());
      this.receipt.set('created', creationDate.getTime());
      this.receipt.set('obposCreatedabsolute', OB.I18N.formatDateISO(creationDate)); // Absolute date in ISO format
      // The order will not be processed if the navigator is offline
      if (OB.POS.modelterminal.get('connectedToERP')) {
        this.receipt.set('isbeingprocessed', 'Y');
      }
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0028272RR14Q4 closedmalsasua hook pre_ordersave is not cancelling the save of the order 
related to defect 0029572 closedegoitz The EditCashupReport hook does not cancel the execution when receving the parameter args.cancellation = true 

-  Notes
(0071666)
hgbot (developer)
2014-11-15 18:35

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5b1e305c9fbb7e5f88dddf0dfb8a493b28c18734
Author: Salvador Zapata <salvador.zapata <at> gmail.com>
Date: Sat Nov 15 14:33:47 2014 -0300
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5b1e305c9fbb7e5f88dddf0dfb8a493b28c18734 [^]

Fixed issue 28102: Include document number generation and creation information inside the success callback of the hook execution

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0071667)
hgbot (developer)
2014-11-15 18:38

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 43be7bcbc69f3b4ea68bd384c83e77d660dba56e
Author: Salvador Zapata <salvador.zapata <at> gmail.com>
Date: Sat Nov 15 14:37:47 2014 -0300
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/43be7bcbc69f3b4ea68bd384c83e77d660dba56e [^]

Fixed issue 28102: delete deprecated comment

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0071908)
mtaal (manager)
2014-11-24 06:41

Reviewed, following comments:
- I tested it with this hook:
OB.UTIL.HookManager.registerHook('OBPOS_PreOrderSave', function (args, callbacks) {
      args.cancellation = true;
      OB.MobileApp.model.hookManager.callbackExecutor(args, callbacks);
    });

- But ticket was not cancelled, it was saved in the background it seems, I see in the multi order save that there is this code:
        if (args && args.cancellation && args.cancellation === true) {
          args.context.receipt.set('isbeingprocessed', 'N');
          return true;
        }
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/5b1e305c9fbb/web/org.openbravo.retail.posterminal/js/data/dataordersave.js#l243 [^]

But this code is not present in the single order save.

When I add the above code to the single order pre-save and try to pay the browser remains showing a loading message after paying
(0071973)
malsasua (developer)
2014-11-25 12:15

The code about cancellation was removed by error in this changeset https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f7d836b8cbb7a68b9f124ff0715fd282a4c1d56c [^]
and new issue has been created and fixed:
https://issues.openbravo.com/view.php?id=28272 [^]
(0072142)
hgbot (developer)
2014-11-28 15:14

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b804c4dfe156eadd726082db3fd9bdf0743a8d14
Author: Mario Castello <mario.castello <at> peoplewalking.com>
Date: Fri Nov 28 08:13:11 2014 -0600
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b804c4dfe156eadd726082db3fd9bdf0743a8d14 [^]

fixed issue 28102: Hook OBPOS_PreOrderSave is not working fine if you cancel the save process

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/payment.js
---
(0072218)
malsasua (developer)
2014-12-01 18:50

verified

- Issue History
Date Modified Username Field Change
2014-11-05 21:51 jecharri New Issue
2014-11-05 21:51 jecharri Assigned To => marvintm
2014-11-05 21:51 jecharri Resolution time => 1417906800
2014-11-05 21:51 jecharri Triggers an Emergency Pack => No
2014-11-15 18:35 hgbot Checkin
2014-11-15 18:35 hgbot Note Added: 0071666
2014-11-15 18:35 hgbot Status new => resolved
2014-11-15 18:35 hgbot Resolution open => fixed
2014-11-15 18:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5b1e305c9fbb7e5f88dddf0dfb8a493b28c18734 [^]
2014-11-15 18:38 hgbot Checkin
2014-11-15 18:38 hgbot Note Added: 0071667
2014-11-15 18:38 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5b1e305c9fbb7e5f88dddf0dfb8a493b28c18734 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/43be7bcbc69f3b4ea68bd384c83e77d660dba56e [^]
2014-11-24 06:41 mtaal Assigned To marvintm => mario_castello
2014-11-24 06:41 mtaal Note Added: 0071908
2014-11-24 06:41 mtaal Status resolved => new
2014-11-24 06:41 mtaal Resolution fixed => open
2014-11-25 12:13 malsasua Relationship added related to 0028272
2014-11-25 12:15 malsasua Note Added: 0071973
2014-11-28 15:14 hgbot Checkin
2014-11-28 15:14 hgbot Note Added: 0072142
2014-11-28 15:14 hgbot Status new => resolved
2014-11-28 15:14 hgbot Resolution open => fixed
2014-11-28 15:14 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/43be7bcbc69f3b4ea68bd384c83e77d660dba56e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b804c4dfe156eadd726082db3fd9bdf0743a8d14 [^]
2014-12-01 18:50 malsasua Review Assigned To => malsasua
2014-12-01 18:50 malsasua Note Added: 0072218
2014-12-01 18:50 malsasua Status resolved => closed
2014-12-01 18:50 malsasua Fixed in Version => RR15Q1
2015-04-13 13:34 egoitz Relationship added related to 0029572


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker