Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Template - Adding Dates And Such

By
Luke Thurston
on 10/13/15, 6:26 AM 362 views

Here are the things I have added to odoo templates - REPORT / PICKING

<div class="col-xs-3">

<strong>Customer Order Number</strong>

<p t-field="o.sale_id.client_order_ref"/>

</div>

<div class="col-xs-3">

<strong>Estimated Delivery Date:</strong>

<p t-field="o.min_date" t-field-options='{"format": "d MMMM y"}'/>

</div>

<div class="col-xs-3">

<strong>Todays Date:</strong>

<p t-esc="time.strftime('%d %B %Y')" />

</div>

<div class="col-xs-2">

<strong>Our Ref:</strong>

<p t-field="o.origin"/>

</div>

0
Luke Thurston
On 10/13/15, 10:06 AM

ORDER / QUOTATION TEMPLATE (customer order number on the order / quotation)

<div class="row mt32 mb32" id="informations">

<div t-if="o.client_order_ref" class="col-xs-3">

<strong>Customer Order No:</strong>

<p t-field="o.client_order_ref"/>

</div>

<div t-if="o.date_order" class="col-xs-2">

<strong t-if="o.state not in ['draft','sent']">Order Date:</strong>

<strong t-if="o.state in ['draft','sent']">Quotation Date:</strong>

<p t-field="o.date_order" t-field-options='{"format": "d MMMM y"}'/>

</div>

<div t-if="o.user_id.name" class="col-xs-2">

<strong>Salesperson:</strong>

<p t-field="o.user_id.name"/>

</div>

<div t-if="o.payment_term" class="col-xs-2">

<strong>Payment Term:</strong>

<p t-field="o.payment_term"/>

</div>

<div class="col-xs-3">

<strong>Estimated Delivery Date:</strong>

<p t-field="o.requested_date" t-field-options='{"format": "d MMMM y"}'/>

</div>

<div class="col-xs-2">

<strong>Our Ref No:</strong>

<p t-field="o.name"/>

</div>

</div>


----------------------------------------------------------------------------------------------

INVOICE & DRAFT / PROFORMA. (customer order number on the template)


<div class="col-xs-3">

<strong>Customer Reference</strong>

<p><span t-field="o.name" position="after">

<!-- make sure client_order_ref has a value, or do nothing -->

<div t-if="o.sale_id.client_order_ref"><p t-field="o.sale_id.client_order_ref"/>

</div>

</span>

</p>

</div>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/13/15, 6:26 AM
Seen: 362 times
Last updated: 10/14/15, 10:09 AM