Openbravo Issue Tracking System - Retail Modules
View Issue Details
0048149Retail ModulesWeb POSpublic2021-11-24 07:482021-11-30 08:25
swathi_kamal 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
pi 
RR22Q1 
No
0048149: Problem in hook precustomeraddrsave and precustomersave
When saving new address or new customer in POS, Save button should not be disabled after presavehook hook is cancelled.
If hook OBPOS_PreCustomerAddrSave is cancelled then save button should be enabled again.
In POS,
1. Provide Cancellation=true for hook precustomeraddrsave in console.
OB.UTIL.HookManager.registerHook('OBPOS_PreCustomerAddrSave', function(args, callbacks) {
args.cancellation = true;
OB.UTIL.showError('test');

OB.UTIL.HookManager.callbackExecutor(args, callbacks);
});
2. Click on customer address and create new address.
3. Provide mandatory details and press save.
4. Save button is disabled. But it should not be disabled.
Check attached patch.
No tags attached.
diff Ticket_33272_Problem_in_hooks_patch.diff (1,556) 2021-11-24 07:48
https://issues.openbravo.com/file_download.php?file_id=16393&type=bug
Issue History
2021-11-24 07:48swathi_kamalNew Issue
2021-11-24 07:48swathi_kamalAssigned To => Retail
2021-11-24 07:48swathi_kamalFile Added: Ticket_33272_Problem_in_hooks_patch.diff
2021-11-24 07:48swathi_kamalTriggers an Emergency Pack => No
2021-11-24 08:21PracticsIssue Monitored: Practics
2021-11-25 16:21ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2021-11-26 13:18hgbotNote Added: 0133389
2021-11-30 08:25hgbotResolutionopen => fixed
2021-11-30 08:25hgbotStatusnew => closed
2021-11-30 08:25hgbotNote Added: 0133406
2021-11-30 08:25hgbotFixed in Version => RR22Q1
2021-11-30 08:25hgbotNote Added: 0133407

Notes
(0133389)
hgbot   
2021-11-26 13:18   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/639 [^]
(0133406)
hgbot   
2021-11-30 08:25   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/639 [^]
(0133407)
hgbot   
2021-11-30 08:25   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: ece532cff411ee410f10f0850b3f27c21fd7f9db
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-11-26T11:38:55+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/ece532cff411ee410f10f0850b3f27c21fd7f9db [^]

Fixed ISSUE-48149: Save Button should be enabled when PreSave hook is cancelled
* When saving Customer / CustomerAddress, if PreSave hook is failed, then Save button should be enabled again

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