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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031813
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 04. Warehouse managementmajoralways2015-12-30 13:282016-01-07 17:49
ReporterngarciaView Statuspublic 
Assigned Toaferraz 
PriorityimmediateResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionef895ced13c2
ProjectionnoneETAnoneTarget Version3.0PR15Q4.2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression levelProduction - QA Approved
Regression date2015-06-22
Regression introduced in release3.0PR15Q4
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/e03c1808e1952c20ef838c8a8b976cff802d5156 [^]
Triggers an Emergency PackNo
Summary

0031813: Cannot void a goods shipment if it has more than one closed reservation associated

DescriptionCannot void a goods shipment if it has more than one closed reservation associated
Steps To ReproduceAs 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
Proposed SolutionIn 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)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 00317993.0PR16Q2 closedaferraz Cannot void a goods shipment if it has more than one closed reservation associated 

-  Notes
(0083165)
hgbot (developer)
2016-01-07 17:48

Repository: erp/backports/3.0PR15Q4.2
Changeset: 69f3a1a1c22d00eec6c5bec8cb1dd3c4f0c766e9
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Jan 04 19:14:21 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q4.2/rev/69f3a1a1c22d00eec6c5bec8cb1dd3c4f0c766e9 [^]

Fixes issue 31813: 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
---
(0083166)
hgbot (developer)
2016-01-07 17:48

Repository: erp/backports/3.0PR16Q1
Changeset: ef895ced13c2d31e6857ff3197de81c79e5629b5
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Jan 04 19:14:21 2016 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/ef895ced13c2d31e6857ff3197de81c79e5629b5 [^]

Fixes issue 31813: 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
---
(0083167)
dmiguelez (developer)
2016-01-07 17:49

Code Review + Testing Ok

- Issue History
Date Modified Username Field Change
2016-01-04 11:28 aferraz Type defect => backport
2016-01-04 11:28 aferraz Target Version => 3.0PR15Q4.2
2016-01-07 17:48 hgbot Checkin
2016-01-07 17:48 hgbot Note Added: 0083165
2016-01-07 17:48 hgbot Status scheduled => resolved
2016-01-07 17:48 hgbot Resolution open => fixed
2016-01-07 17:48 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q4.2/rev/69f3a1a1c22d00eec6c5bec8cb1dd3c4f0c766e9 [^]
2016-01-07 17:48 hgbot Checkin
2016-01-07 17:48 hgbot Note Added: 0083166
2016-01-07 17:48 hgbot Fixed in SCM revision http://code.openbravo.com/erp/backports/3.0PR15Q4.2/rev/69f3a1a1c22d00eec6c5bec8cb1dd3c4f0c766e9 [^] => http://code.openbravo.com/erp/backports/3.0PR16Q1/rev/ef895ced13c2d31e6857ff3197de81c79e5629b5 [^]
2016-01-07 17:49 dmiguelez Review Assigned To => dmiguelez
2016-01-07 17:49 dmiguelez Note Added: 0083167
2016-01-07 17:49 dmiguelez Status resolved => closed


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker