Openbravo Issue Tracking System - Modules
View Issue Details
0032469ModulesWarehouse Pickingpublic2016-03-14 14:232018-04-04 15:18
psanjuan 
collazoandy4 
urgentmajoralways
closedfixed 
20Community Appliance
 
 
dmiguelez
0032469: Not possible to create a partial "Outbound" Picking List if there is not a line that can be completely shipped
Not possible to create a partial "Outbound" Picking List if there is not a line that can be completely shipped.

In case there exists a sales order line with all the quantity available in the stock, the rest of lines will be created with the available stock although it is not enough
As F&B International Group Admin
  
  Go to Product window
    Create a new product (ie. Product 32281 Test 3)
    Add a sales price list (Tarifa Ventas)
    Add a purchase price list (Tarifa Bebidas Alegres)
  
  Go to Good Receipts window
    Receipt 2 units of this product, from vendor Bebidas Alegres
    WH = España Region Norte, RN-1-0-0
    Complete it.

  Go to Sales Order window
    Create a new Sales Order for BP = Alimentos y Supermercados
    Add line of this new product. Qty = 10
    Book it.

  Go to Sales Order window main tab
    Generate Picking List
    Choose "Outbound Picking List"
    España Region Norte: RN-DEV (Outbound bin)
    Press OK

  Check that a message is shown: There is not enough available stock.

  Reactivate the Sales Order
  Add a line with 1 unit of a product with stock
  Book it
  
  Generate Picking List
  Choose "Outbound Picking List"
  España Region Norte: RN-DEV (Outbound bin)
  Press OK
  Check 2 units of previously created product have been included in the Warehouse Picking List
No tags attached.
related to defect 0032281 closed rqueralta wrong movement quantity of the picking list without enough stock available 
Issue History
2016-03-14 14:23psanjuanNew Issue
2016-03-14 14:23psanjuanAssigned To => Triage Finance
2016-03-14 14:24psanjuanRelationship addedrelated to 0032281
2016-03-14 14:25psanjuanSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11427#r11427
2018-03-14 16:49ngarciaSummaryNot possible to create a partial "Outbound" Picking List. => Not possible to create a partial "Outbound" Picking List if there is not a line that can be completely shipped
2018-03-14 16:49ngarciaDescription Updatedbug_revision_view_page.php?rev_id=16841#r16841
2018-03-14 16:49ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16842#r16842
2018-03-14 16:49ngarciaIssue Monitored: ngarcia
2018-03-14 16:49ngarciaResolution time => 1522792800
2018-03-16 08:57aferrazAssigned ToTriage Finance => collazoandy4
2018-03-20 23:14collazoandy4Statusnew => scheduled
2018-03-21 22:04collazoandy4Note Added: 0103392
2018-04-04 15:16hgbotCheckin
2018-04-04 15:16hgbotNote Added: 0103673
2018-04-04 15:16hgbotStatusscheduled => resolved
2018-04-04 15:16hgbotResolutionopen => fixed
2018-04-04 15:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/d3a9f9fa95abb1333e2b0e33690e4595ea618c4d [^]
2018-04-04 15:16hgbotCheckin
2018-04-04 15:16hgbotNote Added: 0103674
2018-04-04 15:16hgbotCheckin
2018-04-04 15:16hgbotNote Added: 0103675
2018-04-04 15:18dmiguelezReview Assigned To => dmiguelez
2018-04-04 15:18dmiguelezNote Added: 0103676
2018-04-04 15:18dmiguelezStatusresolved => closed

Notes
(0103392)
collazoandy4   
2018-03-21 22:04   
Test Plan
  Enable Stock Reservation Preference
  Edit RN-Dev bin and set Type: Outbound from Region Norte Warehouse
  Create a new Product and add a Sales Price List
  Create a new Sales Order for that product qty = 10 and book it
  In Sales Order window main tab
    Generate Picking List
    Choose "Outbound Picking List"
    España Region Norte: RN-DEV
    Press OK and check that an error message is shown: There is not enough available stock.
  Receipt 2 units of this product
  In Sales Order window main tab
    Generate Picking List
    Choose "Outbound Picking List"
    España Region Norte: RN-DEV
    Press OK and check that an information message is shown indicating a partial Picking was created


Test Plan II
  Create a new Sales Order for the previous product qty = 10 and book it
  Create a new Picking List outbound document
  Clic on Sales Orders
    Select the previous order created
    Clic on Done and check that an error message is shown: There is not enough available stock.
  Reactivate and edit the previous order, set a new line with an stocked product qty = 6
  Go to the previous Picking List created and Clic on Sales Orders
    Select the previous order created
    Clic on Done and check the process ends without errors and the stocked line was added to the Picking
(0103673)
hgbot   
2018-04-04 15:16   
Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: d3a9f9fa95abb1333e2b0e33690e4595ea618c4d
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Mar 27 11:42:32 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/d3a9f9fa95abb1333e2b0e33690e4595ea618c4d [^]

Fixes Issue 32469. Properly manage the zeroStockLines variable.
If it is not incremented for partial pickings, it might happen that
the "No Stock available" error is raised instead of creating a partial
Picking.

Changed StringBuilder with StringBuffer
Changed HashSet with more generic Set type

---
M src/org/openbravo/warehouse/pickinglist/Utilities.java
---
(0103674)
hgbot   
2018-04-04 15:16   
Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: aa00aab8050e7fd8a3a67d72f37f6dfa59a914df
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Tue Mar 27 12:14:59 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/aa00aab8050e7fd8a3a67d72f37f6dfa59a914df [^]

Related to Issue 32469. Refactor code:

* Extracted validations code into it's own method
* Extracted loop logic for orderLines into it's own method
* Remove commented code
* Simplify message variable logic. It was initiated but never used until the end
  So it is not necessary to check it's lenght and append any message, just
  return it
* Extracted query to retrieve lines into it's own method

---
M src/org/openbravo/warehouse/pickinglist/Utilities.java
---
(0103675)
hgbot   
2018-04-04 15:16   
Repository: erp/pmods/org.openbravo.warehouse.pickinglist
Changeset: 348d436ddce4778895b4247f15981bf1dfcc5a19
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Apr 04 15:09:51 2018 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.warehouse.pickinglist/rev/348d436ddce4778895b4247f15981bf1dfcc5a19 [^]

Related to Issue 32469: Updated Module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0103676)
dmiguelez   
2018-04-04 15:18   
Code Review + Testing Ok