From 6dc5b367398e9ede4d2500d7e1c5c73e86834f1b Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 9 Apr 2020 14:35:12 +0000 Subject: [PATCH] [FIX] stock: default picking when assign S/N - Go to Inventory > Configuration > Operation Types - In Receipt, activate 'Show Detailed Operations' - Go Inventory > Overview, click on 'Receipts' - Create a picking, and in the 'Operations' tab add 5 units of a product tracked by unique S/N - Click on the + sign - Set the First SN (e.g. TEST001) and Number of SN to 5, then Assign Serial Numbers Nothing appear in the Detailed Operations, and it's impossible to validate the picking. The stock move lines are created, but not linked with the picking. opw-2230913 closes odoo/odoo#49383 X-original-commit: 55ffc3027d26a36fc390d5efefa2d743cdc3e09f Signed-off-by: Nicolas Martinelli (nim) --- addons/stock/models/stock_move.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index 38f2d11f830..5df92d3ffb6 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -914,6 +914,7 @@ class StockMove(models.Model): else: location_dest = self.location_dest_id._get_putaway_strategy(self.product_id) move_line_vals = { + 'picking_id': self.picking_id.id, 'location_dest_id': location_dest.id or self.location_dest_id.id, 'location_id': self.location_id.id, 'product_id': self.product_id.id,