Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032098Openbravo ERP04. Warehouse managementpublic2016-02-01 17:132016-02-11 11:02
aferraz 
aferraz 
normalmajoralways
closedfixed 
5
 
3.0PR16Q1 
dmiguelez
Core
Packaging and release
2015-12-04
main
https://code.openbravo.com/erp/devel/pi/rev/e32a6dfe59e6 [^]
No
0032098: Reserved quantity is not correct under certain circumstances
Reserved quantity is not correct under certain circumstances.
Reservations 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.
No tags attached.
blocks defect 00320783.0PR16Q2 closed aferraz Reserved quantity is not correct under certain circumstances 
Issue History
2016-02-02 17:14aferrazTypedefect => backport
2016-02-02 17:14aferrazTarget Version3.0PR16Q2 => 3.0PR16Q1
2016-02-05 13:34hgbotCheckin
2016-02-05 13:34hgbotNote Added: 0083968
2016-02-05 13:34hgbotStatusscheduled => resolved
2016-02-05 13:34hgbotResolutionopen => fixed
2016-02-05 13:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/d5d1e92037f8d8d90c34193bcda955a091bd742d [^]
2016-02-05 13:34dmiguelezReview Assigned To => dmiguelez
2016-02-05 13:34dmiguelezNote Added: 0083969
2016-02-05 13:34dmiguelezStatusresolved => closed
2016-02-11 11:02aferrazAssigned ToTriage Finance => aferraz

Notes
(0083968)
hgbot   
2016-02-05 13:34   
Repository: erp/backports/3.0PR16Q1
Changeset: d5d1e92037f8d8d90c34193bcda955a091bd742d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Feb 05 11:37:39 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/d5d1e92037f8d8d90c34193bcda955a091bd742d [^]

Fixes issue 32098: Reserved quantity is not correct

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.
In case no stock reservation is created by m_reservation_post when processing the reservation, res_status will be Draft. To be sure reservation is set as completed, force status after call ReservationUtils.processReserve method.
Reservation will only be kept as draft in case it has no lines after execute manageReservedStockLines.

---
M src/org/openbravo/common/actionhandler/ManageReservationActionHandler.java
---
(0083969)
dmiguelez   
2016-02-05 13:34   
Code Review + Testing Ok