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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028051
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] 04. Warehouse managementmajoralways2014-11-03 08:372015-03-25 13:18
ReporterVictorVillarView Statuspublic 
Assigned Toumartirena 
PriorityurgentResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionb6c2ecaf7e1a
ProjectionnoneETAnoneTarget Version3.0PR15Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Tovmromanos
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028051: Reserved quantity is not correct under certain circumstancies

DescriptionReserved quantity is not correct under certain circumstancies.

Also, the behavior in Oracle differs from Postgres. In Oracle when opening Manage Stock P&E, it automatically creates and processes the reservation, even if the Done button is not clicked. This happens because in Oracle M_RESERVATION_POST stored procedure automatically commits against database, unlike in Postgres.
Steps To ReproduceReservations are disabled by default. To be able to use them please insert a new Preference using property Enable Stock Reservations with value Y.
http://wiki.openbravo.com/wiki/Stock_Reservation [^]

As group Admin role,
Go to Physical inventory and remove the stock for Cerveza Lager. Keep 700 units in Warehouse España Región Norte 0-0-0
Go to Sales Order window,
  Org: España
Lines:
 Cerveza Lager: qty: 900
 Stock Reservation: blank
Book it.
Once you select the line, you will see Manage Reservations button. Click on it, and indicate you would like to reserve 400 units. Click on Done.

Go to Stock reservation window.
Realize that the register created indicates 700 units, but the user said 400. That is wrong.

If you manage Stock again from the Stock Reservation window, and you indicate 400, now the register has the correct qty.

Also, test the following flow in Oracle:

Create a Sales Order with a line. Click on that line and press Manage Reservations.
 * Click on Cancel.
 * Go to Linked Items of that line and realize that a reservation has been created. This is wrong because we've selected cancel in the P&E. This happens because M_RESERVATION_POST commits, as explained in the description above.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0029218 closededuardo_Argal Cannot save a Stock Reservation in PostgreSQL 8.4 
related to defect 00280523.0PR15Q2 closedumartirena Wrong error message processing a Goods Shipment if you have a partial reservation 
related to defect 00285103.0PR15Q2 closedreinaldoguerra Manage Reservation P&E behavior could be confusing in some cases opened from Sales Order Line 
related to defect 00320783.0PR16Q2 closedaferraz Reserved quantity is not correct under certain circumstances 
related to defect 0032089 closedaferraz Product with stock in second UOM is automatically reserved but it is not possible to reserve it manually 

-  Notes
(0072773)
reinaldoguerra (developer)
2014-12-22 16:17
edited on: 2018-07-19 11:53

Test plan used:
1- Login into Openbravo ERP
2- Go to Preference window and and check that a new preference with property "Enable Stock Reservations" is created, if not then create a new record selecting Enable Stock Reservations property and setting Y as value.
3- Go to Product window and create a new one, organization España S.A
4- Go to price tab and and prices for Tarifa bebidas alegres and Tarifa de ventas price list versions
5- Go to Physical inventory window and register a new header for España Región Norte organization
6- Go to lines tab and add the created product. Select Rn-0-0-0 as Storage Bin and enter 700 as Quantity Count
7- Go to Sales Order window, create a new header also for for España Región Norte organization
8- Add a new line with created product, qty 900 and Stock Reservation: blank
9- Book it.
10- Once you select the line, you will see Manage Reservations button. Click on it, and indicate you would like to reserve 400 units. Click on Done.
11- Go to Stock reservation window.
12- Realise that the register created indicates Quantity = 900 Units and Reserved Qty = 400 units.

(0072873)
umartirena (reporter)
2014-12-30 10:47

After talking with Gorka, this is the intended behavior when a reservation is being processed (try to reserve as much as possible). The issue has been changed to design defect because in this concrete case the way it works could be confusing for the user, so something should be redesigned (hide be Pick%Edit button in OrderLines when the reservation is not processed, give a warning...)
(0074992)
umartirena (reporter)
2015-02-26 18:45

Finally the original issue is going to be fixed. The manage reservation process will reserve what the user specifies in the Pick & Execute. So, the related issue https://issues.openbravo.com/view.php?id=28510 [^] is going to be rejected.
(0075008)
hgbot (developer)
2015-02-27 08:17

