Community mailing list archives

community@mail.odoo.com

Re: Print image (binary field) from db on QWeb

by
Federico Manuel Echeverri Choux
- 12/18/2014 01:19:50
hello

if you see sale module, you can find this:

<div class="col-xs-4">
      <img t-if="company.logo" t-att-src="'data:image/png;base64,%s' % company.logo" style="max-height: 85px; max-width: 180px;"/>
</div>

Regards



Federico Manuel Echeverri Choux
mobile: (+521) 444-1-400683
Tel: (+52) 444-8185539
skype: echeverrifm
twitter: @echeverrifm

2014-12-17 23:50 GMT-06:00 Alejandro Perez <alejandroperezcosio@gmail.com>:
Hello developers, 

I’m trying to print an image saved on the database as a binary field on a QWeb report on Odoo 8.
There is a good use-case to try this behavior:
Print the image saved on the field ‘product_template.image' (fields.binary) on a QWeb report.

Is this possible? If so, how to reference the field from the QWeb report?

Thank you for your time and responses.

Regards
Alejandro

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe