[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user