[FIX] stock: move line: create batch

related to 896e36edab

Fixes #41813

closes odoo/odoo#46114

X-original-commit: e75bc034f121fd3790ebe11bb1b579e000912d2a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit is contained in:
Simon Lejeune
2020-02-24 13:58:10 +00:00
parent 78545ce0ed
commit 9104424186
+1 -2
View File
@@ -187,7 +187,7 @@ class StockMoveLine(models.Model):
vals['move_id'] = new_move.id
mls = super(StockMoveLine, self).create(vals_list)
for ml in mls:
for ml, vals in zip(mls, vals_list):
if ml.move_id and \
ml.move_id.picking_id and \
ml.move_id.picking_id.immediate_transfer and \
@@ -213,7 +213,6 @@ class StockMoveLine(models.Model):
next_moves = ml.move_id.move_dest_ids.filtered(lambda move: move.state not in ('done', 'cancel'))
next_moves._do_unreserve()
next_moves._action_assign()
return mls
def write(self, vals):