Openbravo Issue Tracking System - Modules |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0043106 | Modules | Advanced Warehouse Operations | public | 2020-02-04 09:38 | 2020-02-25 10:19 |
|
Reporter | dmiguelez | |
Assigned To | dmiguelez | |
Priority | urgent | Severity | major | Reproducibility | always |
Status | new | Resolution | open | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | | |
Merge Request Status | |
Regression date | |
Regression introduced by commit | |
Regression level | |
Review Assigned To | |
Support ticket | |
OBNetwork customer | |
Regression introduced in release | |
|
Summary | 0043106: Reservations are not respected when generating Tasks if Overissue is enabled in the Inventory Status |
Description | When a stock has an Inventory Status that allows overissue, AWO can generate Tasks for more quantity than available.
However, this behavior creates problems with reservations, as the reserved stock must not be taken by other documents.
The process can not be completed as it fails when confirming the Task due to reservations code that preserves this integrity. |
Steps To Reproduce | Log in as QAAdmin
Go to Product Window and create a new record with:
* Organization: US
* SearchKey: Test
* Name: Test
* Storage Bin Group List: Food SBGL
Price Tab:
* Price List Version: Be Soft Drinker Price List
* Unit Price: 10
* List Price: 10
* Price List Version: General Sales
* Unit Price: 10
* List Price: 10
Alternate UOM:
* UOM: Pallet
* Conversion Rate: 1000
Go to Goods Receipt window and create a new record with:
* Organization: US
* Warehouse: US West Coast
* Business Partner: Be Soft Drinker
Lines
* Product: Test
* Operative Quantity: 15
* Storage Bin: Food101
Complete the document
Go to Sales Order window and create 3 Sales Orders with:
* Organization: US West Coast
* Business Partner: Healthy Food Supermarkets
* Warehouse: US West Coast
Lines:
* Product: Ale Beer
* Operative Quantity: 5
Book the 3 Sales Orders
For each Sales Order click on Pick button and select Openbravo as the assigned user
In the Front End log in with Openbravo user
Confirm each of the 3 Tasks with 3 units and select 'Skip delta' in the delta confirmation pop up
In the Backend select the first Sales Order and click on Issue button. Select Openbravo as the assigned user
In the Front End, realize that the Goods Issue has 2 task inside, one for 3 unist and one for 2
Try to confirm the Goods Issue, it fails with the message: Unexpected exception processing grouped task: Cannot take out reserved stock of Product: David, Attribute Set Instance: -, UOM: Ud and Storage Bin: SHP301
|
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2020-02-04 09:38 | dmiguelez | New Issue | |
2020-02-04 09:38 | dmiguelez | Assigned To | => Triage Finance |
2020-02-04 09:48 | dmiguelez | Note Added: 0117447 | |
2020-02-04 11:34 | hgbot | Checkin | |
2020-02-04 11:34 | hgbot | Note Added: 0117451 | |
2020-02-04 11:34 | hgbot | Status | new => resolved |
2020-02-04 11:34 | hgbot | Resolution | open => fixed |
2020-02-04 11:34 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/aedf602c3945a5613b32f5d064ea512a96e24b50 [^] |
2020-02-04 11:34 | hgbot | Checkin | |
2020-02-04 11:34 | hgbot | Note Added: 0117452 | |
2020-02-04 11:40 | hgbot | Checkin | |
2020-02-04 11:40 | hgbot | Note Added: 0117453 | |
2020-02-04 16:35 | hgbot | Checkin | |
2020-02-04 16:35 | hgbot | Note Added: 0117461 | |
2020-02-04 16:35 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/aedf602c3945a5613b32f5d064ea512a96e24b50 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/7f467f602f724e249bf7b6b7a44db8d59c76a8dc [^] |
2020-02-04 16:35 | hgbot | Checkin | |
2020-02-04 16:35 | hgbot | Note Added: 0117462 | |
2020-02-11 09:59 | vmromanos | Assigned To | Triage Finance => dmiguelez |
2020-02-11 13:55 | vmromanos | Note Added: 0117637 | |
2020-02-11 14:22 | vmromanos | Note Edited: 0117637 | bug_revision_view_page.php?bugnote_id=0117637#r20335 |
2020-02-12 10:06 | dmiguelez | Note Edited: 0117447 | bug_revision_view_page.php?bugnote_id=0117447#r20355 |
2020-02-12 10:06 | dmiguelez | Note Edited: 0117637 | bug_revision_view_page.php?bugnote_id=0117637#r20356 |
2020-02-12 16:21 | hgbot | Checkin | |
2020-02-12 16:21 | hgbot | Note Added: 0117697 | |
2020-02-25 09:21 | hgbot | Checkin | |
2020-02-25 09:21 | hgbot | Note Added: 0118073 | |
2020-02-25 09:36 | hgbot | Checkin | |
2020-02-25 09:36 | hgbot | Note Added: 0118075 | |
2020-02-25 09:36 | hgbot | Checkin | |
2020-02-25 09:36 | hgbot | Note Added: 0118076 | |
2020-02-25 09:36 | hgbot | Checkin | |
2020-02-25 09:36 | hgbot | Note Added: 0118077 | |
2020-02-25 09:36 | hgbot | Checkin | |
2020-02-25 09:36 | hgbot | Note Added: 0118078 | |
2020-02-25 09:36 | hgbot | Checkin | |
2020-02-25 09:36 | hgbot | Note Added: 0118079 | |
2020-02-25 09:36 | hgbot | Checkin | |
2020-02-25 09:36 | hgbot | Note Added: 0118080 | |
2020-02-25 09:36 | hgbot | Checkin | |
2020-02-25 09:36 | hgbot | Note Added: 0118081 | |
2020-02-25 09:38 | hgbot | Checkin | |
2020-02-25 09:38 | hgbot | Note Added: 0118082 | |
2020-02-25 09:39 | dmiguelez | Type | defect => design defect |
2020-02-25 09:58 | dmiguelez | Note Added: 0118085 | |
2020-02-25 09:58 | dmiguelez | Note Edited: 0118085 | bug_revision_view_page.php?bugnote_id=0118085#r20441 |
2020-02-25 10:19 | dmiguelez | Note Added: 0118087 | |
2020-02-25 10:19 | dmiguelez | Status | resolved => new |
2020-02-25 10:19 | dmiguelez | Resolution | fixed => open |
2022-09-06 17:18 | caristu | Category | Advance Warehouse Operations => Advanced Warehouse Operations |
Notes |
|
(0117447)
|
dmiguelez
|
2020-02-04 09:48
(edited on: 2020-02-12 10:06) |
|
Log in as QAAdmin
Go to Product Window and create a new record with:
* Organization: US
* SearchKey: Test
* Name: Test
* Storage Bin Group List: Food SBGL
Price Tab:
* Price List Version: Be Soft Drinker Price List
* Unit Price: 10
* List Price: 10
* Price List Version: General Sales
* Unit Price: 10
* List Price: 10
Alternate UOM:
* UOM: Pallet
* Conversion Rate: 1000
Go to Goods Receipt window and create a new record with:
* Organization: US
* Warehouse: US West Coast
* Business Partner: Be Soft Drinker
Lines
* Product: Test
* Operative Quantity: 15
* Storage Bin: Food101
Complete the document
Go to Sales Order window and create 3 Sales Orders with:
* Organization: US West Coast
* Business Partner: Healthy Food Supermarkets
* Warehouse: US West Coast
Lines:
* Product: Test
* Operative Quantity: 5
Book the 3 Sales Orders
For each Sales Order click on Pick button and select Openbravo as the assigned user
In the Front End log in with Openbravo user
Confirm each of the 3 Tasks with 3 units and select 'Skip delta' in the delta confirmation pop up
In the Backend select the first Sales Order and click on Issue button. Select Openbravo as the assigned user
In the Front End, realize that the Goods Issue has only 1 task inside for 3 units.
Confirm the Task, no errors are raised.
|
|
|
(0117451)
|
hgbot
|
2020-02-04 11:34
|
|
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: aedf602c3945a5613b32f5d064ea512a96e24b50
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 04 09:40:56 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/aedf602c3945a5613b32f5d064ea512a96e24b50 [^]
Fixes ISSUE-43106: When managing negative stock logic, take into account
possible reservations.
If there is stock reserved, this can not be taken by other documents,
even if negative stock is allowed for the selected stock.
An automated test has been modified to support this change.
---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOg_PKAlgorithms.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/task/NegativeStockUtils.java
---
|
|
|
(0117452)
|
hgbot
|
2020-02-04 11:34
|
|
|
|
(0117453)
|
hgbot
|
2020-02-04 11:40
|
|
|
|
(0117461)
|
hgbot
|
2020-02-04 16:35
|
|
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 7f467f602f724e249bf7b6b7a44db8d59c76a8dc
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 04 09:40:56 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/7f467f602f724e249bf7b6b7a44db8d59c76a8dc [^]
Fixes ISSUE-43106: When managing negative stock logic, take into account
possible reservations.
If there is stock reserved, this can not be taken by other documents,
even if negative stock is allowed for the selected stock.
An automated test has been modified to support this change.
---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOg_PKAlgorithms.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/task/NegativeStockUtils.java
---
|
|
|
(0117462)
|
hgbot
|
2020-02-04 16:35
|
|
|
|
(0117637)
|
vmromanos
|
2020-02-11 13:55
(edited on: 2020-02-12 10:06) |
|
The fix is not fully OK.
See next test case which is a small modification from the original one:
Log in as QAAdmin
Go to Product Window and create a new record with:
* Organization: US
* SearchKey: Test
* Name: Test
* Storage Bin Group List: Food SBGL
Price Tab:
* Price List Version: Be Soft Drinker Price List
* Unit Price: 10
* List Price: 10
* Price List Version: General Sales
* Unit Price: 10
* List Price: 10
Alternate UOM:
* UOM: Pallet
* Conversion Rate: 1000
Go to Goods Receipt window and create a new record with:
* Organization: US
* Warehouse: US West Coast
* Business Partner: Be Soft Drinker
Lines
* Product: Test
* Operative Quantity: 16
* Storage Bin: Food101
Complete the document
Go to Sales Order window and create 3 Sales Orders with:
* Organization: US West Coast
* Business Partner: Healthy Food Supermarkets
* Warehouse: US West Coast
Lines:
* Product: Test
* Operative Quantity: 5
Book the 3 Sales Orders
For each Sales Order click on Pick button.
Go to the Sales Order | Lines | Task tab in backend and confirm 3 units for each of the sales orders. Select "No" in Delta popup.
Go to the Locator To of any of the tasks and Change the Status to Undefined-OverIssue (remove any existing task not confirmed yet that you might have there).
Now go to Warehouse Operations and search for the test product. It should be available in 2 locations:
* Food101: 7 units (0 reserved)
* <locator in SHP area>: 9 units (9 reserved)
Select the stock in Food101 and move just 1 unit to the locator in SHP area. Confirm the task. Now the stock is distributed this way:
* Food101: 6 units (0 reserved)
* <locator in SHP area>: 10 units (9 reserved)
In the Backend select the first Sales Order and click on Issue button.
Go to Lines | Task and check there are three new issue tasks:
* 3 units belonging to the 3 units picked before [OK]
* 1 unit belonging to the unit without reservation that we have just moved [OK]
* 1 unit to complete the 5 units in the order because of the overissue status. This is WRONG because this unit has been stolen from the other orders. This task shouldn't be created.
Now go to the second order and press the Issue button.
Go to Lines | Task and check there is just one issue task for the 3 units picked before [OK]
|
|
|
(0117697)
|
hgbot
|
2020-02-12 16:21
|
|
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: e20eeea028c3b4e6e87774e80a54d81de4f6a9e5
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Feb 12 16:21:28 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/e20eeea028c3b4e6e87774e80a54d81de4f6a9e5 [^]
Related to ISSUE-43106. Code Review Changes:
The logic that should be applied to check for Stock that allows
Negative Stock should be:
1. If the given storage detail is not empty and does not have reservations
related to it, return this storage detail
2. If not, look for a Bin that allows overissue and does not have
reservations for this product. If a Bin is found, retrieve a storage detail
from it or create a new one if necessary
This logic assumes that reservations are more important than negative stock, so it is
not possible to go to negative stock while there is a reservation in place, because
this would mean that the reservation could be stolen.
* Simplified original method
* Modified query to retrieve the bin and take into account reservations
* Improved names of the methods
* Improved JavaDoc
---
M src/org/openbravo/warehouse/advancedwarehouseoperations/task/NegativeStockUtils.java
M src/org/openbravo/warehouse/advancedwarehouseoperations/task/TaskProposalGeneratorPKAlgorithms.java
---
|
|
|
(0118073)
|
hgbot
|
2020-02-25 09:21
|
|
Repository: tools/automation/pi-mobile
Changeset: bb5ed5a600604ff688e317328e010e8cae4ffe52
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 25 09:21:11 2020 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/bb5ed5a600604ff688e317328e010e8cae4ffe52 [^]
Related to Issue 43106. Adapted test to be compatible with the problem
found in the issue. Added an extra test to check corner cases.
---
M src-test/org/openbravo/test/mobile/awo/tests/CollapsedTasks/AllAWOCollapsedTaskTests.java
---
|
|
|
(0118075)
|
hgbot
|
2020-02-25 09:36
|
|
|
|
(0118076)
|
hgbot
|
2020-02-25 09:36
|
|
|
|
(0118077)
|
hgbot
|
2020-02-25 09:36
|
|
|
|
(0118078)
|
hgbot
|
2020-02-25 09:36
|
|
|
|
(0118079)
|
hgbot
|
2020-02-25 09:36
|
|
|
|
(0118080)
|
hgbot
|
2020-02-25 09:36
|
|
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 5c988f0a9d1c8577c4bf2047dfe2c0ee63fa05a5
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 25 09:31:39 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/5c988f0a9d1c8577c4bf2047dfe2c0ee63fa05a5 [^]
Related to ISSUE-43106: Java formatting changes
---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOh_InventoryStatusWithAWOEnabled.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOk_DeltaManagement.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/utils/AWOTestUtils.java
---
|
|
|
(0118081)
|
hgbot
|
2020-02-25 09:36
|
|
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations
Changeset: 46486971253b653ae0488b6780304bb80175266b
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 25 09:36:22 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations/rev/46486971253b653ae0488b6780304bb80175266b [^]
Related to ISSUE-43106. Fixes some automated test that were not
performing as expected:
* In AWOh_InventoryStatusWithAWOEnabled, ensure that the product
uses a newly created storage bin list, if not, problems
can happen with cloned products sharing existing bins
* In AWOk_DeltaManagement ensure that the newly created bins
belong to the same bin group and not to an existing one.
If not, the test was using negative stock were it should not
* Added utils to clone storage bin group lists
---
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOh_InventoryStatusWithAWOEnabled.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/test/AWOk_DeltaManagement.java
M src-test/org/openbravo/warehouse/advancedwarehouseoperations/utils/AWOTestUtils.java
---
|
|
|
(0118082)
|
hgbot
|
2020-02-25 09:38
|
|
Repository: erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.sampledata
Changeset: 53f43b4c6bb3279e39cead2693f8e728a49b5b5b
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Feb 25 09:37:53 2020 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.advancedwarehouseoperations.sampledata/rev/53f43b4c6bb3279e39cead2693f8e728a49b5b5b [^]
Related to ISSUE-43106. Updated negative stock of Bin to 0
and set bin status to not allow overissue.
---
M referencedata/sampledata/AWO_QA/AD_SEQUENCE.xml
M referencedata/sampledata/AWO_QA/M_INVENTORY.xml
M referencedata/sampledata/AWO_QA/M_INVENTORYLINE.xml
M referencedata/sampledata/AWO_QA/M_LOCATOR.xml
M referencedata/sampledata/AWO_QA/M_STORAGE_DETAIL.xml
M referencedata/sampledata/AWO_QA/M_TRANSACTION.xml
M referencedata/sampledata/AWO_QA/OBAWO_BATCHOFTASKS.xml
M referencedata/sampledata/AWO_QA/OBAWO_INVENTORYLIST.xml
M referencedata/sampledata/AWO_QA/OBAWO_INVENTORY_PROP.xml
M referencedata/sampledata/AWO_QA/OBAWO_INVPROP_LINE.xml
---
|
|
|
|
This issue has been updated to Design Defect, and it is not solved as of now.
The main problem is due to how difficult is to match the behavior of Reservations with Negative Stock.
In AWO, for every picking created, a Reservation is done against the picked stock, to ensure that in the Issue flow the same stock is used.
In Reservations, there is a constraint in Core that does not allow to take more stock than the reserved one (for the same Bin and Attributes). For example, if there is a reservation of 3 units, the stock can not go below 3 units.
With an Inventory Status flagged as OverIssue, it should be possible to go to Negative Stock for a particular Bin.
Therefore, the Inventory Status allows to take stock, even going into negative, for a Bin that has this configuration.
However, if there is a Reservation in place (that could have been created in the picking process), it won't be possible to complete the operation as Reservation has this validation.
As of now, this are the different scenarios that can happen:
- Negative Stock for Picking. It is not supported, AWO will not generate Tasks that proposes to go into negative stock
To do so, it will be necessary to change the Reservations validation, and to allow to have reservations against negative stock
- Negative Stock for Issue. It is supported. However, if there is a reservation in the same Bin (and attributes), it won't be possible to confirm the task until the reservation is released.
- Negatvie Stock for Issue after Picking. Same as above. The Task with the reservation must be confirmed first, then the task for the negative stock.
To fully solve this problem, it is necessary to adapt Reservations to be able to work with Negative Stock.
However, from a functional point of view, this will be at odds with the Reservations functionality, as the reserved stock could be stolen by another process that makes the stock go into negative.
|
|
|
|
Reopened and moved to Design Defect |
|