From 25c3348a1f009c2e69b68cd7abae7d340d1f57cf Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 6 Jan 2015 18:22:54 +0100 Subject: [PATCH] [FIX] product: avoid name_get with empty () Products with a seller name but no attributes (only one variant) got their name in the format 'seller name ()' Fixes #4523 --- addons/product/product.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/product/product.py b/addons/product/product.py index a5eee93b0e3..1197e9c318c 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -1040,7 +1040,9 @@ class product_product(osv.osv): sellers = filter(lambda x: x.name.id in partner_ids, product.seller_ids) if sellers: for s in sellers: - seller_variant = s.product_name and "%s (%s)" % (s.product_name, variant) or False + seller_variant = s.product_name and ( + variant and "%s (%s)" % (s.product_name, variant) or s.product_name + ) or False mydict = { 'id': product.id, 'name': seller_variant or name,