Kirti Savalia(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-904170-ksa into
lp:openobject-addons.
Requested reviews:
Rucha (Open ERP) (rpa-openerp)
Related bugs:
Bug #904170 in OpenERP Addons: "change qty on production order ignores
quantity type of subproduct"
https://bugs.launchpad.net/openobject-addons/+bug/904170
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-904170-ksa/+merge/85817
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-904170-ksa/+merge/85817
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-904170-ksa.
=== modified file 'mrp/wizard/change_production_qty.py'
--- mrp/wizard/change_production_qty.py 2011-10-31 11:38:30 +0000
+++ mrp/wizard/change_production_qty.py 2011-12-15 09:33:30 +0000
@@ -87,8 +87,12 @@
for r in res[0]:
if r['product_id'] == move.product_id.id:
move_lines_obj.write(cr, uid, [move.id], {'product_qty' : r['product_qty']})
- for m in prod.move_created_ids:
- move_lines_obj.write(cr, uid, [m.id], {'product_qty': wiz_qty.product_qty})
+ for m in prod.move_created_ids:
+ for sub_product in prod.bom_id.sub_products:
+ if sub_product.subproduct_type == 'fixed' and sub_product.product_id.id == m.product_id.id:
+ move_lines_obj.write(cr, uid, [m.id], {'product_qty': sub_product.product_qty})
+ else:
+ move_lines_obj.write(cr, uid, [m.id], {'product_qty': wiz_qty.product_qty})
return {}
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp