Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039813Retail ModulesWeb POSpublic2018-12-17 11:052018-12-18 19:11
gorkaion 
ranjith_qualiantech_com 
urgentmajoralways
closedfixed 
5
 
RR19Q1 
marvintm
No
0039813: ExternalOrderLoader DefaultDataResolver does not filter by client id
On an environment with several clients. If you have the same search key for a product in different clients defined in * org. The DefaultDataResolver is not filtering by client id so it is not possible to determine the product id to use when using the search key.
On an environment with F&B and Whitevalley Group clients.

Configure in both clients a product with the same search key and stored in the * organization.

Try to load an order using ExternalOrderLoader where the product is set using the SearchKey. "No product could be found for...." error is returned. The real error is that 2 products are found and it is not possible to determine the correct product.

Try to load the same order but using the product id, check that in this case it works as expected.
Add the client to the query of the DefaultDataResolver:


String qryStr = "select id from " + entityName + " where " + property + "=:value"
            + " and organization.id " + OBDal.getInstance().getReadableOrganizationsInClause();
            + " and client.id " + OBDal.getInstance().getReadableClientsInClause();
No tags attached.
related to defect 0039774 closed marvintm ExternalOrderLoader should establish the context according to the POS Terminal specified in the request 
related to defect 0039879 closed rqueralta ExternalOrderLoader should search entities based on POS Terminal Org instead of user readable orgs 
Issue History
2018-12-17 11:05gorkaionNew Issue
2018-12-17 11:05gorkaionAssigned To => Retail
2018-12-17 11:05gorkaionResolution time => 1546815600
2018-12-17 11:05gorkaionTriggers an Emergency Pack => No
2018-12-17 11:10rafarodaIssue Monitored: rafaroda
2018-12-17 11:11rafarodaRelationship addedrelated to 0039774
2018-12-17 17:08ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2018-12-18 08:06ranjith_qualiantech_comStatusnew => scheduled
2018-12-18 10:18hgbotCheckin
2018-12-18 10:18hgbotNote Added: 0108662
2018-12-18 10:18hgbotStatusscheduled => resolved
2018-12-18 10:18hgbotResolutionopen => fixed
2018-12-18 10:18hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/565522f65fefaed3b1aeec40351baa2e19092408 [^]
2018-12-18 19:11marvintmReview Assigned To => marvintm
2018-12-18 19:11marvintmStatusresolved => closed
2018-12-18 19:11marvintmFixed in Version => RR19Q1
2019-01-09 09:46rafarodaRelationship addedrelated to 0039879

Notes
(0108662)
hgbot   
2018-12-18 10:18   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 565522f65fefaed3b1aeec40351baa2e19092408
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Tue Dec 18 14:48:24 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/565522f65fefaed3b1aeec40351baa2e19092408 [^]

Fixed issue 39813 : Added client Validation to ExternalOrderLoader DefaultDataResolver query

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
---