December 2018
Beginner to intermediate
404 pages
10h 14m
English
The QWeb template is added using a data file. We can use the existing library_website/views/checkout_template.xml data file for that and add the following code:
<odoo><template id="index" name="Checkout List">
<t t-call="website.layout">
<div id="wrap" class="container">
<h1>Checkouts</h1>
<!-- List of Checkouts -->
<t t-foreach="docs" t-as="doc">
<div class="row">
<input type="checkbox" disabled="True"
t-att-checked="'checked' if doc.stage_id.fold else None" />
<a t-attf-href="/checkout/{{slug(doc)}}">
<h3 t-field="doc.request_date"
t-att-class=" 'text-strikeout' if doc.stage_id.fold
else ''" />
</a>
</div>
</t>
</div>
</t>
</template></odoo>
The preceding code uses the t-foreach directive to iterate through ...
Read now
Unlock full access