Community mailing list archives

community@mail.odoo.com

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

by
Alejandro Perez Cosio
- 12/19/2014 22:22:09
Thank you! it worked with your approach

On Dec 19, 2014, at 8:04 AM, PaRaMzZZ... <sahotaparamjitsingh@gmail.com> wrote:

Hello,
It can be done like this 

<img t-att-src="'data:image/png;base64,%s' % o.product_template.image"/>

On Thu, Dec 18, 2014 at 11:52 AM, Alejandro Perez <alejandroperezcosio@gmail.com> wrote:
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



--
-PaRaMzZZ...

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