Skip to Content
Menu
This question has been flagged
2 Replies
4890 Views

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
Discard

Please do not mix questions.

Best Answer

Hello

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

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

Avatar
Discard
Author

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

Author

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

Related Posts Replies Views Activity
3
Sep 17
7600
1
May 24
6651
5
Apr 17
13819
4
Nov 24
5234
1
Mar 24
394