Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037850Openbravo ERP04. Warehouse managementpublic2018-02-07 11:532018-03-02 21:18
ngarcia 
collazoandy4 
highmajoralways
closedfixed 
5
 
3.0PR18Q2 
dmiguelez
Core
No
0037850: Stock Valuation of 0 in Product - Unit Cost tab if product is received in a warehouse created after unit cost is calculated
Stock Valuation of 0 in Product - Unit Cost tab if product is received in a warehouse created after unit cost is calculated
As group admin role:
   Set 'Allow to persist Unit Cost' preference to Y
   Log out and log in
   Create a new Costing Rule for 'F&B US, Inc.', select Warehouse Dimension checkbox and Validate it
   Launch Reset Unit Cost process for 'F&B US, Inc.'
   Create a warehouse and storage bin for 'F&B US East Coast'
   Create a Goods Movements and move 5 units of a product for EC-0-0-0 to the newly created storage bin
   Launch the Costing Background Process
   Go to Product - Unit Cost tab and check the Total Stock Valuation is shown as 0 for the newly created warehouse. This is wrong

   Launch the Reset Unit Cost process and check the Total Stock Valuation is updated correctly
   
No tags attached.
Issue History
2018-02-07 11:53ngarciaNew Issue
2018-02-07 11:53ngarciaAssigned To => Triage Finance
2018-02-07 11:53ngarciaModules => Core
2018-02-07 11:53ngarciaTriggers an Emergency Pack => No
2018-02-07 11:54ngarciaIssue Monitored: networkb
2018-02-07 12:24eugeniIssue Monitored: eugeni
2018-02-14 17:38ngarciaResolution time => 1520377200
2018-02-14 17:38ngarciaSeverityminor => major
2018-02-15 17:28dmiguelezAssigned ToTriage Finance => collazoandy4
2018-02-16 18:48collazoandy4Statusnew => scheduled
2018-02-19 20:32collazoandy4Note Added: 0102501
2018-02-23 08:49hgbotCheckin
2018-02-23 08:49hgbotNote Added: 0102807
2018-02-23 08:49hgbotStatusscheduled => resolved
2018-02-23 08:49hgbotResolutionopen => fixed
2018-02-23 08:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4949275527c9a095d0d441e58a0b79e05abe96a5 [^]
2018-02-23 08:51dmiguelezReview Assigned To => dmiguelez
2018-02-23 08:51dmiguelezNote Added: 0102808
2018-02-23 08:51dmiguelezStatusresolved => closed
2018-02-23 08:51dmiguelezFixed in Version => 3.0PR18Q2
2018-03-02 21:18hudsonbotCheckin
2018-03-02 21:18hudsonbotNote Added: 0102947

Notes
(0102501)
collazoandy4   
2018-02-19 20:32   
Test Plan
  Go to Preference window and create a new record:
    Organization: F&B US, Inc., Property: Allow to persist Unit Cost, Value: Y
  Log out and Log in
  Create a new Costing Rule for 'F&B US, Inc.', select Warehouse Dimension checkbox and Validate it
  Launch Reset Unit Cost for F&B US, Inc. organization
  Go to Warehouse and Storage Bin and create a new record:
    Organization: F&B US East Coast
    Search Key/Name: IssueWarehouse
    Set an Spain location
    Create a new record in Storage Bin tab:
      Search Key: Bin1
      Fill all the required fields
  Go to Goods Movements Window and create a new record:
    Organization: F&B US East Coast
    Create a new record in Lines tab:
      Product: White wine
      Movement Quantity: 5
      New Storage Bin: Bin1
    Process the Movement
  Go to Process Reques window and unschedule the Costing Background Process and edit it to Run Inmediately and Reschedule the Process and check ends successfully
  Go to Product window and select White wine record:
    Check in Unit Cost a new record was created for IssueWarehouse with:
      Organization: F&B US, Inc., Stock: 5, Stock Valuation: 17.75, Warehouse: Issue Warehouse, Unit Cost: 3.55
  Go to Goods Receipts window and create a new record:
    Organization: F&B US East Coast
    Business Partner: Be Soft Drinker, Inc.
    Create a new record in Lines tab:
      Product: White wine
      Storage Bin: Bin1
      Movement Quantity: 7
    Complete the Receipt
  Launch the Costing Background Process
  Go to White wine product and check the Valuation Stock for Issue Warehouse was updated
    Organization: F&B US, Inc., Stock: 12, Stock Valuation: 42.6, Warehouse: Issue Warehouse, Unit Cost: 3.55


Test Plan II
  Go to Product window and create a new record:
    Organization: F&B US, Inc.
    Search Key/Name: Issue Product
    Create a new record in Price tab:
      Price List Version: Be Soft Drinker Price List
      Unit Price: 7
    Check 0 Stock Valuation value for the three warehouses
  Go to Goods Receipts window and create a new record:
    Organization: F&B US East Coast
    Business Partner: Be Soft Drinker, Inc.
    Create a new record in Lines tab:
      Product: Issue Product
      Storage Bin: Bin1
      Movement Quantity: 10
    Complete the Receipt
  Launch the Costing Background Process
  Go to Product window and select Issue Product record and check the Valuation Stock for Issue Warehouse was updated
    Organization: F&B US, Inc., Stock: 10, Stock Valuation: 70, Warehouse: Issue Warehouse, Unit Cost: 7
(0102807)
hgbot   
2018-02-23 08:49   
Repository: erp/devel/pi
Changeset: 4949275527c9a095d0d441e58a0b79e05abe96a5
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Feb 23 08:45:53 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4949275527c9a095d0d441e58a0b79e05abe96a5 [^]

Fixes issue 37850: Stock Valuation of 0 in Product - Unit Cost tab if product is
received in a warehouse created after unit cost is calculated

When a new transaction increase the product stock in a warehouse and doesn't exist
a stock valuation record to this warehouse the M_Transaction_Cost trigger can't
set the valuation cost because the stock is 0.

The flush to M_Transaction when the cost is calculated trigger the M_Update_Stock_Valuation
with the correct stock quantity and then the M_Transaction_Cost trigger can set the
valuation cost to the Stock Valuation created in the M_Transaction trigger.

---
M src/org/openbravo/costing/CostingServer.java
---
(0102808)
dmiguelez   
2018-02-23 08:51   
Code Review + Testing Ok
(0102947)
hudsonbot   
2018-03-02 21:18   
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/05dece3dc80b [^]
Maturity status: Test