diff --git a/addons/mrp/models/product.py b/addons/mrp/models/product.py index 682d83b7fdb..c6b1b1e0110 100644 --- a/addons/mrp/models/product.py +++ b/addons/mrp/models/product.py @@ -275,7 +275,7 @@ class ProductProduct(models.Model): # bom specific to this variant or global to template or that contains the product as a byproduct action['context'] = { 'default_product_tmpl_id': template_ids[0], - 'default_product_id': self.ids[0], + 'default_product_id': self.env.user.has_group('product.group_product_variant') and self.ids[0] or False, } action['domain'] = ['|', '|', ('byproduct_ids.product_id', 'in', self.ids), ('product_id', 'in', self.ids), '&', ('product_id', '=', False), ('product_tmpl_id', 'in', template_ids)] return action