Hi wowas, OpenERP Vietnam,
Thank you, really, for your help.
I will be more precise about my problem:
I use the code below:
cr.execute('SELECT res_company.logo_web FROM res_company')
res = cr.fetchall()
v['logo_Print'] = res[0]
I would to put in the field logo_Print, the picture that is stored in the table: res_company, field logo_web, id = one.
I think that maybe there is an fonction to translate bytea image (field in database) into binary in my python code, no?
Thnak you!
Selverine
[Edit]
Now, i try with :
cr.execute('SELECT res_company.logo_web FROM res_company')
res = cr.fetchall()
v['logoTmp'] = base64.decodestring(str(res[0]))
But still doesn't work, any idea please? How is possible to convert an "tuple" into a string? Or maybe, need i to get the picture differently?
Thank!!
See also: http://help.openerp.com/question/16735/images-in-webkit-mako-pdf-reports
<img t-att-src="widget.get_image_url(category)" />