Is it possible to put product images in Reporting of Sales, Purchase and Inventory Analysis.
I need product image along with product title when I drill down on products.
Can anyone help me how to modify reporting query and xml structure to display two attributes(image, title) of products.
You just need to add below line in order line or invoice line table,
<img t-if="l.product_id.image" t-att-src="'data:image/png;base64,%s' % l.product_id.image" style="width:90px; height:90px;"/>
where, l is,
<t t-foreach="o.invoice_line" t-as="l"> or <t t-foreach="o.order_line" t-as="l">
if you want to add product title and image using xml than,
<table class="table table-bordered">
<tr t-foreach="o.invoice_line" t-as="l">
<td><img t-if="l.product_id.image" t-att-src="'data:image/png;base64,%s' % l.product_id.image" style="width:90px; height:90px;"/></td>
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 11/2/15, 12:53 AM|
|Seen: 452 times|
|Last updated: 11/7/15, 1:06 PM|