[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
This commit is contained in:
parent
6916acdb1d
commit
25c3348a1f
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue