Odoo Help


BOMs and Product Cost Structue

Billy Watt
on 5/6/13, 7:25 AM 5,332 views

I'm trying to figure out how the costs accumulate for a BOM which is made up of sub BOMs.

I have a product, TD which requires 2 SB plus some other product parts, each SB requires 3 MP plus some other parts, each MP is made up of parts.

TD, SB and MP are all Normal BOMs

So, for the cost structure of a TD I have something like this

TD --- SB --- MP --- MP --- MP SB --- MP --- MP --- MP To simplify things, let's just assume materials, no routings attached.

A MP has £6 of parts, a SB adds a further £20 of parts and a TD adds £50 of parts. Total costs accumulated for a SB should be £38 (£20 + (3 x £6) Total costs accumulated for a TD should be £126 (£50 + (2 x £38)

Except when I ask for the Product Cost Structure of a TD OpenERP tells me that it's £50 and costs a SB as £0. In the same way, the Product Cost Structure of a SB shows as £20 with a MP costing £0. The Product Cost Structure of a MP is correctly shown as £6.

Am I missing something or is this a bug ?

Nobody knows how I can get a complete cost for a product that is made up of sub assemblies ?

Is the only way to do this really to start at the bottom level and manually enter costs so that the next level up can pick it up and then keep going up the tree until I get to the top level part ?

Billy Watt
on 5/15/13, 7:01 AM

The thread: "MRP cost price calculation on bom" helps a bit especially when loading the suggested modules. Unfortunately I couldn't get it to work out the overall cost even though it picks up the cost of each sub BOM.

Forsberg Services Ltd, Raphael
on 5/23/13, 11:48 AM

I tried those as well.

It doesn't appear to pick up the calculated cost of any sub BoMs though so it's still impossible to get a total cost including calculated cost of sub BoMs

Billy Watt
on 5/23/13, 12:05 PM
On 5/29/13, 1:04 PM

The problem is that the report doesn't take modifications made by product_cost_incl_bom (module you must install to calculate sub bom cost). 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.

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.

Forsberg Services Ltd, Raphael
on 5/30/13, 7:42 AM

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

iMaugis, Julius
on 5/30/13, 8:22 AM

Finally had time to action this !

Works perfectly and gives me a single figure in the Cost Inc BoM box that agrees with the breakdown that can be printed off from Product Cost Structure.

Thank you for the help everyone

Billy Watt
on 11/1/13, 10:53 AM

This method worked for me.

James R Cunningham
on 12/30/13, 5:49 PM

hi all i need a calculate product cost, for example manpower cost, fixed cost....My problem's i want to cost structure module but must be first install "invoce date time" module so this module sucsessfull installed. Then I can't install cost structure module SERVER ERROR NO Module named Datetime HELP ME?????

on 4/7/14, 1:54 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 5/6/13, 7:25 AM
Seen: 5332 times
Last updated: 3/16/15, 8:10 AM