Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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 ?
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.
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 5/6/13, 7:25 AM|
|Seen: 4590 times|
|Last updated: 3/16/15, 8:10 AM|