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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029539
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 04. Warehouse managementmajoralways2015-04-09 09:372015-05-07 22:16
ReporterdmiguelezView Statuspublic 
Assigned Todmiguelez 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revision75d5c06162cb
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029539: Issues in Reservations related to Reallocate Stock functionality

DescriptionThere is an issue in Reservations related to Reallocate Stock functionality.
In the Procedures M_RESERVATION_REALLOCATE and M_RESERVE_STOCK_AUTO there is a wrong call to the function M_GET_STOCK_PARAM.
There is a parameter that should send the Reservation_ID but it is sending a null value instead.

By fixing this issue, another one is raised.

Under some circumstances, it is possible to create a situation in which there is more reserved stock than available stock.

To reproduce this issue it is needed to create a situation like this:
Product ----- Lot ------ qtyonhand ----- reservedqty ----- allocatedqty
Test -------- 0001 ----- 10 ------------ 5 --------------- 0
Test -------- 0002 ----- 10 ------------ 10 -------------- 0

By generating a PickList for an Outbound Location, it will generate the issue:
Product ----- Lot ------ qtyonhand ----- reservedqty ----- allocatedqty
Test -------- 0001 ----- 10 ------------ 15 -------------- 10
Test -------- 0002 ----- 0 ------------- 0 --------------- 0
Steps To Reproduce1. Create new Product

  Go to Product Window and create a new record
     Organization: F&B US
     SearchKey: Test Product
     Name: Test Product
     Tax Category: Exempt
     Sale: Checked
     Product Type: Item
     Stocked: Checked
     Attribute Set: Lot
  Go to Price Tab and create a new record
    Price List Version: General Sales
    Unit Price: 10
    List Price: 10


2. Add Stock

  Go to Physical Inventory Window and create a new record
    Organization: F&B US
    Warehouse: US East Coast
  Go to Lines Tab and create a new record
    Product. Click on the magnifing glass. Click on the funnel icon. Filter Search Key by Test Product. Pick the record that has no Attribute defined
    Attribute Set Value: Create new one. 0001
    Storage Bin: EC-0-0-0
    Quantity Count: 10
  Click on Process Inventory Count

  Create another record in Physical Inventory Window
    Organization: F&B US
    Warehouse: US East Coast
  Go to Lines Tab and create a new record
    Product. Click on the magnifing glass. Click on the funnel icon. Filter Search Key by Test Product. Pick the record that has no Attribute defined
    Attribute Set Value: Create new one. 0002
    Storage Bin: EC-0-0-0
    Quantity Count: 10
  Click on Process Inventory Count


3. Create Sales Orders with Reservations

  Go to Sales Order Window and create a new record
    Organization: F&B US
    Business Partner: Healthy Food SuperMarkets
    Warehouse: US East Coast
    Invoice Terms: Immediate
  Go to Lines Tab and create a new record
    Product: Test Product
    Ordered Quantity: 5
  Go to Basic Discounts Tab and delete the existing record
  Book the Order
  Select the Sales Order Line and click on Manage Reservations button
  Select the Line with Attribute Set Value L0001 and set Quantity to 5 and click on Done

  Create another record in Sales Order Window
    Organization: F&B US
    Business Partner: Healthy Food SuperMarkets
    Warehouse: US East Coast
    Invoice Terms: Immediate
  Go to Lines Tab and create a new record
    Product: Test Product
    Ordered Quantity: 10
  Go to Basic Discounts Tab and delete the existing record
  Book the Order
  Select the Line and click on Manage Reservations button
  Select the Line with Attribute Set Value L0002 and set Quantity to 10 and click on Done


