title: Get images from db by fields.function on QWeb report - Odoo 8
body: <p>I want to print an image getting it by a fields.function for any image in my database.</p>
  
  <p>I am trying the following:</p>
  
  <pre><code>def _get_image(self, cr, uid, ids, name, args, context=None):
      res = dict.fromkeys(ids)
      for record_browse in self.browse(cr, uid, ids):
          partner = self.pool.get('res.partner').browse(cr,uid,6,context=None).image
          res[record_browse.id] = base64.encodestring(partner)
      return res   
  
  _columns = {
          'image': fields.function(_get_image, string="Image", type="binary"),
  }
  </code></pre>
  
  <p>but in qweb report I got:</p>
  
  <pre><code>  File "/opt/*/openerp/addons/base/ir/ir_qweb.py", line 791, in value_to_html
  raise ValueError("Non-image binary fields can not be converted to HTML")
  ValueError: Non-image binary fields can not be converted to HTML
  </code></pre>
  
  <p>If I print the image in a form, everything is going well.</p>
  
  <p>Any help would be appreciated, thanks in advance.</p>