diff --git a/addons/stock/models/stock_picking.py b/addons/stock/models/stock_picking.py index f8d35c3396f..472752f5a6c 100644 --- a/addons/stock/models/stock_picking.py +++ b/addons/stock/models/stock_picking.py @@ -907,6 +907,9 @@ class Picking(models.Model): continue if picking.immediate_transfer or any(move.additional for move in picking.move_lines): picking.action_confirm() + # Make sure the reservation is bypassed in immediate transfer mode. + if picking.immediate_transfer: + picking.move_lines.write({'state': 'assigned'}) def _create_backorder(self): """ This method is called when the user chose to create a backorder. It will create a new diff --git a/addons/stock/tests/test_move2.py b/addons/stock/tests/test_move2.py index f4932803b1e..1ed13fa6141 100644 --- a/addons/stock/tests/test_move2.py +++ b/addons/stock/tests/test_move2.py @@ -1880,6 +1880,7 @@ class TestSinglePicking(TestStockCommon): 'product_uom': self.productA.uom_id.id, 'location_id': self.stock_location, 'location_dest_id': self.customer_location, + 'quantity_done': 5, })], }) self.assertEqual(delivery_order.state, 'assigned')