Openbravo Issue Tracking System - Modules
View Issue Details
0051214ModulesAdvanced Warehouse Operationspublic2022-12-20 17:122023-02-23 06:38
closedno change required 
0051214: [ERROR] - Perform IDO of a Product that has an attribute with Negative Stock
When trying to generate a distribution order issue for a product that is in stock with 2 different attributes, 1 contains positive stock and the other negative, if we want to issue the issue for the one with positive stock, an error that there is no stock is displayed.
1-In the same bin, have stock of a product with 2 different attributes, but 1 with positive stock and the other with negative stock.

2-We create a Distribution Order Issue to send a stocked unit to another warehouse.
It is processed correctly.

3-We proceed to create the Issue Distribution Order for the previous DO, and in the line, complete the product with the attribute that has positive stock, to make effective the Stock transfer from one Warehouse to another. When we want to generate it, we get the following error. "Error processing Goods Movement process. Insufficient stock: line 10"

Example images attached.
No tags attached.
png 1.png (148,030) 2022-12-20 17:13

png 2.png (116,599) 2022-12-20 17:13

png 3.png (112,222) 2022-12-20 17:13

png image.png (131,033) 2023-02-01 17:11
Issue History
2022-12-20 17:12axelmercadoNew Issue
2022-12-20 17:12axelmercadoAssigned To => Triage Omni WMS
2022-12-20 17:13axelmercadoFile Added: 1.png
2022-12-20 17:13axelmercadoFile Added: 2.png
2022-12-20 17:13axelmercadoFile Added: 3.png
2022-12-20 17:14axelmercadoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=25277#r25277
2022-12-20 17:17PracticsIssue Monitored: Practics
2022-12-21 12:40vmromanosAssigned ToTriage Omni WMS => AtulOpenbravo
2023-01-23 14:59ivazquezNote Added: 0145765
2023-01-30 11:23AtulOpenbravoStatusnew => scheduled
2023-01-30 17:01AtulOpenbravoNote Added: 0146051
2023-01-30 17:01AtulOpenbravoStatusscheduled => feedback
2023-02-01 17:11ivazquezNote Added: 0146138
2023-02-01 17:11ivazquezFile Added: image.png
2023-02-01 17:11ivazquezStatusfeedback => new
2023-02-02 10:12AtulOpenbravoNote Added: 0146154
2023-02-02 10:12AtulOpenbravoStatusnew => feedback
2023-02-02 10:14AtulOpenbravoNote Edited: 0146154bug_revision_view_page.php?bugnote_id=0146154#r25492
2023-02-10 17:14axelmercadoNote Added: 0146396
2023-02-10 17:15axelmercadoStatusfeedback => new
2023-02-10 17:16axelmercadoNote Edited: 0146396bug_revision_view_page.php?bugnote_id=0146396#r25528
2023-02-20 11:07AtulOpenbravoNote Added: 0146752
2023-02-20 11:07AtulOpenbravoStatusnew => feedback
2023-02-22 16:14axelmercadoNote Added: 0146887
2023-02-23 06:38AtulOpenbravoNote Added: 0146893
2023-02-23 06:38AtulOpenbravoStatusfeedback => closed
2023-02-23 06:38AtulOpenbravoResolutionopen => no change required

2023-01-23 14:59   
Dear Team,

Is any news related to this problem?

2023-01-30 17:01   
Unable to reproduce issue in local as well as livebuilds instance.
2023-02-01 17:11   
Hello Atul,

Maybe this new update from the customer regarding the problem can help you:

In the current situation, the customer is trying to make a "movement between warehouses" of hundreds of products between two stores but cannot process it due to the following error: Insufficient stock: line 330.
Where is the problem? The problem is in the function "m_check_stock" which checks for negative stock of a product in a particular slot, but WITHOUT FILTERING by attribute. The M_Movement_Post calls this function and it returns the error message.
As you can see in the image, the selected product has negative stock for the attribute "00000000" but has positive stock for the other two attributes, which are the 2 attributes that have been included in the "Movement between Warehouses" and the function "m_check_stock" instead of looking at the stock for those two attributes, is looking at it for all of them.
2023-02-02 10:12   
(edited on: 2023-02-02 10:14)
Please update the inventory status of storage bin to Over-issue as it has got negative stock for products. This should fix the issue.

Note: In case the storage bins having negative stock gets set with inventory status other than over-issue in some flow in the application, please report a new issue with steps to reproduce.

2023-02-10 17:14   
(edited on: 2023-02-10 17:16)
Hi Atul,

Attached is a message from the customer

We have updated the m_locator_id with the m_inventorystatus_id "0" (Undefined-OverIssue) and the ISSUE IS STILL PRESENT.

I understand that the steps remain the same

2023-02-20 11:07   
Hello Team,

We have checked in a call 3 examples. For the above scenario, locator having or allowing negative stock without over-issue inventory status should not be possible. However such bins (having negative stock for products) should be set with Inventory Status: Undefined - Over Issue using Change Status button in the Storage Bin header tab >> Inventory Status selector.

All the 3 examples documents were processed successfully with this solution.
2023-02-22 16:14   
Hi team,

Last response from the customer:
As planned, this morning we met with Atul and he explained to us how the "Flag" "Undefined-Overissue" works at the "Hole" level.

According to what we talked with him, if we want to manage Stock in negative, the "Hollows" must have the "Undefined-Overissue" flag enabled, otherwise the mentioned error occurs.

But we believe that there is still an inconsistency somewhere, because if the Flag is NOT enabled, the WebPOS should not allow to make a sale of a Product that it does not have. Or rather, it should leave that sale in EWI, waiting for someone to review it and enter that item into the system.
Currently, despite having the Flag set to NO, the product stays in negative and this is interfering with the rest of the movements of the product-gap...
2023-02-23 06:38   
It is not possible for Storage Bin to have negative stock for a product with Inventory Status as Undefined. In the client instance, as the storage bin holds negative stock for product, it's Inventory Status should be Undefined-OverIssue. After changing the inventory status from UI, the issue does not get reproduced, Hence it is closed.