hunk.code_window:             production = wizard.mo_id
               produced = sum(production.move_finished_ids.mapped('quantity_done'))
               if wizard.product_qty < produced:
                   raise UserError(_("You have already processed %d. Please input a quantity higher than %d ")%(produced, produced))
               production.write({'product_qty': wizard.product_qty})
               bom_point = production.bom_id
               factor = self.env['product.uom']._compute_qty(production.product_uom_id.id, production.product_qty - production.qty_produced, production.bom_id.product_uom_id.id) / production.bom_id.product_qty
               boms, lines = production.bom_id.explode(production.product_id, factor, picking_type=production.bom_id.picking_type_id)
               for line, line_data in lines:
                   production._update_raw_move(line, line_data)
  
hunk.labels: keep keep keep keep keep replace replace keep keep keep
hunk.after_edit:             factor = production.product_uom_id._compute_quantity(production.product_qty - production.qty_produced, production.bom_id.product_uom_id) / production.bom_id.product_qty
  
hunk.file_path: addons/mrp/wizard/change_production_qty.py
hunk.type: replace
file: France, 2015-02-07
  
  I hereby agree to the terms of the Odoo Individual Contributor License
  Agreement v1.0.
  
  I declare that I am authorized and able to make this agreement and sign this
  declaration.
  
  Signed,
  
  Christophe Combelles ccomb@free.fr https://github.com/ccomb
  