Repository: erp/devel/pi
Changeset: b6c2ecaf7e1a8026f737b28649e3a61c6b450d59
Author: Unai Martirena <unai.martirena <at> openbravo.com>
Date: Thu Feb 26 19:48:36 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b6c2ecaf7e1a8026f737b28649e3a61c6b450d59 [^]

Fixes bug 28051: Reserved qty now is correct.

In this issue 3 changes have been done:
[1]: In M_RESERVATION_POST stored procedure, when calling to AD_UPDATE_PINSTANCE an extra parameter has been added ('N'). This has been done to avoid to do a commit when working with Oracle database, because it was causing to behave different in Postgres and Oracle.
[2]: In StockReservationPickAndEditDataSource, when opening Manage Reservations P&E from Sales Order, it retrieves a Reservation related to the Order Line if it exists and it processes. This was failing in Oracle if it was already processed, so a check has been added to avoid this case.
[3]: In ManageReservationActionHandler, when clicking Done in Manage Reservation P&E, it was first reserving what the user was typing in the P&E, and if it was not processed the reservation, it was processing it. As the M_RESERVATION_POST tries always to reserve as much as possible, it was overriding the previously set amounts. In order to prevent this, now first the reservation is being processed and after that the values typed in the UI are being set to the reservation.

---
M src-db/database/model/functions/M_RESERVATION_POST.xml
M src/org/openbravo/common/actionhandler/ManageReservationActionHandler.java
M src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java
---
(0075051)
hudsonbot (developer)
2015-02-27 16:11

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/7f9c56fa7aba [^]
Maturity status: Test
(0075523)
dmitry_mezentsev (developer)
2015-03-13 10:34

The following issue is resolved but not yet closed for 14 days.
(0075967)
vmromanos (manager)
2015-03-25 13:18

Code review + testing OK

- Issue History
Date Modified Username Field Change
2014-11-03 08:37 VictorVillar New Issue
2014-11-03 08:37 VictorVillar Assigned To => dmiguelez
2014-11-03 08:37 VictorVillar Modules => Core
2014-11-03 08:37 VictorVillar Resolution time => 1417647600
2014-11-03 08:37 VictorVillar Triggers an Emergency Pack => No
2014-11-03 11:13 VictorVillar Target Version => 3.0PR15Q1
2014-11-03 11:22 VictorVillar Relationship added related to 0028052
2014-12-13 20:32 reinaldoguerra Assigned To dmiguelez => reinaldoguerra
2014-12-13 20:32 reinaldoguerra Status new => scheduled
2014-12-22 16:17 reinaldoguerra Note Added: 0072773
2014-12-30 10:42 umartirena Type defect => design defect
2014-12-30 10:42 umartirena Target Version 3.0PR15Q1 =>
2014-12-30 10:47 umartirena Note Added: 0072873
2014-12-31 16:30 umartirena Relationship added related to 0028510
2015-02-26 18:45 umartirena Note Added: 0074992
2015-02-26 18:54 umartirena Description Updated View Revisions
2015-02-26 18:54 umartirena Steps to Reproduce Updated View Revisions
2015-02-26 19:21 umartirena Assigned To reinaldoguerra => umartirena
2015-02-26 19:22 umartirena Target Version => 3.0PR15Q2
2015-02-27 08:17 hgbot Checkin
2015-02-27 08:17 hgbot Note Added: 0075008
2015-02-27 08:17 hgbot Status scheduled => resolved
2015-02-27 08:17 hgbot Resolution open => fixed
2015-02-27 08:17 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b6c2ecaf7e1a8026f737b28649e3a61c6b450d59 [^]
2015-02-27 16:11 hudsonbot Checkin
2015-02-27 16:11 hudsonbot Note Added: 0075051
2015-03-13 10:34 dmitry_mezentsev Note Added: 0075523
2015-03-25 13:17 vmromanos Relationship added related to 0029218
2015-03-25 13:18 vmromanos Review Assigned To => vmromanos
2015-03-25 13:18 vmromanos Note Added: 0075967
2015-03-25 13:18 vmromanos Status resolved => closed
2016-02-01 17:14 aferraz Relationship added related to 0032078
2016-02-05 11:41 aferraz Relationship added related to 0032089
2018-07-19 11:53 AtulOpenbravo Note Edited: 0072773 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker