Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5746 Widoki

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>

Awatar
Odrzuć

Please do not mix questions.

Najlepsza odpowiedź

Hello

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

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

Awatar
Odrzuć
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.

Powiązane posty Odpowiedzi Widoki Czynność
3
wrz 17
8767
0
mar 25
972
1
maj 24
8414
5
kwi 17
14920
1
kwi 25
1239