Skip to content
Snippets Groups Projects
Commit b2ab0a8d authored by Goffin Simon's avatar Goffin Simon
Browse files

[FIX] mrp: MO with a serial numbers

Steps to reproduce:

1. Create two products A and B that require a serial number
2. Create a product C with no trcking
3. Create a BOM for a A with two components B an C
4. Create a MO for A with  qty > 1
5. Check availabiltity and produce the first A
6. Record the SN for the first assembly

Bug: When producing the second assembly, it was not possible to
record the SN for the components.

opw:741316
parent 77e7799d
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ class MrpProductProduce(models.TransientModel):
lines = []
existing_lines = []
for move in production.move_raw_ids.filtered(lambda x: (x.product_id.tracking != 'none') and x.state not in ('done', 'cancel')):
if not move.move_lot_ids:
if not move.move_lot_ids.filtered(lambda x: not x.lot_produced_id):
qty = quantity / move.bom_line_id.bom_id.product_qty * move.bom_line_id.product_qty
if move.product_id.tracking == 'serial':
while float_compare(qty, 0.0, precision_rounding=move.product_uom.rounding) > 0:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment