Openbravo Issue Tracking System - Modules
View Issue Details
0039391ModulesAdvanced Warehouse Operationspublic2018-10-02 14:212018-12-11 20:22
vmromanos 
vmromanos 
normalminoralways
closedfixed 
5
 
 
Sandrahuguet
0039391: Movements within the same bin for a product without attribute should not be allowed
stem should avoid it raising an exception.

This is the case for products with attributes, however in products without attributes and only in case the movement is created from an AWO task, the system wrongly allows the movement.

Please note that:
1. Actually the movement does nothing, because the stock remains in the same bin. That's why the issue is set as minor
2. This is only reproducible when the movement is created from AWO because in this case, when the product has no attribute, it sets it to '0' by default
In an AWO environment with AWO sampledata.

Login as AWO-QA Admin role
Go to Warehouse Operations window
Search for Coconut in Food003 bin
Select it and press Move button. Enter Food003 as storage bin and press done.
Move to Task tab below and press Confirm with default values.
An error should be raised but instead the movement is successfully created and processed
No tags attached.
related to defect 0038019 closed vmromanos Openbravo ERP It is possible to create a Goods Movement for the same Bin 
blocks defect 0038992 closed guilleaer Modules Validate that Bin From and Bin To are not the same if it is not allowed 
Issue History
2018-10-02 14:21vmromanosNew Issue
2018-10-02 14:21vmromanosAssigned To => vmromanos
2018-10-02 14:21vmromanosRelationship addedblocks 0038992
2018-10-02 14:21vmromanosRelationship addedrelated to 0038019
2018-10-02 14:22vmromanosStatusnew => scheduled
2018-10-02 14:22vmromanosNote Added: 0107117
2018-10-02 16:36vmromanosNote Added: 0107118
2018-10-04 13:16hgbotCheckin
2018-10-04 13:16hgbotNote Added: 0107157
2018-10-04 13:16hgbotStatusscheduled => resolved
2018-10-04 13:16hgbotResolutionopen => fixed
2018-10-04 13:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f65e0d7d96273a3dd3c15316d8b3424468d4dc76 [^]
2018-10-04 13:18SandrahuguetReview Assigned To => Sandrahuguet
2018-10-04 13:18SandrahuguetNote Added: 0107158
2018-10-04 13:18SandrahuguetStatusresolved => closed
2018-12-11 20:22hudsonbotCheckin
2018-12-11 20:22hudsonbotNote Added: 0108420
2022-09-06 17:18caristuCategoryAdvance Warehouse Operations => Advanced Warehouse Operations

Notes
(0107117)
vmromanos   
2018-10-02 14:22   
Declared in AWO project but it is actually a Core defect
(0107118)
vmromanos   
2018-10-02 16:36   
Test plan I (move product without attribute same bin):

In an AWO environment with AWO sampledata.

Login as AWO-QA Admin role
Go to Warehouse Operations window
Search for Coconut in Food003 bin
Select it and press Move button. Enter Food003 as storage bin and press done.
Move to Task tab below and press Confirm with default values.
An error is raised:
Storage Bin must be different than New Storage Bin.



Test plan II (move product with attribute same bin):

In an AWO environment with AWO sampledata.

Login as AWO-QA Admin role
Go to Warehouse Operations window
Search for Ice Cube in Beverage102 bin
Select it and press Move button. Enter Beverage102 as storage bin and press done.
Move to Task tab below and press Confirm with default values.
An error is raised:
Storage Bin must be different than New Storage Bin.



Test plan III (awo box/unbox same bin):

In an AWO environment with AWO sampledata.

Login as AWO-QA Admin role
Go to Warehouse Operations window
Search for Lemon Soda (without attribute set value) in SHP301 bin
Select it and press Box button. Enter Big Box as Referenced Inventory Type, SHP301 as storage bin and press done.
Move to Task tab below and press Confirm with default values.
Process is completed succesfully.
Refresh Warehouse Operations tab and verify stock is in SHP301 and the Attribute Set Value is like [BB1000%]
Now press Unbox button. Enter Big Box as Referenced Inventory Type, SHP301 as storage bin and press done.
Refresh Warehouse Operations tab and verify stock is in SHP301 and the Attribute Set Value is empty



Test plan IV (core box/unbox same bin):

Login as F&B Admin
Go to Referenced Inventory window.
Select record CG1000000
Press box and select cerveza lager 100 unit
Enter storage bin Rn-0-0-0
Press done.
Verify the 100 units of Cerveza lager are in contents tab.
Now press unbox.
Select 100 units of Cerveza lager.
Leave storage bin to Rn-0-0-0.
Press done.
Verify Contents tab does not show Cerveza lager anymore
(0107157)
hgbot   
2018-10-04 13:16   
Repository: erp/devel/pi
Changeset: f65e0d7d96273a3dd3c15316d8b3424468d4dc76
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Oct 02 16:49:40 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f65e0d7d96273a3dd3c15316d8b3424468d4dc76 [^]

Fixed bug 39391: Movements in same bin for non-attribute product

The goods movement created by AWO when a product has no attribute are automatically set with m_attributesetinstance_id = '0'.
In a normal movement the m_attributesetinstanceTO_id is usually null (unless an attribute change or a RI related flow involved). Thus the comparation has '0'='X' which avoided to raise the expected error.

Note that in Core the m_attributesetinstance_id for non-attribute product is NULL, so the issue is not reproducible in Core. Besides the UI controls this scenario very well.

The solution is done in the trigger rather than in AWO because it is safer and easier to develop.
It runs the locators check only when m_attributesetinstanceTO_id is null.
If m_attributesetinstanceTO_id is not null it implies an attribute change or a RI related movement, and in any of these cases it is allowed to run the movement within the same bin.

---
M src-db/database/model/triggers/M_MOVEMENTLINE_TRG.xml
---
(0107158)
Sandrahuguet   
2018-10-04 13:18   
Code review + testing OK
(0108420)
hudsonbot   
2018-12-11 20:22   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test