4. Check the data before moving forward

  This query can help, just replace productid with the m_product_id desired

    select l.value, sd.m_storage_detail_id, a.lot, a.m_attributesetinstance_id, qtyonhand, reservedqty, allocatedqty
    from m_storage_detail sd
      join m_locator l using (m_locator_id)
      join m_attributesetinstance a using (m_attributesetinstance_id)
    where m_product_id = productid
      and l.em_obwhs_type IS NULL OR l.em_obwhs_type <> 'OUT';

  It should return something like this

    Lot ------ qtyonhand ----- reservedqty ----- allocatedqty
    0001 ----- 10 ------------ 5 --------------- 0
    0002 ----- 10 ----------- 10 -------------- 0


5. Generate PickList

  Back in Sales Order Window, select the Sales Order that has 10 as the Ordered Quantity
  Click on the Generate PickList button and generate a PickList using Outbound Locator
  
  By launching the previous query it will return something like
    Lot ------ qtyonhand ----- reservedqty ----- allocatedqty
    0001 ----- 10 ------------ 15 -------------- 10
    0002 ----- 10 ------------ 0 --------------- 0

  Where it should be something like
    Lot ------ qtyonhand ----- reservedqty ----- allocatedqty
    0001 ----- 10 ------------ 10 -------------- 5
    0002 ----- 10 ------------ 5 --------------- 5
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0076441)
hgbot (developer)
2015-04-10 11:35

Repository: erp/devel/pi
Changeset: 75d5c06162cb62cec67041ee793db67f24060902
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Apr 10 15:04:11 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/75d5c06162cb62cec67041ee793db67f24060902 [^]

Fixes Issue 29539.
* Fixes wrong call to M_GET_STOCK_PARAM in two procedures
* Fixes problem with Stock Reallocation funcionality raised
  by fixing the wrong calls

---
M src-db/database/model/functions/M_GET_STOCK_PARAM.xml
M src-db/database/model/functions/M_RESERVATION_REALLOCATE.xml
M src-db/database/model/functions/M_RESERVE_STOCK_AUTO.xml
---
(0076902)
dmitry_mezentsev (developer)
2015-04-29 20:47

Not closed for 19 days!!!
(0076920)
Sandrahuguet (developer)
2015-04-30 18:07

Code review + testing OK
(0077114)
hudsonbot (developer)
2015-05-07 22:16

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

- Issue History
Date Modified Username Field Change
2015-04-09 09:37 dmiguelez New Issue
2015-04-09 09:37 dmiguelez Assigned To => dmiguelez
2015-04-09 09:37 dmiguelez Modules => Core
2015-04-09 09:37 dmiguelez Triggers an Emergency Pack => No
2015-04-09 09:38 dmiguelez Steps to Reproduce Updated View Revisions
2015-04-09 09:40 dmiguelez Steps to Reproduce Updated View Revisions
2015-04-09 09:42 dmiguelez Description Updated View Revisions
2015-04-09 09:46 dmiguelez Description Updated View Revisions
2015-04-09 09:46 dmiguelez Description Updated View Revisions
2015-04-09 09:49 dmiguelez Steps to Reproduce Updated View Revisions
2015-04-10 11:35 hgbot Checkin
2015-04-10 11:35 hgbot Note Added: 0076441
2015-04-10 11:35 hgbot Status new => resolved
2015-04-10 11:35 hgbot Resolution open => fixed
2015-04-10 11:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/75d5c06162cb62cec67041ee793db67f24060902 [^]
2015-04-22 09:22 dmitry_mezentsev Review Assigned To => eduardo_Argal
2015-04-29 20:47 dmitry_mezentsev Note Added: 0076902
2015-04-30 16:12 Sandrahuguet Review Assigned To eduardo_Argal => Sandrahuguet
2015-04-30 18:07 Sandrahuguet Note Added: 0076920
2015-04-30 18:07 Sandrahuguet Status resolved => closed
2015-04-30 18:07 Sandrahuguet Fixed in Version => 3.0PR15Q3
2015-05-07 22:16 hudsonbot Checkin
2015-05-07 22:16 hudsonbot Note Added: 0077114


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker