Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0049551Openbravo ERP04. Warehouse managementpublic2022-06-14 11:512022-07-26 11:25
gorkaion 
mtaal 
highmajoralways
closedfixed 
5
 
PR22Q4 
Core
No
0049551: No storage detail automatically removed when the product does not have attribute set
The m_update_inventory process is removing from the system the storage details with all the quantities in zero.

There is an exception when the product has an attribute set defined as Specification and the attribute set has the flag to require at least one value disabled.

There is a bug implementing the exception as it does a full join to the attribute set. So it only consider for deletion products using attributes.
Failure test:
- Create a product that does not use attributes
- Create a shipment line with that product (leave in draft the shipment).
- Check in the database that a storage detail is created.
- Delete the shipment line
- Check in the database that the storage detail is not deleted.

Working test:
- Create a product and set an attribute set that has the require at least one value flag enabled. and leave the "use attribute set value as" field empty.
- Create a shipment line with that product (leave in draft the shipment).
- Check in the database that a storage detail is created.
- Delete the shipment line
- Check in the database that the storage detail is deleted.
modify the query to use a left join on attribute set table.
No tags attached.
related to defect 0050776 closed Triage Omni WMS Error in InventoryCountProcess - constraint "m_storage_detail_check1" violation 
Issue History
2022-06-14 11:51gorkaionNew Issue
2022-06-14 11:51gorkaionAssigned To => Triage Omni WMS
2022-06-14 11:51gorkaionModules => Core
2022-06-14 11:51gorkaionTriggers an Emergency Pack => No
2022-07-13 10:29mtaalNote Added: 0139294
2022-07-13 10:30mtaalAssigned ToTriage Omni WMS => mtaal
2022-07-18 11:53hgbotNote Added: 0139381
2022-07-20 09:01hgbotResolutionopen => fixed
2022-07-20 09:01hgbotStatusnew => closed
2022-07-20 09:01hgbotNote Added: 0139439
2022-07-20 09:01hgbotFixed in Version => PR22Q4
2022-07-20 09:01hgbotNote Added: 0139440
2022-07-26 11:25hgbotNote Added: 0139604
2022-11-15 17:07vmromanosRelationship addedrelated to 0050776

Notes
(0139294)
mtaal   
2022-07-13 10:29   
Solution: if a product does not have an attribute set and the storage detail has quantity zero then the storage detail should be deleted as well.
(0139381)
hgbot   
2022-07-18 11:53   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/649 [^]
(0139439)
hgbot   
2022-07-20 09:01   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/649 [^]
(0139440)
hgbot   
2022-07-20 09:01   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 0e2fd06e1575744fb12ed5fc0494ed239e4a29f9
Author: Sandra Huguet <sandra.huguet@openbravo.com>
Date: 20-07-2022 07:00:27
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/0e2fd06e1575744fb12ed5fc0494ed239e4a29f9 [^]

Fixed ISSUE-49551 storagedetail automatically removed when the product does not have attributeset

---
M src-db/database/model/functions/M_UPDATE_INVENTORY.xml
---
(0139604)
hgbot   
2022-07-26 11:25   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations [^]
Changeset: baf8c5dfd172f5d04a86a639786a2f738de5c1b1
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 26-07-2022 14:51:29
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations/-/commit/baf8c5dfd172f5d04a86a639786a2f738de5c1b1 [^]

Related to BUG-0049551: No storage detail automatically removed
when the product does not have attribute set

**In the test data, storage detail for product without attribute
is not found hence before assertion make sure qtyOnHand is
greater than zero so that storage detail exists.
**Handle NPE in case storage detail is null.

---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOri_ReferencedInventoryBoxTest.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/ici/AWOici_WeldBaseTest.java
---