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

I am trying to format the middle data row set where it lists date, sales person, etc on v13 Sales Order / Quote report. On v10 it used class="col-xs-3" on the end instead of class="col-auto mw-100 mb-2" in v13 and it auto spaced the line equally across the row. Obviously just tried popping v10 values but it doesn't work correctly.

Also, I included commitment_date into the table but the time is showing up. How to I hide the time on the reports?

<div class="row mt32 mb32" id="informations">
<div t-if="doc.client_order_ref" class="col-auto mw-100 mb-2">
<strong>Your Reference:</strong>
<p class="m-0" t-field="doc.client_order_ref"/>
</div>
<div t-if="doc.date_order" class="col-auto mw-100 mb-2">
<strong>Order Date:</strong>
<p class="m-0" t-field="doc.date_order"/>
</div>
<div t-if="doc.date_order and doc.state in ['draft','sent']" class="col-auto mw-100 mb-2">
<strong>Quotation Date:</strong>
<p class="m-0" t-field="doc.date_order" t-options="{"widget": "date"}"/>
</div>
<div t-if="doc.validity_date and doc.state in ['draft', 'sent']" name="expiration_date" class="col-auto mw-100 mb-2">
<strong>Expiration:</strong>
<p class="m-0" t-field="doc.validity_date"/>
</div>
<div t-if="doc.commitment_date and doc.state not in ['draft','sent']" class="col-auto mw-100 mb-2">
<strong>Ship Date:</strong>
<p class="m-0" t-field="doc.commitment_date"/>
</div>
<div t-if="doc.user_id.name" class="col-auto mw-100 mb-2">
<strong>Salesperson:</strong>
<p class="m-0" t-field="doc.user_id"/>
</div>
<div class="col-auto mw-100 mb-2">
<strong><span t-if="doc.state not in ['draft','sent']">Order: </span>
<span t-if="doc.state in ['draft','sent']">Quotation: </span></strong>
<p class="m-0" t-field="doc.name"/>
</div>
</div>

Avatar
Vazgeç

Please do not mix questions.

En İyi Yanıt

Hello

To print only date into qweb you can try this following code

t-esc="doc.commitment_date.strftime('%d/%m/%Y')"

Avatar
Vazgeç
Üretici

That worked! Brilliant. Don't know why you would want time on sales order... Strange that quote and expiration automatically don't show time.

Üretici

Any idea on spacing? v10 auto centered all of that row. v13 seems to be placing everything right.

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Eyl 17
8768
0
Mar 25
974
1
May 24
8419
5
Nis 17
14927
1
Nis 25
1240