İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
2094 Görünümler

On Odoo 16 Ent, when printing out a quotation, how to I show the lead time per product, directly under each product name/description?  I think I need to add the field "commitment date" but I'm not sure how to position it correctly on the inherited view?

Avatar
Vazgeç
En İyi Yanıt

Hi,

Try like below

<template id="leadtime_report_saleorder_document_inherit" inherit_id="sale.report_saleorder_document">
    <xpath expr="//span[@t-field='line.name']" position="after">
        <t t-if="line.order_id.commitment_date"><h6><strong class="ml16">Commitment Date:</strong> <span t-field="line.order_id.commitment_date"/></h6></t>
    </xpath>
</template>


Regards

Avatar
Vazgeç
Üretici

Thank you, this works well, however, how to hide the time, and only show the date please?

En İyi Yanıt

Karen you can use the widget option like this
<span t-field="line.order_id.commitment_date" t-options="{'widget': 'date'}"/>

Avatar
Vazgeç
Üretici

perfect thank you

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
May 20
3054
1
Nis 24
2056
0
Oca 25
1964
1
Nis 24
2234
0
Şub 24
1107