Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031799Openbravo ERP04. Warehouse managementpublic2015-12-30 13:282016-04-08 10:59
ngarcia 
aferraz 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q2 
dmiguelez
Core
Production - QA Approved
2015-06-22
3.0PR15Q4
https://code.openbravo.com/erp/devel/pi/rev/e03c1808e1952c20ef838c8a8b976cff802d5156 [^]
No
0031799: Cannot void a goods shipment if it has more than one closed reservation associated
Cannot void a goods shipment if it has more than one closed reservation associated
As group admin role:
   Set the Enable Stock Reservations preference to Y
   Log out and log in
   Create a Sales Order, add two products with stock to it and book it
   Select each lines and create a reservation for them (Manage Reservations)
   Go to Goods Shipment window, create a header and select the previously created sales order lines and complete it
   Check the two Stock Reservation status is updated to Closed
   Try to void the Goods Shipment and check the following error message is raised:
      Internal Error: Duplicate primary key/uuid. Your record has not been saved into the table Stock Reservation
In the M_INOUT_POST database function, more than one record is being inserted in the M_RESERVATION table with the same m_reservation_id (v_uuid)
No tags attached.
depends on backport 00318123.0PR16Q1 closed aferraz Cannot void a goods shipment if it has more than one closed reservation associated 
depends on backport 00318133.0PR15Q4.2 closed aferraz Cannot void a goods shipment if it has more than one closed reservation associated 
caused by defect 0028645 closed vmromanos It would be nice to be able to reserve more qty than the qty of the order if you have defined the 'is qty variable' 
related to defect 00318763.0PR16Q2 closed aferraz Cannot void a goods shipment if two lines are related with the same sales order line which is reserved and released 
related to defect 00319023.0PR16Q2 closed aferraz Cannot void a goods shipment if it has related reservation and there is less stock than double of shipment quantity 
related to defect 00319563.0PR16Q2 closed aferraz Cannot void a goods shipment if it has related reservation under some circumstances 
related to defect 0033752 closed markmm82 Cannot close an order if the stock was reserved and the associated goods shipment is voided 
Issue History
2015-12-30 13:28ngarciaNew Issue
2015-12-30 13:28ngarciaAssigned To => Triage Finance
2015-12-30 13:28ngarciaModules => Core
2015-12-30 13:28ngarciaResolution time => 1454281200
2015-12-30 13:28ngarciaRegression level => Production - QA Approved
2015-12-30 13:28ngarciaTriggers an Emergency Pack => No
2015-12-30 13:29ngarciaRelationship addedcaused by 0028645
2015-12-30 13:30ngarciaIssue Monitored: networkb
2015-12-31 13:40vmromanosRegression date => 2015-06-22
2015-12-31 13:40vmromanosRegression introduced in release => 3.0PR15Q4
2015-12-31 13:40vmromanosRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/e03c1808e1952c20ef838c8a8b976cff802d5156 [^]
2016-01-04 10:40aferrazAssigned ToTriage Finance => aferraz
2016-01-04 11:28aferrazStatusnew => scheduled
2016-01-04 18:58aferrazNote Added: 0083125
2016-01-04 19:07aferrazNote Added: 0083126
2016-01-04 19:08aferrazNote Edited: 0083125bug_revision_view_page.php?bugnote_id=0083125#r10575
2016-01-05 09:57aferrazTarget Version => 3.0PR16Q2
2016-01-07 16:34hgbotCheckin
2016-01-07 16:34hgbotNote Added: 0083159
2016-01-07 16:34hgbotStatusscheduled => resolved
2016-01-07 16:34hgbotResolutionopen => fixed
2016-01-07 16:34hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d37423058aab4f4623e72306a206874ecc687454 [^]
2016-01-07 17:51dmiguelezReview Assigned To => dmiguelez
2016-01-07 17:51dmiguelezNote Added: 0083170
2016-01-07 17:51dmiguelezStatusresolved => closed
2016-01-13 18:56ngarciaRelationship addedrelated to 0031876
2016-01-15 14:50aferrazRelationship addedrelated to 0031902
2016-01-19 18:16aferrazRelationship addedrelated to 0031956
2016-02-19 11:49aferrazNote Edited: 0083125bug_revision_view_page.php?bugnote_id=0083125#r11177
2016-02-19 11:49aferrazNote Edited: 0083126bug_revision_view_page.php?bugnote_id=0083126#r11179
2016-03-17 10:53hudsonbotCheckin
2016-03-17 10:53hudsonbotNote Added: 0085025
2016-04-08 10:59hgbotCheckin
2016-04-08 10:59hgbotNote Added: 0085517
2016-08-20 21:53aferrazRelationship addedrelated to 0033752

Notes
(0083125)
aferraz   
2016-01-04 18:58   
(edited on: 2016-02-19 11:49)
Test plan I: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-9996 [^]

As F&B Admin:

- Set the Enable Stock Reservations preference to 'Y'.
- Log out and log in.

- Create a Sales Order, add two products with stock and Isquantityvariable = 'N'. Book it.
  Realize header and lines reservation status is "Not Reserved".

- Select first line and create a reservation with the same quantity as ordered quantity.
  Realize line reservation status is set to "Completely Reserved".
  Realize header reservation status is set to "Partially Reserved".

- Select second line and create a reservation with the same quantity as ordered quantity.
  Realize line reservation status is set to "Completely Reserved".
  Realize header reservation status is set to "Completely Reserved".

