mrp_subproduct bad calculation

Bug #445267 reported by Omar (Pexego)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

Hello,

I test mrp_subproduct module and I see in code an error on subproduct product_qty and product_uos_qty calculation: i.e:

Source:

qty1 = sub_product.product_qty
qty2 = production.product_uos and production.product_uos_qty or False
if sub_product.subproduct_type=='variable':
    if production.product_qty:
        qty1 *= production.product_qty / (sub_product.product_qty or 1.0)
    if production.product_uos_qty:
        qty2 *= production.product_uos_qty / (sub_product.product_qty or 1.0)

If subproduct_type is variable and subproduct_qty is 2 and production_qty = 50, result on subproduct_qty is 50 (2 *= 50 / 2) but real result will be 100. In product_uos_qty tghe result is more poor yet. I attached one patch.

If subproduct type is fixed and subproduct.product_qty = 3 and then I produce 50 on production.product_qty the result is 3 not calculate, it can be well.

Related branches

Revision history for this message
Omar (Pexego) (omar7r) wrote :
sme (OpenERP) (sme-tiny)
Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Thank you for reporting.

It has been fixed by revision 2428 <email address hidden>.

Changed in openobject-addons:
status: Confirmed → Fix Released
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.