This question has been flagged
14 Replies
22987 Views

A complex product with 3 products A-B-C . A = $ 10 B = $ 20 C - $ 30 So the complex product has at least a $ 60 dollar cost price. You can print the structure of a BOM, but is there a way to show cost price of each part and add them together ?

Best regards Andre

Avatar
Discard
Best Answer

You can build your own custom module for this requirement . You can proceed in these ways: You should first inherit mrp.bom and add a new field 'price_unit': fields.float('Unit Price') and redefine the onchange_product_id function define compute_price and compute_total function to calculate "line price" and "total price" Then you have to inherit mrp.production and define compute_production_cost function to update cost_price from BOM. We have created this custom module and it works perfect , in my module it takes avg purcahse price in BOM and we added an extra tab to manufactring form to compute Production Cost , in that tab you can add extra charges like electicity etc.. , that charges also added to cost by calculating per_unit charge depending on UOM. for any help you can contact: baijuks@hotmail.com

Avatar
Discard
Best Answer

The problem is that the report doesn't take modifications made by product_cost_incl_bom. So you have to modify mrp/report/price.py and change two things:

line 68 "std_price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, prod.standard_price, to_uom_id=product_uom.id)" by "std_price = product_uom_pool._compute_price(cr, uid, prod.uom_id.id, prod.cost_price, to_uom_id=product_uom.id)"

line 150 "total_strd = number * product.standard_price" by "total_strd = number * product.cost_price"

The module product_cost_incl_bom also have to be modified (!) by changing line 62 "std_price = sub_product.standard_price" by "std_price = sub_product.cost_price" Hope this help.

Avatar
Discard

This solved the problem in the sense that the correct cost price is created at the end of the report. However the "supplier price per unit of measure" is displayed. This is the only things that is still a bit awkward.

You're right, you have to modify the report to make those values reach the real cost price of sub-products/sub-boms.

Best Answer

Is any of this available in version 9?

Avatar
Discard
Best Answer

Hi every body

can i have a link for those two module" product_cost_incl_bom and product_get_cost_field"$

thanks

Avatar
Discard
Author Best Answer

I did find the thing I was looking for, it was not where I expect it to be ;-) It is in Warehouse-product. Select Complex Product (which has a Bom) Now use [PRINT][PRODUCT COST STRUCTURE] and there it is !

Avatar
Discard

It will calculate the cost from BOM also. After installing those modules, you try the printing of : Product Cost Structure. It will show you the details.

Installed the modules and it also calculates the BOM cost including all the parts within a BOM. However when I go to the top level BOM, which includes an other BOM within it, then on the PRODUCT COST STRUCTURE print out the cost is listed as 0.00 GBP. This is a bit weired as the cost field in the subbom is populated correctly. This leads to that the cost price for a BOM, which includes as sub-BOM, is calculated incorrectly. The final cost price only includes items that are not in any sub BOM. Is it possible to calculate the final cost price of a product including all sub BOMs?

You're right! The problem is that the report doesn't take modifications made by product_cost_incl_bom. So you have to modify mrp/report/price.py and change line 150 "total_strd = number * product.standard_price" by "total_strd = number * product.cost_price"

Best Answer

There is a module, product_extended that does that. I don't know if it was ported to OpenERP 7.0

Avatar
Discard
Author

I have been looking into this but I don think to module was ported. But the functionality for costprice calculation is in 7. (See my post)

Best Answer

I am not sure about what you are looking for. I installed these modules- product_cost_incl_bom and product_get_cost_field and, it will display Product cost in Product form. You can download it and unzip it and add them into your addons folder. Update your module list, then install it.

Avatar
Discard
Author

I think this will only show the cost price as listed in the product. And not the summation of the past in the BOM (see my answer)