[FIX] stock: create backorder for all pickings in a batch
Create two pickings, add them to a batch. Set a quantity less than the order to done on each. Confirm and set to done. A wizard asks if a backorder should be created. If confirmed, the first picking is done with a backorder but not the second. Since the method is in api.multi, we can simply get all pickings. opw 2004727 closes odoo/odoo#33902 Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit is contained in:
@@ -1137,7 +1137,7 @@ class StockMove(models.Model):
|
||||
.filtered(lambda p: p.quant_ids and len(p.quant_ids) > 1):
|
||||
if len(result_package.quant_ids.mapped('location_id')) > 1:
|
||||
raise UserError(_('You cannot move the same package content more than once in the same transfer or split the same package into two location.'))
|
||||
picking = moves_todo and moves_todo[0].picking_id or False
|
||||
picking = moves_todo.mapped('picking_id')
|
||||
moves_todo.write({'state': 'done', 'date': fields.Datetime.now()})
|
||||
moves_todo.mapped('move_dest_ids')._action_assign()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user