From bb8f7bf9c3ef6f924912682802f02b1638212231 Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Mon, 11 Sep 2017 10:53:23 -0700 Subject: [PATCH] [IMP] stock: set default product_id for new lots When creating them through the Serial/Lot Number stat button on the product variant. --- addons/stock/models/product.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index 6a17b6d3870..6c3fb36856c 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -365,7 +365,7 @@ class Product(models.Model): self.ensure_one() action = self.env.ref('stock.action_production_lot_form').read()[0] action['domain'] = [('product_id', '=', self.id)] - action['context'] = {} + action['context'] = {'default_product_id': self.id} return action @api.multi