Openbravo Issue Tracking System - Retail Modules
View Issue Details
0043369Retail ModulesWeb POSpublic2020-02-28 11:322020-04-17 15:09
gorkaion 
prakashmurugesan88 
highmajoralways
closedfixed 
5
 
RR20Q3 
guilleaer
No
0043369: When using instance attributes shipment might use an instance from a different product
On environment where the same attribute description can be generated for several products. Because they share the same attribute set or similar set with same attributes.

When the shipment is generated and the attribute set instance is searched based on the received description it is not checking if the find attribute set instance id is for the order line product.
1. Create an instance attribute set with lot and expiration date.
2. Assign it to several products.
3. Create some receipts for those products using the same lot and expiration date.
4. Check in database that different m_attributesetintance records are created with the same description.
5. Create some sales orders in the POS for those products and selecting the same lot-expiration date.
6. Check in database that the sales orderlines are assgined to the same attribute set instance.


Issue is in org.openbravo.retail.posterminal.utility.AttributesUtils.fetchAttributeSetValue() method.

It executes 2 queries none of it filtering by product.

It should filter by product and return the ids with available stock. To cover the case of just 1 instance available with that description but used in a different product.

If there is no stock with that description the logic is different based on instance or NOT instance attributes.

For instance attributes (1) it should create a new instance.

For not instance attributes it should check if there exists already a instance without stock.

In case of verified returns it should use always the same attribute set instance id of the original order/shipment.


[1] Instance attribute sets are those with any of the Lot, Serial Number and Expiration Date flags enabled or with an attribute with the instance flag enabled.
No tags attached.
related to defect 0043367 closed rqueralta Performance issues when using attributes and having many instances with the same description 
diff 43369.diff (5,628) 2020-03-31 18:08
https://issues.openbravo.com/file_download.php?file_id=14245&type=bug
diff 43369_test.diff (6,664) 2020-03-31 18:09
https://issues.openbravo.com/file_download.php?file_id=14246&type=bug
Issue History
2020-02-28 11:32gorkaionNew Issue
2020-02-28 11:32gorkaionAssigned To => Retail
2020-02-28 11:32gorkaionResolution time => 1584658800
2020-02-28 11:32gorkaionTriggers an Emergency Pack => No
2020-02-28 11:32gorkaionRelationship addedrelated to 0043367
2020-02-28 11:33gorkaionNote Added: 0118199
2020-03-12 13:45rqueraltaAssigned ToRetail => rqueralta
2020-03-12 13:45rqueraltaStatusnew => scheduled
2020-03-31 18:08rqueraltaFile Added: 43369.diff
2020-03-31 18:09rqueraltaFile Added: 43369_test.diff
2020-04-01 14:56prakashmurugesan88Assigned Torqueralta => prakashmurugesan88
2020-04-02 10:11guilleaerAssigned Toprakashmurugesan88 => Retail
2020-04-02 10:41guilleaerAssigned ToRetail => prakashmurugesan88
2020-04-08 07:24hgbotCheckin
2020-04-08 07:24hgbotNote Added: 0119076
2020-04-08 07:24hgbotStatusscheduled => resolved
2020-04-08 07:24hgbotResolutionopen => fixed
2020-04-08 07:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c13b996165da73529189ba1dea4478a47efe2e51 [^]
2020-04-08 07:24hgbotCheckin
2020-04-08 07:24hgbotNote Added: 0119077
2020-04-08 07:24hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c13b996165da73529189ba1dea4478a47efe2e51 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/626c02c9577d5ee50e8482f3cc6e8c539ec285ce [^]
2020-04-17 15:09guilleaerReview Assigned To => guilleaer
2020-04-17 15:09guilleaerStatusresolved => closed
2020-04-17 15:09guilleaerFixed in Version => RR20Q3

Notes
(0118199)
gorkaion   
2020-02-28 11:33   
Note that the fix of this issue should take into account the issue reported in 0043367
(0119076)
hgbot   
2020-04-08 07:24   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c13b996165da73529189ba1dea4478a47efe2e51
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Apr 08 10:51:56 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c13b996165da73529189ba1dea4478a47efe2e51 [^]

Fixed BUG-43369: When using instance attributes shipment might use an instance
from a different product

- Remove query in Attributes Set Instance and iltered by product in Storage
Detail query, if we have a result, it is returned, but if it is null a new
Attribute Set Instance is creted

---
M src/org/openbravo/retail/posterminal/utility/AttributesUtils.java
---
(0119077)
hgbot   
2020-04-08 07:24   
Repository: tools/automation/pi-mobile
Changeset: 626c02c9577d5ee50e8482f3cc6e8c539ec285ce
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Wed Apr 08 10:52:10 2020 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/626c02c9577d5ee50e8482f3cc6e8c539ec285ce [^]

Fixed BUG-43369: When using instance attributes shipment might use an instance
from a different product

- Changed I37298_VerifyAttSetInInvoice, ATT010_AttributesLayaways,
ATT090_AttributesInvoice

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/attributes/ATT010_AttributesLayaways.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/attributes/ATT090_AttributesInvoice.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I37298_VerifyAttSetInInvoice.java
---