Skip to Content
Menu
This question has been flagged
1688 Views

I want to show the Product / Product variant image in Proforma Invoice
I try to modify

Reports / Quotation / Order / Views / report_saleorder_document

<t t-if="not line.display_type">
<td name="td_name"><span t-field="line.name"/></td>
<td name="td_img_src">

<img t-if="line.product_id.image_small" t-att-src="'data:image/jpg;base64,%s' % (line.product_id.image_small,)" style="max-height:45pt;max-width:90%"/>

</td>
<td name="td_quantity" class="text-right">
<span t-field="line.product_uom_qty"/>
<span t-field="line.product_uom" groups="uom.group_uom"/>
</td>
<td name="td_priceunit" class="text-right">
<span t-field="line.price_unit"/>
</td>
<td t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span t-field="line.discount"/>
</td>
<td name="td_taxes" class="text-right">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_id))"/>
</td>
<td name="td_subtotal" class="text-right o_price_total">
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
</td>
</t>

But it has error occur. How can I do it?

Peter

Avatar
Discard
Related Posts Replies Views Activity
4
May 24
10071
1
Apr 24
1562
0
Nov 23
525
1
Sep 23
565
2
Aug 23
2422