Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045292Retail ModulesWeb POSpublic2020-10-23 11:002020-10-29 16:17
egoitz 
ranjith_qualiantech_com 
immediatemajoralways
closedfixed 
5
 
 
No
0045292: The search of a product in the backend by id is done using the upper
There is a request send to the backend to get information about a product, bypassing the productid as a parameter, that instead of doing the find with the exact id, it uses upper(m_product_id), what has not to sense.
Using multiupc module for retail
(https://livebuilds.openbravo.com/retail_modules_pgsql_pi/ [^])

1- Enable remote products
2- Enable use external input option for the terminal type
3- Add an upc for some product used on the terminal on the multiupc tab
4- Go to the terminal
5- Scan de barcode for the upc added on point 3
6- Check the requests on the network section on the developers tools
7- See that once the product is found on the local multiupc a request to the backend is done to get information of the product with the following json:

{"parameters":{"terminalTime":"2020-10-23T08:28:03.873Z","terminalTimeOffset":{"value":-120,"type":"long"},"remoteModel":true},"remoteFilters":[{"columns":["id"],"operator":"equals","value":"934E7D7587EC4C7A9E9FF58F0382D450"}],"orderByClause":null,"orderByProperties":null,"_limit":101,"client":"39363B0921BB4293B48383844325E84C","organization":"D270A5AC50874F8BA67A88EE977F8E3B","pos":"9104513C2D0741D4850AE8493998A7C8","terminalName":"VBS-1","appName":"WebPOS","csrfToken":"0497C8192A8E40669BEE01EB63820EA6","timeout":5000}

The query executed after that has the folloiwng where clause:

FROM OBRETCO_Prol_Product obretco_pr0_
LEFT OUTER JOIN M_Product product1_ ON obretco_pr0_.M_Product_ID=product1_.M_Product_ID
LEFT OUTER JOIN AD_Image adimage2_ ON product1_.AD_Image_ID=adimage2_.AD_Image_ID
INNER JOIN M_Product product3_ ON obretco_pr0_.M_Product_ID=product3_.M_Product_ID
LEFT OUTER JOIN M_AttributeSet attributes4_ ON product3_.M_AttributeSet_ID=attributes4_.M_AttributeSet_ID
INNER JOIN M_ProductPrice pricingpro5_ ON product3_.M_Product_ID=pricingpro5_.M_Product_ID
CROSS JOIN C_UOM uom7_
WHERE product3_.C_UOM_ID=uom7_.C_UOM_ID
  AND 1=1
  AND upper(product3_.M_Product_ID)=upper('0D2E23EA3A8847A6A6EB16D900DBFAEB')




See last line:
 AND upper(product3_.M_Product_ID)=upper('0D2E23EA3A8847A6A6EB16D900DBFAEB')


No tags attached.
Issue History
2020-10-23 11:00egoitzNew Issue
2020-10-23 11:00egoitzAssigned To => Retail
2020-10-23 11:00egoitzResolution time => 1604358000
2020-10-23 11:00egoitzTriggers an Emergency Pack => No
2020-10-26 09:23ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-10-26 09:23ranjith_qualiantech_comStatusnew => scheduled
2020-10-26 09:25hgbotNote Added: 0123934
2020-10-29 16:17hgbotResolutionopen => fixed
2020-10-29 16:17hgbotStatusscheduled => closed
2020-10-29 16:17hgbotNote Added: 0124025
2020-10-29 16:17hgbotNote Added: 0124026

Notes
(0123934)
hgbot   
2020-10-26 09:25   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.multiupc/-/merge_requests/1 [^]
(0124025)
hgbot   
2020-10-29 16:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.multiupc [^]
Changeset: 10d8daef5cc59c6c8d482dc160f7601ffeb3e604
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2020-10-26T13:54:48+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.multiupc/-/commit/10d8daef5cc59c6c8d482dc160f7601ffeb3e604 [^]

Fixed ISSUE-45292: Added IsID param for Remote Product search with Product ID

---
M web/org.openbravo.retail.multiupc/js/extendUPCSearch.js
---
(0124026)
hgbot   
2020-10-29 16:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.multiupc/-/merge_requests/1 [^]