details: https://code.tryton.org/tryton/commit/cd597ed62d56
branch: default
user: Cédric Krier <[email protected]>
date: Thu Mar 05 10:49:11 2026 +0100
description:
Do not show empty web shop URL for product
Closes #14650
diffstat:
modules/web_shop/product.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (17 lines):
diff -r 9c009cac1512 -r cd597ed62d56 modules/web_shop/product.py
--- a/modules/web_shop/product.py Tue Mar 03 19:48:24 2026 +0100
+++ b/modules/web_shop/product.py Thu Mar 05 10:49:11 2026 +0100
@@ -36,7 +36,12 @@
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):