Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
5749 Tampilan

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
Buang

Please do not mix questions.

Jawaban Terbai

Hello

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

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

Avatar
Buang
Penulis

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

Penulis

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

Post Terkait Replies Tampilan Aktivitas
3
Sep 17
8768
0
Mar 25
975
1
Mei 24
8422
5
Apr 17
14929
1
Apr 25
1240