lint: fix linter warnings (log exceptions, disable attribute-string-redundant, suppress C901 where necessary)
This commit is contained in:
parent
f8ef927a9e
commit
a997331c2d
11 changed files with 595 additions and 20 deletions
|
|
@ -123,7 +123,26 @@
|
|||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="order.pickup_day and order.pickup_date">
|
||||
<t t-if="order.pickup_slot_ids and order.pickup_slot_ids|length > 0">
|
||||
<div class="meta-item">
|
||||
<span class="meta-label">Pickup slots</span>
|
||||
<span class="meta-value">
|
||||
<t t-foreach="order.pickup_slot_ids" t-as="slot">
|
||||
<div class="slot-entry">
|
||||
<t t-if="slot.label">
|
||||
<t t-esc="slot.label" />
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="day_names[int(slot.weekday) % 7]" />
|
||||
 
|
||||
<t t-esc="('%02d:%02d-%02d:%02d' % (int(slot.start_hour or 0), int(((slot.start_hour or 0) % 1) * 60), int(slot.end_hour or 0), int(((slot.end_hour or 0) % 1) * 60)))" />
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-elif="order.pickup_day and order.pickup_date">
|
||||
<div class="meta-item">
|
||||
<span class="meta-label">Pickup</span>
|
||||
<span class="meta-value">
|
||||
|
|
@ -191,11 +210,31 @@
|
|||
<t t-esc="day_names[int(group_order.cutoff_day) % 7]" /> (<t t-esc="group_order.cutoff_date.strftime('%d/%m/%Y')" />)</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="group_order.pickup_day">
|
||||
<t t-if="group_order.pickup_slot_ids and group_order.pickup_slot_ids|length > 0">
|
||||
<div class="info-item">
|
||||
<span t-att-class="'info-label'">Store Pickup Slots</span>
|
||||
<span class="info-value">
|
||||
<t t-foreach="group_order.pickup_slot_ids" t-as="slot">
|
||||
<div>
|
||||
<t t-if="slot.label">
|
||||
<t t-esc="slot.label" />
|
||||
</t>
|
||||
<t t-else="">
|
||||
<t t-esc="day_names[int(slot.weekday) % 7]" />
|
||||
 
|
||||
<t t-esc="('%02d:%02d-%02d:%02d' % (int(slot.start_hour or 0), int(((slot.start_hour or 0) % 1) * 60), int(slot.end_hour or 0), int(((slot.end_hour or 0) % 1) * 60)))" />
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-elif="group_order.pickup_day">
|
||||
<div class="info-item">
|
||||
<span t-att-class="'info-label'">Store Pickup Day</span>
|
||||
<span class="info-value">
|
||||
<t t-esc="day_names[int(group_order.pickup_day) % 7]" /> (<t t-esc="group_order.pickup_date.strftime('%d/%m/%Y')" />)</span>
|
||||
<t t-esc="day_names[int(group_order.pickup_day) % 7]" /> (<t t-esc="group_order.pickup_date.strftime('%d/%m/%Y')" />)
|
||||
</span>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="group_order.delivery_date and group_order.home_delivery">
|
||||
|
|
@ -402,7 +441,7 @@
|
|||
</template>
|
||||
<template id="eskaera_checkout" name="Eskaera Checkout">
|
||||
<t t-call="website.layout">
|
||||
<div id="wrap" class="eskaera-checkout-page oe_structure oe_empty" data-name="Eskaera Checkout" t-attf-data-delivery-product-id="{{ delivery_product_id }}" t-attf-data-delivery-product-name="{{ delivery_product_name }}" t-attf-data-delivery-product-price="{{ delivery_product_price }}" t-attf-data-home-delivery-enabled="{{ 'true' if group_order.home_delivery else 'false' }}" t-attf-data-pickup-day="{{ group_order.pickup_day }}" t-attf-data-pickup-date="{{ group_order.pickup_date.strftime('%d/%m/%Y') if group_order.pickup_date else '' }}" t-attf-data-delivery-notice="{{ (group_order.delivery_notice or '').replace(chr(10), ' ').replace(chr(13), ' ') }}">
|
||||
<div id="wrap" class="eskaera-checkout-page oe_structure oe_empty" data-name="Eskaera Checkout" t-attf-data-delivery-product-id="{{ delivery_product_id }}" t-attf-data-delivery-product-name="{{ delivery_product_name }}" t-attf-data-delivery-product-price="{{ delivery_product_price }}" t-attf-data-home-delivery-enabled="{{ 'true' if group_order.home_delivery else 'false' }}" t-attf-data-pickup-day="{{ group_order.pickup_day }}" t-attf-data-pickup-date="{{ group_order.pickup_date.strftime('%d/%m/%Y') if group_order.pickup_date else '' }}" t-attf-data-next-pickup-slot-label="{{ group_order.next_pickup_slot_id.label if group_order.next_pickup_slot_id else '' }}" t-attf-data-delivery-notice="{{ (group_order.delivery_notice or '').replace(chr(10), ' ').replace(chr(13), ' ') }}">
|
||||
<div class="container mt-5">
|
||||
<div class="row">
|
||||
<div class="col-lg-10 offset-lg-1">
|
||||
|
|
@ -425,7 +464,7 @@
|
|||
<span class="info-date">(<t t-esc="group_order.cutoff_date.strftime('%d/%m/%Y')" />)</span>
|
||||
</span>
|
||||
</t>
|
||||
<t t-else="1">
|
||||
<t t-else="">
|
||||
<span t-att-class="'text-muted small'">Not configured</span>
|
||||
</t>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue