Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022231Openbravo ERP07. Sales managementpublic2012-11-07 18:302012-11-30 10:05
psarobe 
gorkaion 
immediatemajoralways
closedfixed 
5
pi 
 
naiaramartinez
Core
No
0022231: Qty on hand warehouses and rules
If you have defined two "qty on hand" warehouses for an organization and depending on a warehouse rule it is needed to move from the warehouse with first priority to the other one to get the rest of the stock this is not happening.
For example you define for a sales order line the warehouse rule "Unique storage bin" and the quantity 60 uds
The product is stored as follows:
WH1
 -- storage bin 1 - 45uds
 -- storage bin 2 - 30 uds

WH2
 -- storage bin 1 - 12 uds
 -- storage bin 2 - 65 uds

The goods shipment should get the 60 uds from the storage bin 2 of the WH2

1. Configure an organization with two warehouses (wh1, wh2)
2. Configure a product as follows:
WH1
 -- storage bin 1 - 45uds
 -- storage bin 2 - 30 uds

WH2
 -- storage bin 1 - 12 uds
 -- storage bin 2 - 65 uds
3. Create a sales order with a line with that product with quantity 60
4. Complete the sales order
5. Go to the window "Create shipments from order". Select the above sales order
6. Click process and good shipment will be created

Expected behaviour: The good shipment will take the storage bin 2 of the WH2
No tags attached.
related to defect 0030961 closed aferraz Sales Order lines cannot be partially delivered if there is not enough stock due to the warehouse rule but there is more stock 
Issue History
2012-11-07 18:30psarobeNew Issue
2012-11-07 18:30psarobeAssigned To => gorkaion
2012-11-07 18:30psarobeModules => Core
2012-11-07 18:33gorkaionStatusnew => scheduled
2012-11-07 18:33gorkaionfix_in_branch => pi
2012-11-07 18:33gorkaionReview Assigned To => naiaramartinez
2012-11-07 18:33gorkaionfix_in_branchpi =>
2012-11-07 18:35hgbotCheckin
2012-11-07 18:35hgbotNote Added: 0054083
2012-11-07 18:35hgbotStatusscheduled => resolved
2012-11-07 18:35hgbotResolutionopen => fixed
2012-11-07 18:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/587215fcc82a7754bc2b2b75fd8f31b07661c839 [^]
2012-11-09 08:45naiaramartinezNote Added: 0054108
2012-11-09 08:45naiaramartinezStatusresolved => closed
2012-11-27 10:11hgbotCheckin
2012-11-27 10:11hgbotNote Added: 0054512
2012-11-27 10:11hgbotStatusclosed => resolved
2012-11-27 10:11hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/587215fcc82a7754bc2b2b75fd8f31b07661c839 [^] => http://code.openbravo.com/erp/devel/pi/rev/9181cfa32cd720d75fdabe41a07e358445d852b5 [^]
2012-11-27 19:40hudsonbotCheckin
2012-11-27 19:40hudsonbotNote Added: 0054612
2012-11-30 10:05naiaramartinezNote Added: 0054662
2012-11-30 10:05naiaramartinezStatusresolved => closed
2015-09-29 14:32ngarciaRelationship addedrelated to 0030961

Notes
(0054083)
hgbot   
2012-11-07 18:35   
Repository: erp/devel/pi
Changeset: 587215fcc82a7754bc2b2b75fd8f31b07661c839
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Nov 07 18:34:23 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/587215fcc82a7754bc2b2b75fd8f31b07661c839 [^]

Fixed issue 22231.Fixes in get_stock applying warehouse rules.

---
M src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml
M src-db/database/model/functions/M_GET_STOCK.xml
M src-db/database/model/functions/M_INOUT_CREATE.xml
M src-db/database/model/functions/M_UNIQUELOCATOR_RULE.xml
M src-db/database/model/tables/M_STOCK_PROPOSED.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0054108)
naiaramartinez   
2012-11-09 08:45   
Code Review + Testing Ok
(0054512)
hgbot   
2012-11-27 10:11   
Repository: erp/devel/pi
Changeset: 9181cfa32cd720d75fdabe41a07e358445d852b5
Author: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
Date: Wed Nov 07 18:34:23 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9181cfa32cd720d75fdabe41a07e358445d852b5 [^]

Fixed issue 22231.Fixes in get_stock applying warehouse rules.

---
M src-db/database/model/functions/MA_PRODUCTIONRUN_STANDARD.xml
M src-db/database/model/functions/M_GET_STOCK.xml
M src-db/database/model/functions/M_INOUT_CREATE.xml
M src-db/database/model/functions/M_UNIQUELOCATOR_RULE.xml
M src-db/database/model/tables/M_STOCK_PROPOSED.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0054612)
hudsonbot   
2012-11-27 19:40   
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/eaf1a8bdbf4e [^]

Maturity status: Test
(0054662)
naiaramartinez   
2012-11-30 10:05   
code Review + testing OK