Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036061Openbravo ERP04. Warehouse managementpublic2017-05-22 10:492017-06-12 18:27
ngarcia 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Core
No
0036061: Bill Of Materials Production is creating an entry in Product - Transactions tab (M_TRANSACTION) for a non stocked product
Bill Of Materials Production is creating an entry in Product - Transactions tab (M_TRANSACTION) for a non stocked product
As group admin role:
   Go to 'Client - Information' tab and set the Allow Negative Stock option
   Create a new product:
      Product Type: Item
      Stocked: No
   Create a new product:
      Bill Of Materials: Y
      Stocked: Yes
   Add the first product in the Bill of Materials tab of the second one
   Add a stocked product too
   Verify BOM
   Create a new record in Bill Of Materials window
   Add a production plan to it, add the previously created product and Create/Process Production (launch the process twice)
   Go to Product - Transactions tab of the not stocked product and check an entry is shown there when it should not (as it is not a stocked Item)
No tags attached.
related to feature request 0019526 closed Triage Omni WMS BOM production does not allow use non stocked products 
related to defect 0036235 closed collazoandy4 NPE in SL_ProductionPlan_WRPhase_Quantity callout when updating production quantity in Production Plan tab 
related to defect 0036237 closed collazoandy4 Internal Consumption is creating an entry in Product - Transactions tab (M_TRANSACTION) for a non stocked product 
related to feature request 0027546 closed Triage Omni WMS It would be nice to introduce Service Products in BOM productions 
Issue History
2017-05-22 10:49ngarciaNew Issue
2017-05-22 10:49ngarciaAssigned To => Triage Finance
2017-05-22 10:49ngarciaModules => Core
2017-05-22 10:49ngarciaResolution time => 1497218400
2017-05-22 10:49ngarciaTriggers an Emergency Pack => No
2017-05-22 10:50ngarciaIssue Monitored: networkb
2017-05-22 10:50ngarciaRelationship addedrelated to 0019526
2017-05-25 16:57aferrazAssigned ToTriage Finance => collazoandy4
2017-06-07 23:19collazoandy4Statusnew => scheduled
2017-06-09 23:48collazoandy4Note Added: 0097299
2017-06-12 12:41aferrazNote Edited: 0097299bug_revision_view_page.php?bugnote_id=0097299#r15322
2017-06-12 12:47hgbotCheckin
2017-06-12 12:47hgbotNote Added: 0097307
2017-06-12 12:47hgbotStatusscheduled => resolved
2017-06-12 12:47hgbotResolutionopen => fixed
2017-06-12 12:47hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9d3e6c2af297940cbe16cc6e214ba966831885be [^]
2017-06-12 12:47hgbotCheckin
2017-06-12 12:47hgbotNote Added: 0097308
2017-06-12 12:49aferrazReview Assigned To => aferraz
2017-06-12 12:49aferrazNote Added: 0097309
2017-06-12 12:49aferrazStatusresolved => closed
2017-06-12 12:49aferrazFixed in Version => 3.0PR17Q3
2017-06-12 18:27hudsonbotCheckin
2017-06-12 18:27hudsonbotNote Added: 0097325
2017-06-12 18:27hudsonbotCheckin
2017-06-12 18:27hudsonbotNote Added: 0097326
2017-06-12 19:09collazoandy4Relationship addedrelated to 0036235
2017-06-12 22:24collazoandy4Relationship addedrelated to 0036237
2017-11-23 12:56ngarciaRelationship addedrelated to 0027546

Notes
(0097299)
collazoandy4   
2017-06-09 23:48   
(edited on: 2017-06-12 12:41)
Test Plan
As group admin role:
   Go to Information tab of Client window and check the Allow Negative Stock option
   Go to Product window and create a new record:
      SearchKey/Name: FirstProduct
      Product Type: Item
      Stocked: No
   Create another record in Product window:
      SearchKey/Name: SecondProduct
      Bill Of Materials: Y
      Stocked: Yes
      Create a new record in Bill of Materials tab:
         BOM Product: FirstProduct
      Create another record in Bill of Material tab:
         BOM Product: Cerveza Ale 0,5L
      Clic on Verify BOM
   Go to Bill Of Materials Production window and create a new record:
      Name: Issue
      Create a new record in Production Plan tab:
        Product: SecondProduct
        Production Quantity: 2
      Clic on Create/Process Production
      Check 3 new records are created in I/O Product tab
      Clic on Create/Process Production
      Check product SecondProduct has increased the stock in 2
      Check product Cerveza Ale 0,5L has decreased the stock in 2
      Check no new transaction was created in product FirstProduct
    Add a standard cost in Costing tab for FirstProduct.
    Run Costing Background process and check SecondProduct cost has been calculated correctly.
    Post the Bill of Materials Production and check accounting has been calculated correctly.

(0097307)
hgbot   
2017-06-12 12:47   
Repository: erp/devel/pi
Changeset: 9d3e6c2af297940cbe16cc6e214ba966831885be
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Fri Jun 09 11:44:54 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/9d3e6c2af297940cbe16cc6e214ba966831885be [^]

Fixes issue 36061: BOM Production is working for non stocked products

A stocked product filter was added to the create product transaction loop

---
M src-db/database/model/functions/M_PRODUCTION_RUN.xml
---
(0097308)
hgbot   
2017-06-12 12:47   
Repository: erp/devel/pi
Changeset: e4a51675b08b30d0f0c1deae951342c4fb713562
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Jun 12 12:34:23 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e4a51675b08b30d0f0c1deae951342c4fb713562 [^]

Related to issue 36061: Code review improvements

Avoid NPE when calculating the cost of a production which consumes a non stocked product, as non stocked product will not have a related M_Transaction.
For taking the cost of this non stocked transaction, we should look for a standard cost, same as we do in DocLine_Material.getProductCosts().

---
M src/org/openbravo/costing/CostingAlgorithm.java
---
(0097309)
aferraz   
2017-06-12 12:49   
Code review + Testing OK
(0097325)
hudsonbot   
2017-06-12 18:27   
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/3e7529ba5fbb [^]
Maturity status: Test
(0097326)
hudsonbot   
2017-06-12 18:27   
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/3e7529ba5fbb [^]
Maturity status: Test