Skip to content

Commit

Permalink
Merge remote-tracking branch 'odoo/7.0' into 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
OCA-git-bot committed Feb 15, 2016
2 parents 01342c3 + ce38582 commit fd6a3d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion addons/mrp/wizard/change_production_qty.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def change_prod_qty(self, cr, uid, ids, context=None):
prod_obj = self.pool.get('mrp.production')
bom_obj = self.pool.get('mrp.bom')
move_obj = self.pool.get('stock.move')
uom_obj = self.pool.get('product.uom')
for wiz_qty in self.browse(cr, uid, ids, context=context):
prod = prod_obj.browse(cr, uid, record_id, context=context)
prod_obj.write(cr, uid, [prod.id], {'product_qty': wiz_qty.product_qty})
Expand All @@ -87,7 +88,7 @@ def change_prod_qty(self, cr, uid, ids, context=None):
if not bom_id:
raise osv.except_osv(_('Error!'), _("Cannot find bill of material for this product."))

factor = prod.product_qty * prod.product_uom.factor / bom_point.product_uom.factor
factor = uom_obj._compute_qty(cr, uid, prod.product_uom.id, prod.product_qty, bom_point.product_uom.id)
product_details, workcenter_details = \
bom_obj._bom_explode(cr, uid, bom_point, factor / bom_point.product_qty, [])
product_move = dict((mv.product_id.id, mv.id) for mv in prod.picking_id.move_lines)
Expand Down

0 comments on commit fd6a3d6

Please sign in to comment.