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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký