Openbravo Issue Tracking System - Modules
View Issue Details
0039403ModulesWarehouse Pickingpublic2018-10-04 13:232018-10-18 17:03
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
 
Sandrahuguet
0039403: Cannot Generate Picking List from multiple orders if there is not stock for one of them
Cannot Generate Picking List from multiple orders if there is not stock for one of them
As group admin role:
   Set Enable Stock Reservations to Y
   Log out and log in

   Apply module's dataset

   Create a sales order, add a product without stock in the order's warehouse and book it
   Create a similar sales order header, add a product with stock in the order's warehouse and book it
   Select both orders and launch Generate Picking List process:
      Picking List Type: Direct Picking List to Customer
      Grouping criteria: Not group

   Check the following error message is shown:
      There is not enough available stock
No tags attached.
related to defect 0039485 closed markmm82 Cannot Generate Picking List from multiple orders if there is not stock for one of them and it is grouped by business partner 
Issue History
2018-10-04 13:23ngarciaNew Issue
2018-10-04 13:23ngarciaAssigned To => Triage Finance
2018-10-04 13:23ngarciaResolution time => 1540418400
2018-10-04 13:25ngarciaIssue Monitored: networkb
2018-10-04 17:46SandrahuguetAssigned ToTriage Finance => markmm82
2018-10-04 23:34markmm82Statusnew => acknowledged
2018-10-11 03:02markmm82Note Added: 0107233
2018-10-11 03:03markmm82Statusacknowledged => scheduled
2018-10-11 17:35hgbotCheckin
2018-10-11 17:35hgbotNote Added: 0107253
2018-10-11 17:35hgbotStatusscheduled => resolved
2018-10-11 17:35hgbotResolutionopen => fixed
2018-10-11 17:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/e0abc9b99fe16e664fd669bd13f3111dace0a46e [^]
2018-10-11 17:36SandrahuguetReview Assigned To => Sandrahuguet
2018-10-11 17:36SandrahuguetNote Added: 0107254
2018-10-11 17:37SandrahuguetStatusresolved => closed
2018-10-15 09:59eugeniIssue Monitored: eugeni
2018-10-18 17:03ngarciaIssue cloned0039485
2018-10-18 17:03ngarciaRelationship addedrelated to 0039485

Notes
(0107233)
markmm82   
2018-10-11 03:02   
Test Plan:
As group admin role:
   Set Enable Stock Reservations to Y
   Log out and log in

   Apply module's dataset

   Create a sales order for Alimentos y Supermercados, S.A and España Región Norte warehouse, add a product without stock in the order's warehouse, for example Agua sin Gas 1L and book it.
   Select the order and launch Generate Picking List process:
      Picking List Type: Direct Picking List to Customer
      Grouping criteria: Not group
   Check the following error is shown:
   "Error
    There is not enough available stock"

   Create a sales order for Alimentos y Supermercados, S.A and España Región Norte warehouse.
   Add a line with a product without stock in the order's warehouse, for example Agua sin Gas 1L.
   Add a line with a product with stock in the order's warehouse, for example Cerveza Ale 0,5L.
   Book the order.
   Select the order and launch Generate Picking List process:
      Picking List Type: Direct Picking List to Customer
      Grouping criteria: Not group
   Check the Picking List was partially generated with the line with stock and the following message is shown:
   "Picking List created successfully
    PL336
    There is not enough stock in warehouses to create the whole Picking List. : [PL336]"
  
   Go to Warehouse Picking List window and cancel the previously created picking list.

   Create a sales order for Alimentos y Supermercados, S.A and España Región Norte warehouse, add a product with stock in the order's warehouse, for example Cerveza Lager 0,5L and book it.

   Select all previously created orders (first with no stock, second with partial stock and third with stock) and launch Generate Picking List process:
      Picking List Type: Direct Picking List to Customer
      Grouping criteria: Not group
  Check two picking list have been created, one related to the order with partial stock and the other to the order with stock. Also is explained to the user the order from wich was not possible to generate the Picking List because no available stock. The following message is shown:
    "Picking List created successfully
     PL341, PL342
     There is not enough stock in warehouses to create the whole Picking List. : [PL341]
     There is not enough available stock for the following orders: 1000264"
(0107253)
hgbot   
2018-10-11 17:35   
Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: e0abc9b99fe16e664fd669bd13f3111dace0a46e
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Oct 10 21:11:00 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/e0abc9b99fe16e664fd669bd13f3111dace0a46e [^]

Fixes issue 39403: Cannot Generate Picking List from multiple orders if there is
not stock for one of them

When generating Picking List from multiple orders and one of them hasn't stock
then the process was stopped because an exception was thrown and a rollback and
close executed. It avoid the creation of the picking lists from the other orders
that can be completely or partially picked.

To avoid that, the process don't stop if one of the orders haven't stock, it continues
but show at the end the list of orders wich was not possible to create the Picking Lists.

If any picking list could be created because there is no available stock for the
selected orders then an error message is shown explaining that there is no available stock.

With this change, the process could end successfully, showing the identifiers of the
generated Picking Lists, and also notifying to the user the ist of orders that couldn't
be processed because there is no stock.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/warehouse/pickinglist/CreateActionHandler.java
M src/org/openbravo/warehouse/pickinglist/Utilities.java
---
(0107254)
Sandrahuguet   
2018-10-11 17:36   
Code review + testing OK