diff --git a/storage_media_product/models/product.py b/storage_media_product/models/product.py index 12832b70af..d8a5e5c048 100644 --- a/storage_media_product/models/product.py +++ b/storage_media_product/models/product.py @@ -46,6 +46,8 @@ class ProductMediaRelation(models.Model): sequence = fields.Integer() media_id = fields.Many2one("storage.media", required=True) + # Just to gray out relations in the tree view on the product + active = fields.Boolean(related="media_id.active") attribute_value_ids = fields.Many2many( "product.attribute.value", string="Attributes" ) diff --git a/storage_media_product/views/product.xml b/storage_media_product/views/product.xml index bed85ec77b..26a82b1474 100644 --- a/storage_media_product/views/product.xml +++ b/storage_media_product/views/product.xml @@ -40,7 +40,8 @@ product.media.relation - + +