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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036275
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2017-06-19 16:592017-06-27 09:12
ReporterjonibcView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionRR17Q3
StatusclosedFix in branchFixed in SCM revision62e2b80668eb
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

0036275: [SERQA 3022] Error callback not done in runSyncProcess (PostCustomerSave hook)

DescriptionError callback is not sent to RunSyncProcess function, so if an error is raised, while saving a customer, can block 'Save' and 'Cancel' buttons until a refresh is done in the browser.

          OB.UTIL.HookManager.executeHooks('OBPOS_PostCustomerSave', {
            customer: customer,
            bpToSave: bpToSave
          }, function (args) {
            OB.Dal.save(bpToSave, function () {
              // update each order also so that new name is shown and the bp
              // in the order is the same as what got saved
....
              var successCallback, errorCallback, List;
              successCallback = function () {
                if (callback) {
                  callback();
                }
                OB.UTIL.showSuccess(OB.I18N.getLabel('OBPOS_customerSaved', [customer.get('_identifier')]));
              };
              OB.MobileApp.model.runSyncProcess(successCallback);
            }, function () {
              //error saving BP changes with changes in changedbusinesspartners
              OB.UTIL.showError(OB.I18N.getLabel('OBPOS_errorSavingCustomerChanges', [customer.get('_identifier')]));
            });
Steps To ReproduceN/A
Proposed SolutionAdd callback to runSyncProcess function as follows:

              OB.MobileApp.model.runSyncProcess(successCallback, callback);

Also to avoid the error added in Notes, the proposal is:

              Send a boolean parameter through callback function, that allows to skip the code if an error is raised.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0035981pi closedjorge-garcia [SERQA 2847] Buttons for customer and locations are not blocked in synchronized mode. 

-  Notes
(0097509)
jonibc (developer)
2017-06-20 13:19

If the runSyncProcess call fails, the following code should not be executed to avoid open 'View Details' window:

    if (!inEvent.silent) {
            me.bubble('onCancelClose', {
              customer: customerEdited
            });
    }

A solution could be to send a boolean parameter through callback function, that allows to skip the code if an error is raised.
(0097655)
hgbot (developer)
2017-06-26 14:23

Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 62e2b80668eb5009711ab99c962b5bfe0acec569
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 26 17:52:39 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/62e2b80668eb5009711ab99c962b5bfe0acec569 [^]

Fixed issue 36275 : Callback of SaveCustomer should be called from OBPOS_PostCustomerSave hook and runSyncProcess

* If Customer Save or runSyncProcess failed, then callback of SaveCustomer will return as false

---
M web/org.openbravo.retail.posterminal/js/data/datacustomersave.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/subwindows/customers/components/sharedcomponents.js
---

- Issue History
Date Modified Username Field Change
2017-06-19 16:59 jonibc New Issue
2017-06-19 16:59 jonibc Assigned To => Retail
2017-06-19 16:59 jonibc Resolution time => 1499119200
2017-06-19 16:59 jonibc Triggers an Emergency Pack => No
2017-06-19 17:15 jonibc Relationship added related to 0035981
2017-06-20 11:46 ranjith_qualiantech_com Assigned To Retail => ranjith_qualiantech_com
2017-06-20 11:46 ranjith_qualiantech_com Status new => scheduled
2017-06-20 13:19 jonibc Note Added: 0097509
2017-06-20 13:19 jonibc Proposed Solution updated
2017-06-26 14:23 hgbot Checkin
2017-06-26 14:23 hgbot Note Added: 0097655
2017-06-26 14:23 hgbot Status scheduled => resolved
2017-06-26 14:23 hgbot Resolution open => fixed
2017-06-26 14:23 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/62e2b80668eb5009711ab99c962b5bfe0acec569 [^]
2017-06-27 09:12 marvintm Review Assigned To => marvintm
2017-06-27 09:12 marvintm Status resolved => closed
2017-06-27 09:12 marvintm Fixed in Version => RR17Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker