Openbravo Issue Tracking System - Retail Modules
View Issue Details
0037470Retail ModulesWeb POSpublic2017-12-13 15:522018-02-19 18:17
adrianromero 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR18Q1 
marvintm
No
0037470: Best sellers module queries fail when changing POS language
The best seller product criteria method throws an error in the javascript console because the terminal ID is not in the request session.

The problem is in the following code lines:

https://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/file/tip/src/org/openbravo/retail/bestsellers/BrandBestSellerHQLCriteria.java#l31 [^]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/file/tip/src/org/openbravo/retail/bestsellers/PCharacteristicBestSellerHQLCriteria.java#l34 [^]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/file/tip/src/org/openbravo/retail/bestsellers/PCharacteristicValueBestSellerHQLCriteria.java#l34 [^]

The problem is that the session attribute "POSTerminal" does not exist in the reload process executed when updating the user profile.

In other places the POS Terminal identifier is requested from the query parameters, for example this changeset modifies how to get the POS Terminal identifier: https://code.openbravo.com/erp/pmods/org.openbravo.retail.digitalcoupons/rev/270c6f796a50 [^]

The problem is that in best sellers criteria methods there is no parameter at all.

* Install module org.openbravo.retail.bestsellers.
* Log in WEB POS terminal VBS-1
* Select in the menu User > Profile
* In the dialog change one option. For example check "Set as Default" and apply.
* Wait for the WEB POS to reload
* Open the developer tools and verify the following errors in the console:

49a7e4275a09208a14dfa75f794f4941.js:3175 serviceSuccess error: status: -1; line: serviceSuccess (http://localhost:8080/openbravo/web/js/gen/49a7e4275a09208a14dfa75f794f4941.js:1148:12 [^]) (*,+)
49a7e4275a09208a14dfa75f794f4941.js:3175 Error in datasource: [object Object]; line: http://localhost:8080/openbravo/web/js/gen/49a7e4275a09208a14dfa75f794f4941.js:1629:14 [^] (*,+)
No tags attached.
Issue History
2017-12-13 15:52adrianromeroNew Issue
2017-12-13 15:52adrianromeroAssigned To => Retail
2017-12-13 15:52adrianromeroTriggers an Emergency Pack => No
2017-12-13 16:10adrianromeroSummaryBest sellers module queries fails when changing POS language => Best sellers module queries fail when changing POS language
2017-12-14 10:37ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-12-14 10:37ranjith_qualiantech_comStatusnew => scheduled
2017-12-16 08:18hgbotCheckin
2017-12-16 08:18hgbotNote Added: 0101078
2017-12-16 12:54ranjith_qualiantech_comStatusscheduled => resolved
2017-12-16 12:54ranjith_qualiantech_comResolutionopen => fixed
2017-12-20 19:00marvintmReview Assigned To => marvintm
2017-12-20 19:00marvintmStatusresolved => closed
2017-12-20 19:00marvintmFixed in Version => RR18Q1
2018-02-19 18:17hgbotCheckin
2018-02-19 18:17hgbotNote Added: 0102500

Notes
(0101078)
hgbot   
2017-12-16 08:18   
Repository: erp/pmods/org.openbravo.retail.bestsellers
Changeset: a962807edfce9550e41f6f7b0b40efdfd31cfa76
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Sat Dec 16 12:48:45 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.bestsellers/rev/a962807edfce9550e41f6f7b0b40efdfd31cfa76 [^]

Related to issue 37470 : Replaced session values with Terminal values from request in master data

---
M src/org/openbravo/retail/bestsellers/BestSellersProperties.java
---
(0102500)
hgbot   
2018-02-19 18:17   
Repository: erp/pmods/org.openbravo.retail.orderpreparation
Changeset: d27bf512ba1f78833177aad317696b03db05737f
Author: Prakash M <prakash <at> qualiantech.com>
Date: Wed Feb 14 17:04:01 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.orderpreparation/rev/d27bf512ba1f78833177aad317696b03db05737f [^]

Replaced session values with Terminal values

* Session values will be lost after user profile update
* Similar to issue 37470

---
M src/org/openbravo/retail/orderpreparation/term/OrderPreDocnoPrefixTerminal.java
---