This question has been flagged
1 Reply
11403 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 ?

Avatar
Discard
Author

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 ?

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.

Author

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

Best Answer

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.

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.

Author

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

This method worked for me.

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?????