[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) <nim@odoo.com>
This commit is contained in:
Nicolas Martinelli
2020-04-10 09:58:04 +00:00
parent d970bd53fb
commit 6dc5b36739
+1
View File
@@ -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,