Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037191
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 04. Warehouse managementmajoralways2017-10-26 13:082017-11-03 13:16
ReporterngarciaView Statuspublic 
Assigned Todmiguelez 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionf16d24be3f02
ProjectionnoneETAnoneTarget Version3.0PR17Q4
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release3.0PR17Q2.3
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/f9f49f355698 [^]
Triggers an Emergency PackNo
Summary

0037191: Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock)

DescriptionNegative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock)
Steps To ReproduceAs 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
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0037168 closeddmiguelez Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock) 

-  Notes
(0100227)
hgbot (developer)
2017-11-02 18:20

Repository: erp/backports/3.0PR17Q4
Changeset: f16d24be3f02e6b47c90176bb771eadfb54d2df3
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.0PR17Q4/rev/f16d24be3f02e6b47c90176bb771eadfb54d2df3 [^]

Fixes Issue 37191. 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
---
(0100229)
hgbot (developer)
2017-11-02 18:20

Repository: erp/backports/3.0PR17Q4
Changeset: ca8b98cbf51c17cf6c00a2e39d8350dc279ac73f
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.0PR17Q4/rev/ca8b98cbf51c17cf6c00a2e39d8350dc279ac73f [^]

Related to Issue 37191.

* 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
---
(0100233)
dmiguelez (developer)
2017-11-02 18:22

Code Review + Testing Ok
(0100253)
dmiguelez (developer)
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
(0100255)
hgbot (developer)
2017-11-03 13:10

Repository: erp/backports/3.0PR17Q4
Changeset: 03c0d2e1b8b4d0df64a42836b10e08e031bae732
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.0PR17Q4/rev/03c0d2e1b8b4d0df64a42836b10e08e031bae732 [^]

Related to Issue 37191. 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
---
(0100257)
dmiguelez (developer)
2017-11-03 13:14

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
(0100261)
dmiguelez (developer)
2017-11-03 13:16

Fixed and tested Ok

- Issue History
Date Modified Username Field Change
2017-10-30 21:20 collazoandy4 Type defect => backport
2017-10-30 21:20 collazoandy4 Target Version => 3.0PR17Q4
2017-11-02 18:20 hgbot Checkin
2017-11-02 18:20 hgbot Note Added: 0100227
2017-11-02 18:20 hgbot Status scheduled => resolved
2017-11-02 18:20 hgbot Resolution open => fixed
2017-11-02 18:20 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR17Q4/rev/f16d24be3f02e6b47c90176bb771eadfb54d2df3 [^]
2017-11-02 18:20 hgbot Checkin
2017-11-02 18:20 hgbot Note Added: 0100229
2017-11-02 18:22 dmiguelez Fixed in Version => 3.0PR17Q4
2017-11-02 18:22 dmiguelez Review Assigned To => dmiguelez
2017-11-02 18:22 dmiguelez Note Added: 0100233
2017-11-02 18:22 dmiguelez Status resolved => closed
2017-11-03 13:03 dmiguelez Assigned To collazoandy4 => dmiguelez
2017-11-03 13:03 dmiguelez Note Added: 0100253
2017-11-03 13:03 dmiguelez Status closed => new
2017-11-03 13:03 dmiguelez Resolution fixed => open
2017-11-03 13:03 dmiguelez Fixed in Version 3.0PR17Q4 =>
2017-11-03 13:10 hgbot Checkin
2017-11-03 13:10 hgbot Note Added: 0100255
2017-11-03 13:12 dmiguelez Status new => scheduled
2017-11-03 13:12 dmiguelez Status scheduled => resolved
2017-11-03 13:12 dmiguelez Resolution open => fixed
2017-11-03 13:14 dmiguelez Note Added: 0100257
2017-11-03 13:16 dmiguelez Note Added: 0100261
2017-11-03 13:16 dmiguelez Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker