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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037168
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2017-10-26 13:082018-01-08 18:20
ReporterngarciaView Statuspublic 
Assigned Todmiguelez 
PriorityimmediateResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revisiona3731e13318b
ProjectionnoneETAnoneTarget Version
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

0037168: 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 ]
depends on backport 00371913.0PR17Q4 closeddmiguelez Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock) 
depends on backport 00371923.0PR17Q3.1 closeddmiguelez Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock) 
depends on backport 00371933.0PR17Q2.4 closedcollazoandy4 Negative Stock can be obtained although the storage bin is defined as OverIssue = N (not allowing negative stock) 
caused by defect 0035009 closedcollazoandy4 in m_storage_detail, the organization should not be updated 
related to defect 0037201 closeddmiguelez It is not possible to remove negative stock if it exists in more than one warehouse of the same organization 

-  Notes
(0100145)
collazoandy4 (developer)
2017-10-30 14:02
edited on: 2017-10-30 21:24

Test Plan
  As F&B International Group Admin Role
    Create a new Product:
      Organization: F&B España, S.A
      Searck Key/Name: IssueProduct2
    Create a new Goods Receipt:
      Organization: F&B España - Región Norte
      Business Partner: Bebidas Alegres, S.L.
      Create a new Record in Lines tab:
        Product: IssueProduct2
        Movement Quantity: 3
        Storage Bin: Rn-0-0-0
      Process the receipt
    Check in Stock tab of Product quantity on Hand is 3 in Storage Bin Rn-0-0-0
    Create a new Goods Movement:
      Organization: F&B España, S.A
      Create a new record on Lines tab:
        Product: IssueProduct2
        Movement Quantity: 4
        Storage Bin: Rn-0-0-0
        New Storage Bin: Rs-0-0-0
      Process the Movement and check the error message 'Insufficient stock: line 10' is shown
    Create a new Goods Shipment:
      Organization: F&B España, S.A
      Business Partner: Alimentos y Supermercados, S.A
      Create a new record on Lines tab:
        Product: IssueProduct2
        Movement Quantity: 4
        Storage Bin: Rn-0-0-0
      Process the Movement and check the error message 'Insufficient stock: line 10, Product IssueProduct2' is shown

(0100222)
hgbot (developer)
2017-11-02 17:39

Repository: erp/devel/pi
Changeset: a3731e13318b9bbdf5f3dafda2b9c5ea6a5b6215
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 02 11:43:07 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a3731e13318b9bbdf5f3dafda2b9c5ea6a5b6215 [^]

Fixes Issue 37168, 37201. 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
---
(0100223)
hgbot (developer)
2017-11-02 17:39

Repository: erp/devel/pi
Changeset: e0ae38b3f82bf6747ddaa0587c25839ef1d430c0
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 02 13:02:26 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e0ae38b3f82bf6747ddaa0587c25839ef1d430c0 [^]

Related to Issue 37168, 37201.

* 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
---
(0100224)
hgbot (developer)
2017-11-02 17:43

Repository: erp/devel/api-checks
Changeset: 3209e5b574d5b58a13f37362d8ffc20451cd6171
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 02 17:43:27 2017 +0100
URL: http://code.openbravo.com/erp/devel/api-checks/rev/3209e5b574d5b58a13f37362d8ffc20451cd6171 [^]

Related to Issue 37168, 37201. Modified function to fix false positive
API Change

M_CHECK_STOCK function adds an optional extra parameter, so the API is not broken
but API-Checks must be updated

---
M model/src-db/database/model/functions/MA_WORKEFFORT_VALIDATE.xml
M model/src-db/database/model/functions/M_CHECK_STOCK.xml
M model/src-db/database/model/functions/M_INOUT_POST.xml
M model/src-db/database/model/functions/M_INTERNAL_CONSUMPTION_POST1.xml
M model/src-db/database/model/functions/M_INVENTORY_POST.xml
M model/src-db/database/model/functions/M_MOVEMENT_POST.xml
M model/src-db/database/model/functions/M_PRODUCTION_RUN.xml
---
(0100235)
dmiguelez (developer)
2017-11-02 18:23

Code Review + Testing Ok
(0100250)
dmiguelez (developer)
2017-11-03 13:02

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
(0100254)
hgbot (developer)
2017-11-03 13:08

Repository: erp/devel/pi
Changeset: c9502a2c37ba5157f8ac365c2b351caf1a3d718a
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Nov 03 13:06:57 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c9502a2c37ba5157f8ac365c2b351caf1a3d718a [^]

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

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

Fixed and tested Ok
(0101367)
hudsonbot (developer)
2018-01-03 12:38

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/c81e0d3cbab5 [^]
Maturity status: Test
(0101368)
hudsonbot (developer)
2018-01-03 12:38

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/c81e0d3cbab5 [^]
Maturity status: Test
(0101370)
hudsonbot (developer)
2018-01-03 12:38

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/c81e0d3cbab5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-10-26 13:08 ngarcia New Issue
2017-10-26 13:08 ngarcia Assigned To => Triage Finance
2017-10-26 13:08 ngarcia Modules => Core
2017-10-26 13:08 ngarcia Triggers an Emergency Pack => No
2017-10-26 13:12 ngarcia Priority urgent => immediate
2017-10-26 13:15 ngarcia Issue Monitored: networkb
2017-10-26 13:20 eugeni Issue Monitored: eugeni
2017-10-26 15:32 VictorVillar Issue Monitored: VictorVillar
2017-10-26 16:58 collazoandy4 Assigned To Triage Finance => collazoandy4
2017-10-26 16:59 collazoandy4 Status new => scheduled
2017-10-30 14:02 collazoandy4 Note Added: 0100145
2017-10-30 16:10 collazoandy4 Regression introduced in release => 3.0PR17Q2.3
2017-10-30 16:10 collazoandy4 Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/f9f49f355698 [^]
2017-10-30 16:14 collazoandy4 Relationship added caused by 0035009
2017-10-30 21:19 collazoandy4 Status scheduled => acknowledged
2017-10-30 21:20 collazoandy4 Status acknowledged => scheduled
2017-10-30 21:24 collazoandy4 Note Edited: 0100145 View Revisions
2017-11-02 13:08 dmiguelez Relationship added related to 0037201
2017-11-02 17:39 hgbot Checkin
2017-11-02 17:39 hgbot Note Added: 0100222
2017-11-02 17:39 hgbot Status scheduled => resolved
2017-11-02 17:39 hgbot Resolution open => fixed
2017-11-02 17:39 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a3731e13318b9bbdf5f3dafda2b9c5ea6a5b6215 [^]
2017-11-02 17:39 hgbot Checkin
2017-11-02 17:39 hgbot Note Added: 0100223
2017-11-02 17:43 hgbot Checkin
2017-11-02 17:43 hgbot Note Added: 0100224
2017-11-02 18:23 dmiguelez Review Assigned To => dmiguelez
2017-11-02 18:23 dmiguelez Note Added: 0100235
2017-11-02 18:23 dmiguelez Status resolved => closed
2017-11-03 12:57 dmiguelez Note Added: 0100248
2017-11-03 13:01 dmiguelez Note Deleted: 0100248
2017-11-03 13:02 dmiguelez Assigned To collazoandy4 => dmiguelez
2017-11-03 13:02 dmiguelez Note Added: 0100250
2017-11-03 13:02 dmiguelez Status closed => new
2017-11-03 13:02 dmiguelez Resolution fixed => open
2017-11-03 13:08 hgbot Checkin
2017-11-03 13:08 hgbot Note Added: 0100254
2017-11-03 13:10 dmiguelez Status new => scheduled
2017-11-03 13:10 dmiguelez Status scheduled => resolved
2017-11-03 13:10 dmiguelez Resolution open => fixed
2017-11-03 13:13 dmiguelez Note Added: 0100256
2017-11-03 13:16 dmiguelez Note Added: 0100262
2017-11-03 13:16 dmiguelez Status resolved => closed
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101367
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101368
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101370
2018-01-08 18:20 dmiguelez Fixed in Version => 3.0PR18Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker