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.
 
 
 
 
 

233 lines
19 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template id="coffee_shop_payment_address"
inherit_id="website_sale.address"
name="Coffee Payment Address">
<xpath expr="." position="replace">
<t t-call="website.layout">
<section id="banner" class="banner-imgcart">
<div class="container wrapper ">
<div class="banner-content">
<div class="banner-text">
<p class="banner-head">Pick your</p>
<p class="banner-head">favourites</p>
</div>
</div>
</div>
</section>
<section id="my-cart" class="container wrapper">
<span class="cart-heading">Checkout</span>
</section>
<div class="border">
</div>
<div id="wrap">
<div class="container oe_website_sale py-2">
<div class="row">
<div class="col-12" style="display:none;">
<t t-call="website_sale.wizard_checkout">
<t t-set="step" t-value="20"/>
</t>
</div>
</div>
<div class="row">
<div class="col-12 col-xl-auto order-xl-2 d-none d-xl-block">
<div>
<t t-call="website_sale.cart_summary">
<t t-set="hide_promotions">True</t>
<t t-set="redirect" t-valuef="/shop/address"/>
</t>
</div>
<img src="/theme_coffee_shop/static/src/images/payment-method_69e7ec.svg" class="img-pay" alt=""/>
</div>
<div class="col-12 col-xl order-xl-1 oe_cart">
<t t-if="mode == ('new', 'billing')">
<h2 class="o_page_header mt8">
<span t-if="account_on_checkout != 'mandatory'">
Fill in your address</span>
<small class="text-muted"
t-if="account_on_checkout == 'optional'">or</small>
<a t-if="account_on_checkout != 'disabled'"
role="button"
href='/web/login?redirect=/shop/checkout'
style="margin-top: -11px">Sign in
</a>
</h2>
</t>
<t t-if="mode == ('edit', 'billing')">
<h2 class="o_page_header mt8">Your Address</h2>
</t>
<t t-if="mode[1] == 'shipping'">
<h2 class="o_page_header mt8" style="display:none;">Shipping Address</h2>
</t>
<t t-if="partner_id == website_sale_order.partner_shipping_id.id == website_sale_order.partner_invoice_id.id">
<div class="alert alert-warning"
role="alert" t-if="not only_services">
<h4 class="alert-heading">Be aware!</h4>
<p groups="account.group_delivery_invoice_address">
You are editing your <b>billing
and shipping</b> addresses at the same time!<br/>
If you want to modify your shipping address, create a <a href='/shop/address'>new address</a>.
</p>
</div>
</t>
<t t-if="error" t-foreach="error.get('error_message', [])" t-as="err">
<h5 class="text-danger" t-esc="err"/>
</t>
<div>
<form t-if="account_on_checkout != 'mandatory' or not is_public_user"
action="/shop/address" method="post"
class=" form_width checkout_autoformat">
<div class="row">
<div class="mb-3">
<input type="text" name="name"
t-attf-class="forms-input form-control #{error.get('name') and 'is-invalid' or ''}"
t-att-value="'name' in checkout and checkout['name']" placeholder='Name'/>
</div>
<div class="w-100"/>
<div t-attf-class="mb-3 #{error.get('email') and 'o_has_error' or ''} col-lg-6"
id="div_email">
<input type="email"
name="email"
t-attf-class="forms-input form-control #{error.get('email') and 'is-invalid' or ''}"
t-att-value="'email' in checkout and checkout['email']" placeholder='Email'/>
</div>
<div t-attf-class="mb-3 #{error.get('phone') and 'o_has_error' or ''} col-lg-6"
id="div_phone">
<input type="tel" name="phone"
t-attf-class="forms-input form-control #{error.get('phone') and 'is-invalid' or ''}"
t-att-value="'phone' in checkout and checkout['phone']" placeholder='Phone'/>
</div>
<t t-if="website._display_partner_b2b_fields()">
<div class="w-100"/>
<t t-set='vat_warning' t-value="'vat' in checkout and checkout['vat'] and not can_edit_vat" />
<t t-if="mode == ('new', 'billing') or (mode == ('edit', 'billing') and (can_edit_vat or 'vat' in checkout and checkout['vat']))">
<div t-attf-class="mb-3 #{error.get('company_name') and 'o_has_error' or ''} col-lg-6 mb-0">
<input type="text" name="company_name"
t-attf-class="forms-input form-control #{error.get('company_name') and 'is-invalid' or ''}"
t-att-value="'commercial_company_name' in checkout and checkout['commercial_company_name'] or 'company_name' in checkout and checkout['company_name']"
t-att-readonly="'1' if vat_warning else None" placeholder='Company Name'/>
<small t-if="vat_warning" class="form-text text-muted d-block d-lg-none">Changing company name is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.</small>
</div>
<div t-attf-class="mb-3 #{error.get('vat') and 'o_has_error' or ''} col-lg-6 div_vat mb-0">
<input type="text" name="vat" t-attf-class="forms-input form-control #{error.get('vat') and 'is-invalid' or ''}"
t-att-value="'vat' in checkout and checkout['vat']"
t-att-readonly="'1' if vat_warning else None"
placeholder="TIN / VAT"/>
<small t-if="vat_warning" class="form-text text-muted d-block d-lg-none">Changing VAT number is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.</small>
</div>
<div t-if="vat_warning" class="col-12 d-none d-lg-block mb-1">
<small class="form-text text-muted">Changing company name or VAT number is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.</small>
</div>
</t>
</t>
<div class="w-100"/>
<div t-attf-class="mb-3 #{error.get('street') and 'o_has_error' or ''} col-lg-12 div_street">
<input type="text"
name="street"
t-attf-class="forms-input form-control #{error.get('street') and 'is-invalid' or ''}"
t-att-value="'street' in checkout and checkout['street']" placeholder='Street and Number'/>
</div>
<div t-attf-class="mb-3 #{error.get('street2') and 'o_has_error' or ''} col-lg-12 div_street2">
<input type="text"
name="street2"
t-attf-class="forms-input form-control #{error.get('street2') and 'is-invalid' or ''}"
t-att-value="'street2' in checkout and checkout['street2']" placeholder='Street 2'/>
</div>
<div class="w-100"/>
<t t-set='zip_city' t-value='country and [x for x in country.get_address_fields() if x in ["zip", "city"]] or ["city", "zip"]'/>
<t t-if="'zip' in zip_city and zip_city.index('zip') &lt; zip_city.index('city')">
<div t-attf-class="mb-3 #{error.get('zip') and 'o_has_error' or ''} col-md-4 div_zip">
<input type="text"
name="zip"
t-attf-class="forms-input form-control #{error.get('zip') and 'is-invalid' or ''}"
t-att-value="'zip' in checkout and checkout['zip']" placeholder='Zip Code'/>
</div>
</t>
<div t-attf-class="mb-3 #{error.get('city') and 'o_has_error' or ''} col-md-8 div_city">
<input type="text" name="city"
t-attf-class="forms-input form-control #{error.get('city') and 'is-invalid' or ''}"
t-att-value="'city' in checkout and checkout['city']" placeholder='City'/>
</div>
<t t-if="'zip' in zip_city and zip_city.index('zip') &gt; zip_city.index('city')">
<div t-attf-class="mb-3 #{error.get('zip') and 'o_has_error' or ''} col-md-4 div_zip">
<input type="text"
name="zip"
t-attf-class="forms-input form-control #{error.get('zip') and 'is-invalid' or ''}"
t-att-value="'zip' in checkout and checkout['zip']" placeholder='Zip Code'/>
</div>
</t>
<div class="w-100"/>
<div t-attf-class="mb-3 #{error.get('country_id') and 'o_has_error' or ''} col-lg-6 div_country">
<select id="country_id"
name="country_id"
t-attf-class="forms-input form-select #{error.get('country_id') and 'is-invalid' or ''}"
t-att-mode="mode[1]">
<option value="">Country...</option>
<t t-foreach="countries" t-as="c">
<option t-att-value="c.id" t-att-selected="c.id == (country and country.id or -1)">
<t t-esc="c.name"/>
</option>
</t>
</select>
</div>
<div t-attf-class="mb-3 #{error.get('state_id') and 'o_has_error' or ''} col-lg-6 div_state"
t-att-style="(not country or not country.state_ids) and 'display: none'">
<select name="state_id"
t-attf-class="forms-input form-select #{error.get('state_id') and 'is-invalid' or ''}"
data-init="1">
<option value="">State / Province...</option>
<t t-foreach="country_states" t-as="s">
<option t-att-value="s.id"
t-att-selected="s.id == ('state_id' in checkout and country and checkout['state_id'] != '' and int(checkout['state_id']))">
<t t-esc="s.name"/>
</option>
</t>
</select>
</div>
<div class="w-100"/>
<t t-if="mode == ('new', 'billing') and not only_services">
<div class="col-lg-12">
<div class="checkbox">
<label>
<input type="checkbox" id='shipping_use_same' class="mr8"
name='use_same' value="1" checked='checked'/>Ship to the same address
<span class='ship_to_other text-muted'
style="display: none">
&amp;nbsp;(<i>Your shipping address will be requested later)</i>
</span>
</label>
</div>
</div>
</t>
</div>
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<input type="hidden" name="submitted" value="1"/>
<input type="hidden" name="partner_id" t-att-value="partner_id or '0'"/>
<input type="hidden" name="callback" t-att-value="callback"/>
<!-- Example -->
<input type="hidden" name="field_required" t-att-value="'phone,name'"/>
<div class="d-flex justify-content-between">
<a role="button" t-att-href="mode == ('new', 'billing') and '/shop/cart' or '/shop/checkout'"
class="btn btn-secondary mb32 form-btn catform-btn btn">
<i class="fa fa-chevron-left"/><span>Back</span>
</a>
<a role="button" href="#"
class="btn btn-primary mb32 a-submit a-submit-disable a-submit-loading form-btn catform-btn btn">
<span>Next</span><i class="fa fa-chevron-right"/>
</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<div class="border">
</div>
</t>
</xpath>
</template>
</odoo>