[IMP] stock: set default product_id for new lots

When creating them through the Serial/Lot Number stat button on the
product variant.
This commit is contained in:
Joren Van Onder
2017-09-11 18:18:41 -07:00
parent 011d6acbe9
commit bb8f7bf9c3
+1 -1
View File
@@ -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