Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035958Openbravo ERP04. Warehouse managementpublic2017-05-09 11:402017-05-30 20:59
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Core
No
0035958: Reactivating a sales order and decreasing the ordered quantity that is already reserved causes wrong reservation
Reactivating a sales order and decreasing the ordered quantity that is already reserved causes wrong reservation
As group admin role:
   Set the Enable Stock Reservations preference to Y
   Log out and log in
   Create a Sales Order
   Add 12 units of a product with stock, set the Stock Reservation as Automatic and complete the sales order
   Check a reservation has been correctly created
   Reactivate the order, change the ordered quantity to 6 and complete it
   Check the reservation has been updated to:
      Quantity: 6
      Reserved Qty: 0
      Status: Closed
   Reactivate the order, change the ordered quantity to 3 and complete it
   Click on Manage Reservation and reserve 3 units
   Check the reservation has been updated to:
      Quantity: 6
      Reserved Qty: 3
      Status: Closed
No tags attached.
related to defect 0033912 scheduled collazoandy4 Automatic Stock Reservation does not work if an order set as Manual is reactivated and then changed to Automatic. 
related to defect 0035270 closed collazoandy4 Wrong reservation when closing a sales order with a voided partial shipment 
related to defect 00269593.0PR14Q4 closed AtulOpenbravo Wrong Reservation status under some circumstances 
causes defect 0038799 closed AtulOpenbravo More quantity reserved than available after booking a reopened sales order with more ordered quantity 
Issue History
2017-05-09 11:40ngarciaNew Issue
2017-05-09 11:40ngarciaAssigned To => Triage Finance
2017-05-09 11:40ngarciaModules => Core
2017-05-09 11:40ngarciaResolution time => 1496095200
2017-05-09 11:40ngarciaTriggers an Emergency Pack => No
2017-05-09 11:40ngarciaIssue Monitored: networkb
2017-05-09 11:41ngarciaRelationship addedrelated to 0033912
2017-05-10 16:47aferrazAssigned ToTriage Finance => collazoandy4
2017-05-17 17:40collazoandy4Statusnew => scheduled
2017-05-23 19:07collazoandy4Note Added: 0096736
2017-05-23 22:32collazoandy4Note Edited: 0096736bug_revision_view_page.php?bugnote_id=0096736#r15204
2017-05-24 20:05collazoandy4Relationship addedrelated to 0035270
2017-05-29 17:22aferrazRelationship addedrelated to 0026959
2017-05-30 10:08hgbotCheckin
2017-05-30 10:08hgbotNote Added: 0097001
2017-05-30 10:08hgbotStatusscheduled => resolved
2017-05-30 10:08hgbotResolutionopen => fixed
2017-05-30 10:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0e29b93a2d41205b1309cd6fde9f86cabbb47e91 [^]
2017-05-30 10:09aferrazReview Assigned To => aferraz
2017-05-30 10:09aferrazNote Added: 0097003
2017-05-30 10:09aferrazStatusresolved => closed
2017-05-30 10:09aferrazFixed in Version => 3.0PR17Q3
2017-05-30 20:59hudsonbotCheckin
2017-05-30 20:59hudsonbotNote Added: 0097036
2018-07-14 12:26dmitry_mezentsevRelationship addedcauses 0038799

Notes
(0096736)
collazoandy4   
2017-05-23 19:07   
(edited on: 2017-05-23 22:32)
As group admin role:
   Go to Preference window and create a new record:
     Property: Enable Stock Reservations
     Value: Y
   Log out and log in
   Go to Sales Order window and create a new record:
     Business Partner: Alimentos y Supermercados, S.A
     Create a new record in Lines tab:
       Product: Zumo de Piña 0,5L
       Ordered Quantity: 15
       Stock Reservation: Automatic
     Complete the order
   Go to Stock reservation window and check that a new reservation has been created:
     Product: Zumo de Piña 0,5L
     Quantity / Reserved Qty: 15
     Released: 0
     Status: Completed
     Stock line with:
       Quantity: 15
       Released: 0
   Reactivate the previous order created and change the ordered quantity to 10 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 10
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 10
       Released: 0
   Reactivate the order, change the ordered quantity to 5 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 5
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 5
       Released: 0
   Click on Manage Reservation and reserve 3 units
   Check the reservation has been updated to:
      Quantity: 5
      Reserved Qty: 3
      Status: Completed
      Stock line with:
       Quantity: 3
       Released: 0
   Reactivate the previous order created and change the ordered quantity to 1 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 1
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 1
       Released: 0
   Reactivate the previous order created and change the ordered quantity to 15 and complete it
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 15
      Released: 0
      Status: Completed
      Stock line with:
       Quantity: 15
       Released: 0
   Go to Goods Shipment window and create a new record:
     Business Partner: Alimentos y Supermercados, S.A
     Clic on Create Lines From button and select the previous order created
       Edit the line movement quantity to 5
     Complete the Shipment
   Check the reservation has been updated to:
      Quantity / Reserved Qty: 15
      Released: 5
      Status: Completed
      Stock line with:
       Quantity: 15
       Released: 5
   Reactivate the previous order created and change the ordered quantity to 3
   Check the error "Saving failed. Cannot modify an order line that has deliveries or invoices" is shown when saving the line
   Cancel the edit and complete the order
   Close the order and check the reservation has been updated to:
      Quantity / Reserved Qty / Released: 5
      Status: Closed
      Stock line with:
       Quantity: 5
       Released: 5

(0097001)
hgbot   
2017-05-30 10:08   
Repository: erp/devel/pi
Changeset: 0e29b93a2d41205b1309cd6fde9f86cabbb47e91
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue May 23 10:49:51 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/0e29b93a2d41205b1309cd6fde9f86cabbb47e91 [^]

Fixes issue 35958: Wrong reservation when reactivating a sales order

When completing an order wich already has a reservation, the stock reservation
was updated causing a wrong reservation. Now the update of stock reservation is
made only if the order is not completed.

---
M src-db/database/model/functions/C_ORDER_POST1.xml
---
(0097003)
aferraz   
2017-05-30 10:09   
Code review + Testing OK
(0097036)
hudsonbot   
2017-05-30 20:59   
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/b1bab5011974 [^]
Maturity status: Test