Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043528Retail ModulesWeb POSpublic2020-03-20 08:472020-03-27 08:22
AugustoMauch 
markmm82 
normalmajorhave not tried
closedfixed 
5
 
RR20Q2 
jorge-garcia
Production - Confirmed Stable
2019-07-11
RR19Q4
https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.programs/-/commit/065095a08093b2356c74302d1bd7adf9ac065d7a [^]
No
0043528: + and - keys increase/decrease quantity twice if loyalty programs module is installed
The loyalty programs modules defines a new keyboard in the addpoints-keyboard.js file. That keyboard is capturing the +/- key events and increasing the quantity of a product in a ticket. As a result this event is handled twice, and the quantity is updated twice.
Reproducible in live builds:

- Go to [1], and in the vallblanca client open the Touchpoint Type window
- Open VBS POS Terminal Type, check the Use External Input flag to enable updating the product quantities using the +/- keys
- Log out and go to the frontend [2].
- Add a product to the ticket
- Press the + sign on your keyboard, check that the quantity went from 1 to 3

[1] https://livebuilds.openbravo.com/retail_modules_pgsql_pi/ [^]
[2] https://livebuilds.openbravo.com/retail_modules_pgsql_pi/web/org.openbravo.retail.posterminal/?terminal=VBS-1 [^]
No tags attached.
diff 43528_betterApproach.diff (658) 2020-03-26 13:28
https://issues.openbravo.com/file_download.php?file_id=14219&type=bug
Issue History
2020-03-20 08:47AugustoMauchNew Issue
2020-03-20 08:47AugustoMauchAssigned To => Retail
2020-03-20 08:47AugustoMauchResolution time => 1585864800
2020-03-20 08:47AugustoMauchRegression level => Production - Confirmed Stable
2020-03-20 08:47AugustoMauchRegression date => 2019-07-11
2020-03-20 08:47AugustoMauchRegression introduced in release => RR19Q3
2020-03-20 08:47AugustoMauchTriggers an Emergency Pack => No
2020-03-20 08:51marvintmCategoryLoyalty Programs for Web POS => Web POS
2020-03-20 08:51marvintmSeverityminor => major
2020-03-20 08:55AugustoMauchRegression introduced by commit => https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.loyalty.programs/-/commit/065095a08093b2356c74302d1bd7adf9ac065d7a [^]
2020-03-20 08:58AugustoMauchRegression introduced in releaseRR19Q3 => RR19Q4
2020-03-20 12:03markmm82Assigned ToRetail => markmm82
2020-03-20 12:10markmm82Statusnew => scheduled
2020-03-20 18:03hgbotCheckin
2020-03-20 18:03hgbotNote Added: 0118739
2020-03-20 18:03hgbotStatusscheduled => resolved
2020-03-20 18:03hgbotResolutionopen => fixed
2020-03-20 18:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.loyalty.programs/rev/84b1c391f63e1f3ebe5a3d8d6315717d1e945902 [^]
2020-03-26 12:10jorge-garciaReview Assigned To => jorge-garcia
2020-03-26 13:27jorge-garciaNote Added: 0118836
2020-03-26 13:27jorge-garciaStatusresolved => new
2020-03-26 13:27jorge-garciaResolutionfixed => open
2020-03-26 13:28jorge-garciaFile Added: 43528_betterApproach.diff
2020-03-26 15:10hgbotCheckin
2020-03-26 15:10hgbotNote Added: 0118846
2020-03-26 15:20markmm82Statusnew => scheduled
2020-03-26 16:02markmm82Statusscheduled => resolved
2020-03-26 16:02markmm82Resolutionopen => fixed
2020-03-27 08:22jorge-garciaNote Added: 0118854
2020-03-27 08:22jorge-garciaStatusresolved => closed
2020-03-27 08:22jorge-garciaFixed in Version => RR20Q2

Notes
(0118739)
hgbot   
2020-03-20 18:03   
Repository: erp/pmods/org.openbravo.retail.loyalty.programs
Changeset: 84b1c391f63e1f3ebe5a3d8d6315717d1e945902
Author: Mark Molina <mark.molina <at> doceleguas.com>
Date: Fri Mar 20 14:02:39 2020 -0300
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.loyalty.programs/rev/84b1c391f63e1f3ebe5a3d8d6315717d1e945902 [^]

Fixes BUG-43528: + and - keys increase/decrease qty twice if loyalty programs

The loyalty programs modules defines a new keyboard in the addpoints-keyboard.js file.
That keyboard is capturing the +/- key events and increasing the quantity of a product in a ticket.
As a result this event is handled twice, and the quantity is updated twice.

To fix it, the globalKeypressHandler handle is redefined in the keyboard of the OBRLP.UI.AddPoints.Keyboard
to don't do nothing if the key pressed is + or -.

---
M web/org.openbravo.retail.loyalty.programs/js/component/addpoints-keyboard.js
---
(0118836)
jorge-garcia   
2020-03-26 13:27   
The solution is working but as the addpoints keyboard is on a popup, it will ignore every globalkeypresshandler once the popup is open.

To avoid possible future problem, it is better to ignore every globalkeypresshandler in this keyboard instead of only "+" and "-" commands.

A patch is attached in this issue with the proposed solution.
(0118846)
hgbot   
2020-03-26 15:10   
Repository: erp/pmods/org.openbravo.retail.loyalty.programs
Changeset: 13a4e5a64d8b44bce346af6141d8f5d572e60f34
Author: Mark Molina <mark.molina <at> doceleguas.com>
Date: Thu Mar 26 10:11:45 2020 -0300
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.loyalty.programs/rev/13a4e5a64d8b44bce346af6141d8f5d572e60f34 [^]

Related to BUG-43528: Ignore every globalkeypresshandler instead of only "+","-"

To avoid possible future problem, it is better to ignore every globalkeypresshandler
in this keyboard instead of only "+" and "-" commands.

---
M web/org.openbravo.retail.loyalty.programs/js/component/addpoints-keyboard.js
---
(0118854)
jorge-garcia   
2020-03-27 08:22   
Code reviewed and tested