Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
14 Răspunsuri
24909 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Cel mai bun răspuns

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.

Imagine profil
Abandonează

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.

Cel mai bun răspuns

Is any of this available in version 9?

Imagine profil
Abandonează
Cel mai bun răspuns

Hi every body

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

thanks

Imagine profil
Abandonează
Cel mai bun răspuns

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.

Imagine profil
Abandonează
Autor

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)

Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

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)

Autor Cel mai bun răspuns

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 !

Imagine profil
Abandonează

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"

Related Posts Răspunsuri Vizualizări Activitate
2
aug. 25
991
2
aug. 24
4593
1
mar. 24
2207
2
iun. 21
3456
0
mar. 21
2158