[FIX] purchase: purchase kit product

The issue solved with 24eee9d7ba was introduced back with
7333f5e9b8.

opw-808056
This commit is contained in:
Nicolas Martinelli
2018-02-02 13:26:45 +01:00
committed by Nicolas Martinelli
parent 76665df0cf
commit dccdff2539
+1 -1
View File
@@ -357,11 +357,11 @@ class PurchaseOrder(models.Model):
picking = self.env['stock.picking'].create(res)
moves = order.order_line.filtered(lambda r: r.product_id.type in ['product', 'consu'])._create_stock_moves(picking)
move_ids = moves.action_confirm()
moves = self.env['stock.move'].browse(move_ids)
seq = 0
for move in sorted(moves, key=lambda move: move.date_expected):
seq += 5
move.sequence = seq
moves = self.env['stock.move'].browse(move_ids)
moves.force_assign()
return True