You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

49 lines
2.2 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<!--Xpath expression specified to replace or remove the original shipping
method template in website payment page.-->
<template id="delivery_form" name="Shipping Methods"
inherit_id="website_sale.delivery_form">
<xpath expr="//ul[@id='o_delivery_methods']" position="replace">
<div class="alert alert-danger d-none" role="alert" id="NoShippingMethod">
<h4>
Sorry, we are unable to ship your order
</h4>
No shipping method is available for the selected payment
method, kindly choose any other, or please contact us for more
information.
</div>
<ul t-if="delivery_methods" id="o_delivery_methods" class="list-group">
<t t-foreach="delivery_methods" t-as="dm">
<li name="o_delivery_method" class="list-group-item delivery_method_list text-muted o_outline d-none"
t-att-id="'delivery_method_%i' % dm.id">
<t t-log="dm.id"/>
<t t-call="website_sale.delivery_method">
<t t-set="is_selected" t-value="dm.id == selected_dm_id"/>
</t>
</li>
</t>
</ul>
</xpath>
</template>
<!-- Xpath expression specified to remove the original delivery methods template
in Delivery page. -->
<template id="checkout" inherit_id="website_sale.checkout">
<xpath expr="//t[@t-call='website_sale.delivery_form']" position="replace">
<t/>
</xpath>
</template>
<!-- Xpath expression specified to replace the delivery methods template
in Payment page. -->
<template id="payment" inherit_id="website_sale.payment">
<xpath expr="//div[@id='oe_structure_website_sale_payment_1']" position="after">
<div class="oe_structure clearfix mt-3 mb-4">
<t t-call="website_sale.delivery_form">
<t t-set="selected_dm_id" t-value="order.carrier_id.id"/>
</t>
</div>
</xpath>
</template>
</odoo>