Skip to content
Snippets Groups Projects
Commit 58c928a7 authored by Wolfgang Taferner's avatar Wolfgang Taferner Committed by Nicolas Martinelli
Browse files

[FIX] mrp: fix unlinking of move lots for production during create_lots

Closes #17007
parent 0fab0620
Branches
Tags
No related merge requests found
......@@ -154,7 +154,7 @@ class StockMove(models.Model):
lots = self.env['stock.move.lots']
for move in self:
unlink_move_lots = move.move_lot_ids.filtered(lambda x : (x.quantity_done == 0) and not x.workorder_id)
unlink_move_lots.unlink()
unlink_move_lots.sudo().unlink()
group_new_quant = {}
old_move_lot = {}
for movelot in move.move_lot_ids:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment