Browse Source

[FIX] product_image_olbs : fix when not image are found

sebastien beau 13 years ago
parent
commit
b3c5f3fda7
  1. 7
      product_images_olbs/product.py

7
product_images_olbs/product.py

@ -36,8 +36,11 @@ class product_product(osv.osv):
img_obj = self.pool.get('product.images')
for id in ids:
image_id = self.get_main_image(cr, uid, id, context=context)
image = img_obj.browse(cr, uid, image_id, context=context)
res[id] = image.file
if image_id:
image = img_obj.browse(cr, uid, image_id, context=context)
res[id] = image.file
else:
res[id] = False
return res
_columns = {

Loading…
Cancel
Save