Hello,
I need to add an attachment (product draw), saved on product master data, to the bottom of pdf report of sales order.
Is it possible and how ?
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Thanks so much , I will try it with the help of a programmer
Hi,
we can inherit the template and add the condition like
<t t-if="o.order_line">
<div class="page">
<h2>Sales Order</h2>
<!-- Other content of the report -->
<!-- Loop through order lines -->
<t t-foreach="o.order_line" t-as="line">
<div>
<h3 t-field="line.product_id.
<!-- Other line information -->
<!-- Display product drawing attachment -->
<t t-if="line.product_id.
<h4>Product Drawing:</h4>
<t t-foreach="line.product_id.
<a t-att-href="'/web/content/' + str(attachment.id) + '?download=true'" t-att-target="'_blank'">
<t t-esc="attachment.name"/>
</a>
</t>
</t>
</div>
</t>
</div>
</t>
Hope it helps
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden