Skip to content
Snippets Groups Projects
Commit 73072272 authored by Denis Ledoux's avatar Denis Ledoux
Browse files

[FIX] mrp: do not reset back stock moves to confirm

For instance, setting a BOM Phantom with:
Finished product: stockable, MTO Manufacture
Components: stockable, MTS, Buy. Inventory set to 1000
Stock moves of components are directly set to assigned once the procurement confirmed thanks to JIT
The stock moves should not be set back to confirmed after they have been assigned
parent c0d838dd
Branches
Tags
No related merge requests found
......@@ -160,9 +160,11 @@ class StockPicking(osv.osv):
def action_explode(self, cr, uid, move_ids, *args):
"""Explodes moves by expanding kit components"""
move_obj = self.pool.get('stock.move')
todo = move_ids[:]
todo = list(super(StockPicking, self).action_explode(cr, uid, move_ids, *args))
for move in move_obj.browse(cr, uid, move_ids):
todo.extend(move_obj._action_explode(cr, uid, move))
result = move_obj._action_explode(cr, uid, move)
moves = move_obj.browse(cr, uid, result)
todo.extend(move.id for move in moves if move.state not in ['confirmed', 'assigned', 'done'])
return list(set(todo))
StockPicking()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment