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.
92 lines
4.7 KiB
92 lines
4.7 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<template id="address_column" name="Address Column">
|
|
<div class="col-12 col-xl order-xl-1 oe_cart">
|
|
<div class="row"
|
|
t-if="not only_services and not is_public_user">
|
|
<div class="col-lg-12">
|
|
<h3 class="o_page_header mt8">
|
|
Billing Address
|
|
</h3>
|
|
</div>
|
|
<!-- Call the address_kanban template for the billing address -->
|
|
<div class="col-lg-12 one_kanban">
|
|
<t t-call="website_sale.address_kanban">
|
|
<t t-set='contact'
|
|
t-value="order.partner_id"/>
|
|
<t t-set='selected' t-value="1"/>
|
|
<t t-set='readonly' t-value="1"/>
|
|
<t t-set='allow_edit' t-value="1"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
<!-- Display the shipping address header if the user is not a
|
|
public user and has permission to access the delivery/invoice address group -->
|
|
<t t-if="not only_services and not is_public_user"
|
|
groups="account.group_delivery_invoice_address">
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<h3 class="o_page_header mt16 mb4">
|
|
Shipping Address
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-12 one_kanban">
|
|
<t t-call="website_sale.address_kanban">
|
|
<t t-set='contact'
|
|
t-value="order.partner_shipping_id"/>
|
|
<t t-set='selected' t-value="1"/>
|
|
<t t-set='readonly' t-value="1"/>
|
|
<t t-set='allow_edit' t-value="1"/>
|
|
</t>
|
|
</div>
|
|
<div class="row all_shipping">
|
|
<div class="col-lg-12">
|
|
<div class="row mt8">
|
|
<!-- Display a button to add a new shipping address -->
|
|
<div class="col-md-12 col-lg-12 one_kanban">
|
|
<form action="/shop/address"
|
|
method="post"
|
|
class=''>
|
|
<input type="hidden"
|
|
name="csrf_token"
|
|
t-att-value="request.csrf_token()"
|
|
t-nocache="The csrf token must always be up to date."/>
|
|
<a role="button"
|
|
href="#"
|
|
class='a-submit btn btn-secondary mb-2 btn-block'>
|
|
<i class="fa fa-plus-square"/>
|
|
<span>
|
|
Add an address
|
|
</span>
|
|
</a>
|
|
</form>
|
|
</div>
|
|
<!-- Loop over each shipping address and call
|
|
the address_kanban template for each address -->
|
|
<t t-foreach="shippings"
|
|
t-as="ship">
|
|
<div class="col-md-12 col-lg-6 one_kanban mb-2">
|
|
<t t-call="website_sale.address_kanban">
|
|
<t t-set='contact'
|
|
t-value="ship"/>
|
|
<t t-set='selected'
|
|
t-value="order.partner_shipping_id==ship"/>
|
|
<t t-set='readonly'
|
|
t-value="bool(len(shippings)==1)"/>
|
|
<t t-set='edit_billing'
|
|
t-value="bool(ship==order.partner_id)"/>
|
|
<t t-set="allow_edit"
|
|
t-value="not order.partner_id or (ship.id in order.partner_id.child_ids.ids)"/>
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
<!-- Call the one_page_checkout.address_form template -->
|
|
<t t-call="one_page_checkout.address_form"/>
|
|
</div>
|
|
</template>
|
|
</odoo>
|
|
|