Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037192Openbravo ERP04. Warehouse managementpublic2017-10-26 13:082017-11-03 13:16
ngarcia 
dmiguelez 
immediatemajoralways
closedfixed 
5
 
3.0PR17Q3.1 
dmiguelez
Core
3.0PR17Q2.3
https://code.openbravo.com/erp/devel/pi/rev/f9f49f355698 [^]
No
0037192: Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock)
Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock)
As group admin role:
   Check all the storage bins for Region Norte and Region Sur warehouses have a status that do not allow overissue
   Create a new product for F&B España, S.A
   Set it as Purchase, Sale and Stocked
   Add a purchase price list to it
   Create a purchase order for F&B España - Región Norte and add two units of the product
   Create the related goods receipt
   Create a goods movement for F&B España, S.A and select the stock of Region Norte warehouse
   Increase the Movement Quantity from 2 to 3
   Move it to a storage bin in Region Sur warehouse
   Check you can process the document and you should not
   Create a Goods Shipment F&B España - Región Sur
   Select the stock of Region Sur warehouse
   Increase the Movement Quantity from 3 to 4
   Check you can process the document and you should not
   Launch the stock report and check the stock of the product is -1 in each warehouse
No tags attached.
blocks defect 0037168 closed dmiguelez Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock) 
Issue History
2017-10-30 21:20collazoandy4Typedefect => backport
2017-10-30 21:20collazoandy4Target Version => 3.0PR17Q3.1
2017-11-02 18:20hgbotCheckin
2017-11-02 18:20hgbotNote Added: 0100226
2017-11-02 18:20hgbotStatusscheduled => resolved
2017-11-02 18:20hgbotResolutionopen => fixed
2017-11-02 18:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q3.1/rev/eca62632fcbc9e62a53670996769b164ae38ad1e [^]
2017-11-02 18:20hgbotCheckin
2017-11-02 18:20hgbotNote Added: 0100228
2017-11-02 18:22dmiguelezFixed in Version => 3.0PR17Q3.1
2017-11-02 18:22dmiguelezReview Assigned To => dmiguelez
2017-11-02 18:22dmiguelezNote Added: 0100232
2017-11-02 18:22dmiguelezStatusresolved => closed
2017-11-03 13:03dmiguelezAssigned Tocollazoandy4 => dmiguelez
2017-11-03 13:03dmiguelezNote Added: 0100252
2017-11-03 13:03dmiguelezStatusclosed => new
2017-11-03 13:03dmiguelezResolutionfixed => open
2017-11-03 13:03dmiguelezFixed in Version3.0PR17Q3.1 =>
2017-11-03 13:15hgbotCheckin
2017-11-03 13:15hgbotNote Added: 0100258
2017-11-03 13:15dmiguelezStatusnew => scheduled
2017-11-03 13:15dmiguelezStatusscheduled => resolved
2017-11-03 13:15dmiguelezResolutionopen => fixed
2017-11-03 13:15dmiguelezNote Added: 0100259
2017-11-03 13:16dmiguelezNote Added: 0100260
2017-11-03 13:16dmiguelezStatusresolved => closed

Notes
(0100226)
hgbot   
2017-11-02 18:20   
Repository: erp/backports/3.0PR17Q3.1
Changeset: eca62632fcbc9e62a53670996769b164ae38ad1e
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 02 11:43:07 2017 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR17Q3.1/rev/eca62632fcbc9e62a53670996769b164ae38ad1e [^]

Fixes Issue 37192. Fixes problem when checking negative
Stock in the system.

* Function m_check_stock filters records by the natural tree of the selected
  Organization instead of the Organization itself. This is done due to the
  fact that the Organization of the Storage Detail might not be the
  same as the Organization of the Bin
* Function m_check_stock has an additional optional parameter, locator_id
  This is done to filter the records just by the selected bin
* All PL's of Core that calls the m_check_stock has been adapted to support
  the extra parameter

---
M src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
M src-db/database/model/functions/M_CHECK_STOCK.xml
M src-db/database/model/functions/M_INOUT_POST.xml
M src-db/database/model/functions/M_INTERNAL_CONSUMPTION_POST1.xml
M src-db/database/model/functions/M_INVENTORY_POST.xml
M src-db/database/model/functions/M_MOVEMENT_POST.xml
M src-db/database/model/functions/M_PRODUCTION_RUN.xml
---
(0100228)
hgbot   
2017-11-02 18:20   
Repository: erp/backports/3.0PR17Q3.1
Changeset: 9e5f644e6c3554cce5995ec476b87bd6d7246754
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 02 13:02:26 2017 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR17Q3.1/rev/9e5f644e6c3554cce5995ec476b87bd6d7246754 [^]

Related to Issue 37192.

* Fixes check stock method in InventoryCountProcess
* When completing a Goods Movement, do not check stock for Bin To
  - It has been checked that only negative stock can be moved to that bin
    if the Inventory Status allows over issue
  - If it has already negative stock previously, do not check it here

---
M src-db/database/model/functions/M_MOVEMENT_POST.xml
M src/org/openbravo/materialmgmt/InventoryCountProcess.java
---
(0100232)
dmiguelez   
2017-11-02 18:22   
Code Review + Testing Ok
(0100252)
dmiguelez   
2017-11-03 13:03   
Reopened as this scenario was not working properly:

   As group admin role:
   Create a new Warehouse for F&B España, S.A.
   Create a new bin for this Warehouse and set an Inventory Status that does not allow OverIssue
   Create a new product for F&B España, S.A
   Set it as Purchase, Sale and Stocked
   Add a purchase price list to it
   Create a Goods Receipt for España Región Norte for the Warehouse created previously and this Product for 5 Units
   (Additionally: In Database, check that the Storage Detail record has been created with España Región Norte Organization)
   Create a Goods Shipment F&B España - Región Sur for the Warehouse created previously and this Product for 10 Units
   Check you can process the Document, but that should not be possible due to not allowing negative stock
(0100258)
hgbot   
2017-11-03 13:15   
Repository: erp/backports/3.0PR17Q3.1
Changeset: 203d357fd56493af4b226af30e41f2b63d6f2b77
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Nov 03 13:06:57 2017 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR17Q3.1/rev/203d357fd56493af4b226af30e41f2b63d6f2b77 [^]

Related to Issue 37192. Removes Organization filter.

* Filtering by the Natural Tree of the Organization of the Storage Detail
  was not correct, since the Organization given to this function by the
  Transaction might not be included in it.
* Since there is a Parameter to filter by Locator, it is not needed
  to filter also by Organization (is implicit)
* This Paramter is optional in order to not break the API, but it is
  highly recommemded that it is always filled.

---
M src-db/database/model/functions/M_CHECK_STOCK.xml
---
(0100259)
dmiguelez   
2017-11-03 13:15   
Test Plan:

   As group admin role:
   Create a new Warehouse for F&B España, S.A.
   Create a new bin for this Warehouse and set an Inventory Status that does not allow OverIssue
   Create a new product for F&B España, S.A
   Set it as Purchase, Sale and Stocked
   Add a purchase price list to it
   Create a Goods Receipt for España Región Norte for the Warehouse created previously and this Product for 5 Units
   (Additionally: In Database, check that the Storage Detail record has been created with España Región Norte Organization)
   Create a Goods Shipment F&B España - Región Sur for the Warehouse created previously and this Product for 10 Units
   Check you can not process the Document because it does not allow to have negative Stock
(0100260)
dmiguelez   
2017-11-03 13:16   
Fixed and tested Ok