- Check in Stock Reservation window, two related reservations are created with "Completed" status.

- Go to Goods Shipment window, create a header and select the previously created sales order lines. Complete it.
  Realize sales order header and lines reservation status is still "Completely Reserved".

- Check in Stock Reservation window, two related reservations are updated to "Closed" status.

- Void created Goods Shipment.
  Check process finishes successfully.
  Realize sales order header and lines reservation status is still "Completely Reserved".

- Check in Stock Reservation window, two new reservations are created, related to the same sales order lines as previous ones, with "Completed" status.

(0083126)
aferraz   
2016-01-04 19:07   
(edited on: 2016-02-19 11:49)
Test plan II: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-9997 [^]

As F&B Admin:

- Set the Enable Stock Reservations preference to 'Y'.
- Log out and log in.

- Create a Sales Order for "Alimentos y Supermercados, S.A" business partner. Add a line with a product with stock and Isquantityvariable = 'Y'. Book it.
  Realize header and line reservation status is "Not Reserved".
  Realize a second line with "Descuento 10%" product is added.

- Add a reservation for the first line with less quantity as ordered quantity.
  Realize both header and line reservation status is set to "Partially Reserved".

- Update reservation with same quantity as ordered quantity.
  Realize both header and line reservation status is set to "Completely Reserved".

- Update reservation with more quantity as ordered quantity.
  Realize both header and line reservation status is set to "Completely Reserved".

(0083159)
hgbot   
2016-01-07 16:34   
Repository: erp/devel/pi
Changeset: d37423058aab4f4623e72306a206874ecc687454
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Jan 04 19:14:21 2016 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d37423058aab4f4623e72306a206874ecc687454 [^]

Fixes issue 31799: Cannot void GoodsShipment if it has reservation associated

Generate uuid inside the loop to avoid create more than one M_Reservation with the same M_Reservation_ID in M_INOUT_POST.
Format code properly ("Add a reservation stock with the ordered quantity" section) in M_INOUT_POST.
Remove duplicated variable v_reservedqty in M_RESERVATION_POST to avoid set wrong Reservation Status to Order Line.
Take into account only Order Lines with qtyordered > 0 and with product of stocked and item type when setting Reservation Status to Order in M_RESERVATION_POST.
Set "Completely Reserved" reservation status to Order Line also when reservedqty > quantity in M_RESERVATION_POST and M_RESERVATION_TRG.

---
M src-db/database/model/functions/M_INOUT_POST.xml
M src-db/database/model/functions/M_RESERVATION_POST.xml
M src-db/database/model/triggers/M_RESERVATION_TRG.xml
---
(0083170)
dmiguelez   
2016-01-07 17:51   
Code Review + Testing Ok
(0085025)
hudsonbot   
2016-03-17 10:53   
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/b22fb0500156 [^]
Maturity status: Test
(0085517)
hgbot   
2016-04-08 10:59   
Repository: tools/automation/int
Changeset: 0353534d90f0bdc8a24e759edc366eccb86c9d91
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Tue Feb 23 10:59:01 2016 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/0353534d90f0bdc8a24e759edc366eccb86c9d91 [^]

Related to issue 31799: Add an automated test

---
M src-test/com/openbravo/test/integration/erp/data/generalsetup/application/preference/PreferenceData.java
M src-test/com/openbravo/test/integration/erp/data/procurement/transactions/goodsreceipt/GoodsReceiptLinesData.java
M src-test/com/openbravo/test/integration/erp/data/sales/transactions/salesorder/SalesOrderHeaderData.java
M src-test/com/openbravo/test/integration/erp/data/sales/transactions/salesorder/SalesOrderLinesData.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesorder/LinesTab.java
M src-test/com/openbravo/test/integration/erp/modules/client/application/gui/FormInputFieldFactory.java
M src-test/com/openbravo/test/integration/erp/modules/client/application/gui/pickandexecute/PickAndExecuteWindow.java
M src-test/com/openbravo/test/integration/erp/modules/client/application/navigationbarcomponents/gui/Menu.java
M src-test/com/openbravo/test/integration/erp/testscripts/sales/transactions/SalesOrder.java
A src-test/com/openbravo/test/integration/erp/data/warehouse/transactions/stockreservation/ReservationData.java
A src-test/com/openbravo/test/integration/erp/data/warehouse/transactions/stockreservation/StockData.java
A src-test/com/openbravo/test/integration/erp/gui/general/application/preference/PreferenceTab.java
A src-test/com/openbravo/test/integration/erp/gui/general/application/preference/PreferenceWindow.java
A src-test/com/openbravo/test/integration/erp/gui/warehouse/transactions/stockreservation/ReservationTab.java
A src-test/com/openbravo/test/integration/erp/gui/warehouse/transactions/stockreservation/StockReservationWindow.java
A src-test/com/openbravo/test/integration/erp/gui/warehouse/transactions/stockreservation/StockTab.java
A src-test/com/openbravo/test/integration/erp/modules/client/application/gui/searchitems/OrderLineSearchItem.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/DisableStockPreference.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/EnableStockPreference.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RESRegression31799.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RES_RegressionSuite.java
A src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/build.xml
A src-test/com/openbravo/test/integration/erp/testscripts/generalsetup/application/preference/Preference.java
A src-test/com/openbravo/test/integration/erp/testscripts/generalsetup/application/preference/PreferenceScript.java
A src-test/com/openbravo/test/integration/erp/testscripts/warehouse/transactions/stockreservation/StockReservation.java
---