[CLN] website_sale: templates cleanup

* indentation
* coherence of singled/double quotes

Part-of: odoo/odoo#130378
This commit is contained in:
Victor Feyens
2023-08-03 19:31:22 +02:00
parent ee578df21b
commit 9d347f3f9d
2 changed files with 45 additions and 35 deletions
+33 -26
View File
@@ -2325,30 +2325,37 @@
<template id="total">
<div id="cart_total" t-att-class="extra_class or ''" t-if="website_sale_order and website_sale_order.website_order_line">
<table class="table mb-0">
<tr id="empty">
<t t-if='not no_rowspan'><td rowspan="10" class="border-0"/></t>
<td class="col-md-2 col-3 border-0"></td>
<td class="col-md-2 col-3 border-0" ></td>
</tr>
<tr id="order_total_untaxed">
<td class="text-end border-0">Subtotal:</td>
<td class="text-xl-end border-0" >
<span t-field="website_sale_order.amount_untaxed" class="monetary_field" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
</td>
</tr>
<tr id="order_total_taxes">
<td class="text-end border-0">Taxes:</td>
<td class="text-xl-end border-0">
<span t-field="website_sale_order.amount_tax" class="monetary_field" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}" />
</td>
</tr>
<tr id="order_total">
<td class="text-end border-top border-bottom-0"><strong>Total:</strong></td>
<td class="text-xl-end border-top border-bottom-0">
<strong t-field="website_sale_order.amount_total" class="monetary_field"
t-options='{"widget": "monetary", "display_currency": website_sale_order.currency_id}'/>
</td>
</tr>
<tr id="empty">
<td t-if="not no_rowspan" rowspan="10" class="border-0"/>
<td class="col-md-2 col-3 border-0"/>
<td class="col-md-2 col-3 border-0"/>
</tr>
<tr id="order_total_untaxed">
<td class="text-end border-0">Subtotal:</td>
<td class="text-xl-end border-0">
<span t-field="website_sale_order.amount_untaxed"
class="monetary_field"
style="white-space: nowrap;"
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
</td>
</tr>
<tr id="order_total_taxes">
<td class="text-end border-0">Taxes:</td>
<td class="text-xl-end border-0">
<span t-field="website_sale_order.amount_tax"
class="monetary_field"
style="white-space: nowrap;"
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
</td>
</tr>
<tr id="order_total">
<td class="text-end border-top border-bottom-0"><strong>Total:</strong></td>
<td class="text-xl-end border-top border-bottom-0">
<strong t-field="website_sale_order.amount_total"
class="monetary_field"
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
</td>
</tr>
</table>
</div>
</template>
@@ -2357,8 +2364,8 @@
<xpath expr="//div[@id='cart_total']//table/tr[last()]" position="after">
<tr t-if="not hide_promotions">
<td colspan="3" class="text-center text-xl-end border-0">
<span class=''>
<t t-set='force_coupon' t-value="website_sale_order.pricelist_id.code or request.params.get('code_not_available')"/>
<span class="">
<t t-set="force_coupon" t-value="website_sale_order.pricelist_id.code or request.params.get('code_not_available')"/>
<t t-if="not force_coupon">
<a href="#" class="show_coupon">I have a promo code</a>
</t>
@@ -2,17 +2,20 @@
<odoo>
<template id="cart_delivery" name="Delivery Costs" inherit_id="website_sale.total">
<xpath expr="//tr[@id='order_total_untaxed']" position="before">
<tr id="order_total_untaxed" position="before">
<tr id="order_delivery" t-if="website_sale_order and website_sale_order.carrier_id">
<td class="text-end border-0 text-muted" title="Delivery will be updated after choosing a new delivery method">Delivery:</td>
<td class="text-xl-end border-0 text-muted" >
<span t-field="website_sale_order.amount_delivery" class="monetary_field" style="white-space: nowrap;" t-options='{
"widget": "monetary",
"display_currency": website_sale_order.currency_id,
}'/>
</td>
<td class="text-end border-0 text-muted"
title="Delivery will be updated after choosing a new delivery method">
Delivery:
</td>
<td class="text-xl-end border-0 text-muted" >
<span t-field="website_sale_order.amount_delivery"
class="monetary_field"
style="white-space: nowrap;"
t-options='{"widget": "monetary", "display_currency": website_sale_order.currency_id}'/>
</td>
</tr>
</xpath>
</tr>
</template>
<template id="payment_delivery_methods">