diff options
| author | Martin Trigaux <mat@odoo.com> | 2015-01-06 18:22:54 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2015-01-06 18:24:13 +0100 |
| commit | 25c3348a1f009c2e69b68cd7abae7d340d1f57cf (patch) | |
| tree | aa7f314158beb6ed64900888ae788306d545526a | |
| parent | 6916acdb1d80da4cfa0c3f3c9e9f958b65bb41dc (diff) | |
[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
| -rw-r--r-- | addons/product/product.py | 4 |
1 files changed, 3 insertions, 1 deletions
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, |
