[IMP] (website_sale_)delivery: Clean carrier form view, enlarge carrier box on payment
This commit is contained in:
committed by
Yannick Tivisse
parent
877d4b60e7
commit
bc705c0fce
@@ -65,22 +65,23 @@
|
||||
<h1>
|
||||
<field name="name" placeholder="e.g. UPS Express"/>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<group>
|
||||
<label for="delivery_type"/>
|
||||
<div>
|
||||
<field name="delivery_type" widget="radio"/>
|
||||
<label for="margin"/>
|
||||
<div>
|
||||
<field name="margin" class="oe_inline"/>%
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<button string="Install more Providers" name="install_more_provider" type="object" class="oe_link oe_edit_only"/>
|
||||
</group>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="integration_level" widget="radio" attrs="{'invisible': ['|', ('delivery_type', '=', 'fixed'), ('delivery_type', '=', 'base_on_rule')]}"/>
|
||||
<label for="margin" string="Margin on Rate"/>
|
||||
<div>
|
||||
<field name="margin" class="oe_inline"/>%
|
||||
</div>
|
||||
</group>
|
||||
</div>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Pricing" attrs="{'invisible': [('delivery_type', 'not in', ['fixed', 'base_on_rule'])]}">
|
||||
<group attrs="{'invisible':[('delivery_type', '!=', 'fixed')]}">
|
||||
@@ -99,7 +100,7 @@
|
||||
<field name="price_rule_ids" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Destination" name="destination">
|
||||
<page string="Destination Availability" name="destination">
|
||||
<group>
|
||||
<p>
|
||||
Filling this form allows you to filter delivery carriers according to the delivery address of your customer.
|
||||
|
||||
@@ -24,23 +24,25 @@
|
||||
<template id="payment_delivery" name="Delivery Costs" inherit_id="website_sale.payment">
|
||||
<xpath expr="//div[@id='payment_method']" position="before">
|
||||
<div t-if="deliveries" class="row" id="delivery_carrier">
|
||||
<div class="col-lg-5 col-sm-6">
|
||||
<div class="col-lg-7 col-sm-8">
|
||||
<h4>Choose your Delivery Method</h4>
|
||||
<ul class="list-unstyled">
|
||||
<li t-foreach="deliveries" t-as="delivery">
|
||||
<t t-if="delivery.available">
|
||||
<label>
|
||||
<input t-att-value="delivery.id" type="radio" name="delivery_type"
|
||||
t-att-checked="order.carrier_id and order.carrier_id.id == delivery.id and 'checked' or False"/>
|
||||
<abbr t-att-title="delivery.website_description"><span t-field="delivery.name"/></abbr>
|
||||
<span class="badge" t-field="delivery.price"
|
||||
t-options='{
|
||||
"widget": "monetary",
|
||||
"from_currency": delivery.product_id.company_id.currency_id,
|
||||
"display_currency": website_sale_order.currency_id
|
||||
}'/>
|
||||
<div t-field="delivery.website_description" class="text-muted"/>
|
||||
</label>
|
||||
<div id="delivery_method">
|
||||
<label>
|
||||
<input t-att-value="delivery.id" type="radio" name="delivery_type"
|
||||
t-att-checked="order.carrier_id and order.carrier_id.id == delivery.id and 'checked' or False"/>
|
||||
<abbr t-att-title="delivery.website_description"><span t-field="delivery.name"/></abbr>
|
||||
<span class="badge" t-field="delivery.price"
|
||||
t-options='{
|
||||
"widget": "monetary",
|
||||
"from_currency": delivery.product_id.company_id.currency_id,
|
||||
"display_currency": website_sale_order.currency_id
|
||||
}'/>
|
||||
<div t-field="delivery.website_description" class="text-muted"/>
|
||||
</label>
|
||||
</div>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
<field name="model">delivery.carrier</field>
|
||||
<field name="inherit_id" ref="delivery.view_delivery_carrier_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<button name="toggle_active" position="before">
|
||||
<xpath expr="//page[@name='destination']" position='after'>
|
||||
<page string="Description">
|
||||
<field name="website_description" placeholder="Description displayed on the eCommerce and on online quotations."/>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='toggle_active']" position='before'>
|
||||
<button class="oe_stat_button" name="website_publish_button" type="object" icon="fa-globe">
|
||||
<field name="website_published" widget="website_button"/>
|
||||
</button>
|
||||
</button>
|
||||
<div name="title" position="after">
|
||||
<group name="website">
|
||||
<field name="website_description" string="Description" placeholder="Description displayed on the eCommerce and on online quotations."/>
|
||||
</group>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user