Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0012505Openbravo ERP04. Warehouse managementpublic2010-03-01 12:322010-03-12 22:40
networkb 
adrianromero 
immediatemajoralways
closedfixed 
5
2.50MP11 
2.50MP142.50MP14 
Core
No
0012505: m_generate_average_costs when there is no pricelist associated
You create a Goods Receipt for a Product without price in Business Partner price list version. When running Generate Average Costs, inserts entries with cost and price set to NULL in m_costing.
1. Master Data Management || Pricing || Price List || Price List: go to Purchase 2006 and remove Product Price of Hammer
2. Procurement Management || Transactions || Goods Receipt || Header : create record for Macgiver and Hammer, and complete
3. Run Generate Average Costs process
4. Master Data Management || Product || Product >> Costing : check that entries for hammer product have cost and price set to null
No tags attached.
Issue History
2010-03-01 12:32networkbNew Issue
2010-03-01 12:32networkbAssigned To => adrianromero
2010-03-02 15:53adrianromeroStatusnew => scheduled
2010-03-02 15:53adrianromerofix_in_branch => pi
2010-03-02 16:01adrianromeroNote Added: 0024953
2010-03-02 16:07adrianromeroNote Added: 0024954
2010-03-03 17:32hgbotCheckin
2010-03-03 17:32hgbotNote Added: 0025019
2010-03-03 17:32hgbotStatusscheduled => resolved
2010-03-03 17:32hgbotResolutionopen => fixed
2010-03-03 17:32hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/94a406d2d299fc5c8285126694bdaf1716f16d44 [^]
2010-03-03 17:35adrianromeroNote Added: 0025020
2010-03-03 17:35adrianromerofix_in_branchpi =>
2010-03-08 09:27arunkumarNote Added: 0025108
2010-03-08 09:27arunkumarStatusresolved => closed
2010-03-08 09:27arunkumarFixed in Version => 2.50MP13
2010-03-08 16:04jpabloaeFixed in Version2.50MP13 => 2.50MP14
2010-03-08 16:05jpabloaeTarget Version2.50MP13 => 2.50MP14
2010-03-10 17:25anonymoussf_bug_id0 =>
2010-03-10 18:30anonymoussf_bug_id => 2968117
2010-03-12 22:40hudsonbotCheckin
2010-03-12 22:40hudsonbotNote Added: 0025385

Notes
(0024953)
adrianromero   
2010-03-02 16:01   
The issue here is that the procedure M_GENERATE_AVERAGE_COSTS inserts a cost with price NULL When there is no price in invoice, order and bp pricelist.

The solution to this is to modify the procedure and if there is no price in invoice, order and bp price list, insert a new cost using the price of the previous cost, and if a previous cost does not exist then do not do anything

In both cases, (insert a new cost using the price of the previous cost or not to do anything) a warning must be generated. To generate a warning v_result, the returned variable must be set to 2 and the v_message variable must be set with the message value.

The message of the process: http://wiki.openbravo.com/wiki/ERP/2.50/User_Manual/Warehouse_Management#Create_Average_Costs [^] must be modified by adding an explanation how costs are calculated.
(0024954)
adrianromero   
2010-03-02 16:07   
In the solution of the issue, the warning message must show the business partner and the product.
(0025019)
hgbot   
2010-03-03 17:32   
Repository: erp/devel/pi
Changeset: 94a406d2d299fc5c8285126694bdaf1716f16d44
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Wed Mar 03 17:36:36 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/94a406d2d299fc5c8285126694bdaf1716f16d44 [^]

Fixes issue 0012505: m_generate_average_costs when there is no pricelist associated

---
M src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_PROCESS.xml
---
(0025020)
adrianromero   
2010-03-03 17:35   
To test the issue follow the steps to reproduce and check that in step 3 a warning is generated saying that the cost for Hammer cannot be generated and in the step 4, in Master Data Management || Product || Product >> Costing check that the cost is set to 4.5 instead of null. The value was taken from the last cost available.
(0025108)
arunkumar   
2010-03-08 09:27   
Tested & Working fine
(0025385)
hudsonbot   
2010-03-12 22:40   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/94a406d2d299 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/631c626866c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.16685.obx [^]