Showing posts with label insert. Show all posts
Showing posts with label insert. Show all posts

Thursday 3 May 2012

To Display image in openerp Report

                                                                                                              Pinakin Nayi
                                                                                                              OpenERP,
                                                                                                              Info-city, Gandhinagar.
                                                                                                              nayi_pinakin@yahoo.in
                                                                                                              Mo. 08460643746
To Display Image in your .rml Report in OpenERP
in .rml file
<para>[[ images['image'] and setTag('para','image') or removeParentNode('para') ]][[ images['preview'] ]]</para>
in the report.py
def _get_imagepath(self,order):
        attach_ids = self.pool.get('product.images').search(self.cr, self.uid, [('product_id', '=',order)])
        datas = self.pool.get('product.images').read(self.cr, self.uid, attach_ids)
        return datas