Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039945Retail ModulesAuto BOM For Retailpublic2019-01-14 19:002019-02-13 09:58
gorkaion 
rqueralta 
highmajorN/A
closedfixed 
5
 
RR19Q2 
marvintm
Gold
7101
No
0039945: Get stock call of autbom does not include the process and warehouse ids
The get stock procedure has a warehouseId parameter to ensure that the proposed stock belongs to that warehouse. Do not confuse with priorityWarehouseId. The autbom should set on this paremeter the warehouse of the locator defined in the production plan to ensure that the stock is consumed from the same warehouse where the bom product is created as it is done in the backend bom process (m_production_run procedure)

---

The get stock procedure has a p_process_id parameter. This parameter is the identifier of the process that is requesting the stock. Usually is the ad_process_id of the process definition in the AD.

When this parameter is set it is possible to use Warehouse Rules or implement Get Stock extension points that modify the stock proposed depending on the caller process.

The get stock call for AutoBOM is not populating this parameter making impossible to customize it.
On a organization (ORG) with 2 warehouse on hand. Warehouse A and Warehouse B.

Define a new BOM Product with autobom. In the Manufacturing tab of the product set a locator from Warehouse A. So the produced product should be stored on that locator.

Make stock available only in Warehouse B.

Sell the product and check that it is consuming stock from Warehouse B and the produced bom product is in warehouse A. This is not correct. All the production lines of a Production Plan should use locators of the same warehouse.
Set the warehouse id of the locator set in the process plan in the warehouseId parameter.

Set '137' as process id. Which corresponds with the ad_process_id of the create bom lines backend process.
No tags attached.
related to defect 0040324 closed AtulOpenbravo Openbravo ERP Bill Of Materials Production should take the stock from same warehouse than the storage bin defined in the Production Plan tab 
Issue History
2019-01-14 19:00gorkaionNew Issue
2019-01-14 19:00gorkaionAssigned To => Retail
2019-01-14 19:00gorkaionOBNetwork customer => Gold
2019-01-14 19:00gorkaionSupport ticket => 7101
2019-01-14 19:00gorkaionResolution time => 1549234800
2019-01-14 19:00gorkaionTriggers an Emergency Pack => No
2019-01-14 19:12martinsdanIssue Monitored: martinsdan
2019-01-14 19:23gorkaionSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18124#r18124
2019-01-15 12:45rqueraltaAssigned ToRetail => rqueralta
2019-01-15 12:45rqueraltaStatusnew => scheduled
2019-02-12 20:41hgbotCheckin
2019-02-12 20:41hgbotNote Added: 0109784
2019-02-12 20:41hgbotStatusscheduled => resolved
2019-02-12 20:41hgbotResolutionopen => fixed
2019-02-12 20:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom/rev/0df28c36bf36f75fbee4b21000f51b3b2a01beed [^]
2019-02-13 09:58marvintmReview Assigned To => marvintm
2019-02-13 09:58marvintmStatusresolved => closed
2019-02-13 09:58marvintmFixed in Version => RR19Q2
2019-03-05 16:23ngarciaRelationship addedrelated to 0040324

Notes
(0109784)
hgbot   
2019-02-12 20:41   
Repository: erp/pmods/org.openbravo.retail.autobom
Changeset: 0df28c36bf36f75fbee4b21000f51b3b2a01beed
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Tue Feb 12 14:37:42 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom/rev/0df28c36bf36f75fbee4b21000f51b3b2a01beed [^]

Fixed issue 39945: Get stock call of autbom does not include the process and
warehouse ids

- Set the warehouse id with locator of production plan and process id with '137'

---
M src/org/openbravo/retail/autobom/BOMProcess.java
---