Do not show empty web shop URL for product

Closes #14650
This commit is contained in:
Cédric Krier
2026-03-05 10:49:11 +01:00
parent 199408510a
commit df3fd82299
+6 -1
View File
@@ -36,7 +36,12 @@ class ProductURL(DeactivableMixin, ModelSQL, ModelView):
shop = fields.Many2One('web.shop', "Shop", required=True)
product = fields.Many2One('product.product', "Product", required=True)
url = fields.Function(fields.Char("Shop URL"), 'get_url')
url = fields.Function(fields.Char(
"Shop URL",
states={
'invisible': ~Eval('url'),
}),
'get_url')
@classmethod
def __setup__(cls):