Skip to content

Commit

Permalink
[FIX] mrp: should not take into account done lines in produce wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
jco-odoo committed Sep 20, 2017
1 parent 296fefd commit 818ef1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/mrp/wizard/mrp_product_produce.py
Expand Up @@ -38,7 +38,7 @@ def default_get(self, fields):
lines = []
for move in production.move_raw_ids.filtered(lambda x: (x.product_id.tracking != 'none') and x.state not in ('done', 'cancel') and x.bom_line_id):
qty_to_consume = todo_quantity / move.bom_line_id.bom_id.product_qty * move.bom_line_id.product_qty
for move_line in move.move_line_ids:
for move_line in move.move_line_ids.filtered(lambda ml: not ml.lot_produced_id):
if float_compare(qty_to_consume, 0.0, precision_rounding=move.product_uom.rounding) < 0:
break
to_consume_in_line = min(qty_to_consume, move_line.product_uom_qty)
Expand Down

0 comments on commit 818ef1a

Please sign in to comment.