Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5743 Zobrazení

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
Zrušit

Please do not mix questions.

Nejlepší odpověď

Hello

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

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

Avatar
Zrušit
Autor

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

Autor

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

Related Posts Odpovědi Zobrazení Aktivita
3
zář 17
8767
0
bře 25
971
1
kvě 24
8414
5
dub 17
14918
1
dub 25
1239