[FIX] stock: unreserve quants before assignment
Make sure to unreserve all quants before assignment. Indeed, the method makes this assumption and does not take into account any existing reserved quants. Therefore, without this fix, there is a possibility to reserve more than needed. opw-653904
This commit is contained in:
committed by
Josse Colpaert
parent
43e8e92c81
commit
a4194005be
@@ -2345,6 +2345,7 @@ class stock_move(osv.osv):
|
||||
main_domain = {}
|
||||
todo_moves = []
|
||||
operations = set()
|
||||
self.do_unreserve(cr, uid, [x.id for x in self.browse(cr, uid, ids, context=context) if x.reserved_quant_ids and x.state in ['confirmed', 'waiting', 'assigned']], context=context)
|
||||
for move in self.browse(cr, uid, ids, context=context):
|
||||
if move.state not in ('confirmed', 'waiting', 'assigned'):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user