[PATCH] mrp.bom: include product_qty of child BoMs in factor

Bug #455484 reported by Adam James
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned
credativ-openerp
Status tracked in Trunk
Addons-5.0
New
Undecided
Unassigned
Addons-6.0
New
Undecided
Unassigned
Addons-6.1
New
Undecided
Unassigned
Trunk
New
Undecided
Unassigned

Bug Description

Patch is against trunk.

the _bom_explode function in addons/mrp/mrp.py doesn't take into account the quantity required of the parent BoM when computing required parts. If a sub-BoM has a quantity of 4 then all the parts below must be multiplied by 4. The attached patch fixes this error.

Revision history for this message
Adam James (adam-james) wrote :
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

hello,

If a sub-BoM has a quantity of 4 then all the parts below must be multiplied by 4.

It is working if print the Product Cost Structure from product object which has BOM.It will call a wizard by taking Number of product to produce as a input and will be printed the product cost structure as multiplied of Number of product to produce.

Hope this will help you.

Thanks.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Chris Halls (halls) wrote :

I found a bug in the patch - child BoM quantities will be multiplied by the square of the quantity, instead of the quantity in the BoM. I will attach a new version of the patch.

Revision history for this message
Chris Halls (halls) wrote :
Revision history for this message
Chris Halls (halls) wrote :

In reply to vra:
> If a sub-BoM has a quantity of 4 then all the parts below must be multiplied by 4.

This is a workaround for the problem, which I still consider to be a bug. If you define, say, a BoM for a car wheel, it does not make sense to say that a wheel needs 4 tyres! This does not make sense to the users and is a real problem if you try to do costings of child BoMs.

Changed in openobject-addons:
status: Incomplete → Confirmed
Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello,

I have tested this problem with the following example.
Bill of Materials:
----------------------
Product A : 1.0 PCE
  |_ Product B : 1.0 PCE
  |_ Product C : 1.0 PCE
  |_ Product D : 1.0 PCE
        |_ Product 1 : 2.0 PCE
        |_ Product 2 : 2.0 PCE

Make a Production Order for Product A with quantity 4.0 and confirm it.
You will get the following in Products to Consume.
Product A : 4.0 PCE
  |_ Product B : 4.0 PCE
  |_ Product C : 4.0 PCE
  |_ Product 1 : 8.0 PCE
  |_ Product 2 : 8.0 PCE

When a component (e.g. Product D) has sub-components (e.g. Product 1 & Product 2), then while making a production order for the main product (e.g. Product A), there is always a consideration of sub-components and their quantities and not the component.

You can refer to the following link:
http://doc.openerp.com/book/5/5_15_Manufacturing/5_15_Manufacturing_production.html#bills-of-materials

I request to check again with the latest trunk-addons.

Hope this will be helpful.

Thanks.

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello,

With reference of comment #6, I am closing this issue.

Thanks.

Changed in openobject-addons:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.