Openbravo Issue Tracking System - Retail Modules
View Issue Details
0028693Retail ModulesApproval process - onlinepublic2015-01-20 13:582015-02-16 13:48
lorenzofidalgo 
aaroncalero 
urgentcriticalalways
closedfixed 
5
main 
 
migueldejuana
No
0028693: Approval process can be evaded following certain steps
Once approval is required, you can cancel that window, try to logout, cancel that and then you will be able to complete that receipt.
Create a new preference, for example, "Web POS Discretionary Discount Approval"
--
Log in ERP as System Admin
Go to Preferences window
Check for record with Property: Web POS Discretionary Discount Approval
if found then change the value to 'N"
If not found, then create a new record by entering new details
Client : System
Organization: *
Property List: Checked
Property: Web POS Discretionary Discount Approval
Value: N
Visible at client:
Visible at Organization:
Visible at User:
 

Log in ERP as Group -Admin-The White Valley Group
Go to Preferences window
Create a new proference:
Client : The White Valley Group
Organization: Vall Blanca Store
Property List: Checked
Property: Web POS Discretionary Discount Approval
Value: Y
Visible at client:The White Valley Group
Visible at Organization:Vall Blanca Store
Visible at User: Openbravo
--

Then set a discount to use that approval:
--
Log in ERP as Group -Admin-The White Valley Group
Go to Discounts and Promotions window
Create new record
Header tab
Discount type: Discretionary Fixed Percentage
Name: Discount 5%
Starting Date: 01-01-2012
Percentage Discount: 5.00
Included Roles: Only those defined
Role tab
VallBlancaUser
--
Now, go to POS Login screen and login as VallBlanca.
Create a line with any product, go to "Receipt discounts" at menu, set the just created discount to that line and apply that.
Try to complete the receipt and you will see that approval is required. Click cancel in that window.
Go to POS menu and click "Online" tab, click "End Session", check that now approval is avoided. In "Log Out" window, click Cancel.
Now click green "Tick" and click "Done". Receipt completed.


No tags attached.
png ApprovalEvaded.png (185,505) 2015-01-20 13:58
https://issues.openbravo.com/file_download.php?file_id=7710&type=bug
png
Issue History
2015-01-20 13:58lorenzofidalgoNew Issue
2015-01-20 13:58lorenzofidalgoAssigned To => marvintm
2015-01-20 13:58lorenzofidalgoFile Added: ApprovalEvaded.png
2015-01-20 13:58lorenzofidalgoTriggers an Emergency Pack => No
2015-01-20 14:06plujanPriorityimmediate => urgent
2015-01-26 12:47hgbotCheckin
2015-01-26 12:47hgbotNote Added: 0073771
2015-01-26 12:47hgbotStatusnew => resolved
2015-01-26 12:47hgbotResolutionopen => fixed
2015-01-26 12:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9f6afe376ed505bed5162bd4a6a73347548e2168 [^]
2015-01-26 12:47aaroncaleroAssigned Tomarvintm => aaroncalero
2015-01-29 09:55migueldejuanaReview Assigned To => migueldejuana
2015-01-29 09:55migueldejuanaNote Added: 0073880
2015-01-29 09:55migueldejuanaStatusresolved => closed
2015-02-02 13:55lorenzofidalgoNote Added: 0073986
2015-02-02 13:55lorenzofidalgoStatusclosed => new
2015-02-02 13:55lorenzofidalgoResolutionfixed => open
2015-02-03 10:17hgbotCheckin
2015-02-03 10:17hgbotNote Added: 0074014
2015-02-03 10:17hgbotStatusnew => resolved
2015-02-03 10:17hgbotResolutionopen => fixed
2015-02-03 10:17hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9f6afe376ed505bed5162bd4a6a73347548e2168 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fafa4f97032ecf5b38fb9a53e8899582ab2f4f30 [^]
2015-02-03 13:08aaroncaleroNote Added: 0074021
2015-02-03 13:08aaroncaleroStatusresolved => new
2015-02-03 13:08aaroncaleroResolutionfixed => open
2015-02-03 15:34hgbotCheckin
2015-02-03 15:34hgbotNote Added: 0074032
2015-02-03 15:34hgbotStatusnew => resolved
2015-02-03 15:34hgbotResolutionopen => fixed
2015-02-03 15:34hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fafa4f97032ecf5b38fb9a53e8899582ab2f4f30 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d01a26e866255454fa72ef80e4ae9f83596082a4 [^]
2015-02-16 13:48migueldejuanaNote Added: 0074510
2015-02-16 13:48migueldejuanaStatusresolved => closed

Notes
(0073771)
hgbot   
2015-01-26 12:47   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 9f6afe376ed505bed5162bd4a6a73347548e2168
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Mon Jan 26 12:44:55 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9f6afe376ed505bed5162bd4a6a73347548e2168 [^]

Fixed issue 28693: Approval process can be evaded following certain steps

Added callbacks on rejected approvals (cancelled or missing supervisors) to efectively notify components that the approval has been rejected

---
M web/org.openbravo.mobile.core/source/component/obpos-approval.js
---
(0073880)
migueldejuana   
2015-01-29 09:55   
Tested and reviewed in 932c019fa9c2
(0073986)
lorenzofidalgo   
2015-02-02 13:55   
There is another similar flow that let you also to avoid approval.
In "Steps To Reproduce", instead of:
--
"Try to complete the receipt and you will see that approval is required. Click cancel in that window."
--
Do the following:
--
"Try to complete the receipt and you will see that approval is required. Click outside the green approval window."
--
And continue following the cited steps.
(0074014)
hgbot   
2015-02-03 10:17   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fafa4f97032ecf5b38fb9a53e8899582ab2f4f30
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Tue Feb 03 10:12:35 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fafa4f97032ecf5b38fb9a53e8899582ab2f4f30 [^]

Fixed issue 28693: Approval process can be evaded following certain steps

Implemented executeOnHide function to cover the case where the approval popup is dismissed by clicking outside

---
M web/org.openbravo.mobile.core/source/component/obpos-approval.js
---
(0074021)
aaroncalero   
2015-02-03 13:08   
Reopened because the added executeOnHide function is preventing valid approvals.
(0074032)
hgbot   
2015-02-03 15:34   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: d01a26e866255454fa72ef80e4ae9f83596082a4
Author: Aaron Calero <aaron.calero <at> openbravo.com>
Date: Tue Feb 03 15:31:08 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d01a26e866255454fa72ef80e4ae9f83596082a4 [^]

Fixed issue 28693: Approval process can be evaded following certain steps

Prevented the approval from being requested twice if the Approve button is tapped on the approval popup

---
M web/org.openbravo.mobile.core/source/component/obpos-approval.js
---
(0074510)
migueldejuana   
2015-02-16 13:48   
Tested and reviewed in 3f936397a692