[FIX] website_sale: delivery and payment views
bzr revid: chm@openerp.com-20140110102858-57v9dk3hk75c5uu3
This commit is contained in:
parent
ed96693541
commit
8749e13a75
|
@ -612,12 +612,12 @@ class Ecommerce(http.Controller):
|
|||
|
||||
# if no sale order at this stage: back to checkout beginning
|
||||
order = self.get_order()
|
||||
if not order or not order.state == 'draft' or not order.order_line:
|
||||
if not order or order.state != 'draft' or not order.order_line:
|
||||
request.registry['website'].ecommerce_reset(cr, uid, context=context)
|
||||
return request.redirect("/shop/")
|
||||
# alread a transaction: forward to confirmation
|
||||
tx = context.get('website_sale_transaction')
|
||||
if tx and not tx.state == 'draft':
|
||||
if tx and tx.state != 'draft':
|
||||
return request.redirect('/shop/confirmation/%s' % order.id)
|
||||
|
||||
shipping_partner_id = False
|
||||
|
|
|
@ -1027,17 +1027,19 @@
|
|||
<div class="oe_structure"/>
|
||||
</div>
|
||||
<div class="col-md-3 col-md-offset-1 text-muted" id="right_column">
|
||||
<h4>Bill To:</h4>
|
||||
<div t-field="order.partner_invoice_id"/>
|
||||
|
||||
<h4 class="mt32">Ship To:</h4>
|
||||
<div t-field="order.partner_shipping_id"/>
|
||||
|
||||
<h4 class="mt32">Amount:</h4>
|
||||
<!--<div t-field="order.amount_total" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
}'/> -->
|
||||
<h4>Bill To:</h4>
|
||||
<div t-field="order.partner_invoice_id" t-field-options='{
|
||||
"widget": "contact",
|
||||
"fields": ["address", "name", "phone", "email"]
|
||||
}'/>
|
||||
<h4 class="mt32">Ship To:</h4>
|
||||
<t t-if="order.partner_shipping_id and order.partner_shipping_id.id != order.partner_invoice_id.id">
|
||||
<div t-field="order.partner_shipping_id" t-field-options='{
|
||||
"widget": "contact",
|
||||
"fields": ["address", "name", "phone"]
|
||||
}'/>
|
||||
</t>
|
||||
<address t-if="order.partner_shipping_id.id == order.partner_invoice_id.id">Ship to the same address</address>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<tr class="text-muted" id="order_delivery">
|
||||
<td><abbr title="Delivery will be updated after choosing a new delivery method">Delivery:</abbr></td>
|
||||
<td class="text-right">
|
||||
<span t-field="website_sale_order.amount_delivery" t-field-options='{
|
||||
<span t-field="order.amount_delivery" t-field-options='{
|
||||
"widget": "monetary",
|
||||
"display_currency": "website.pricelist_id.currency_id"
|
||||
}'/>
|
||||
|
@ -41,7 +41,7 @@
|
|||
<li t-foreach="deliveries" t-as="delivery">
|
||||
<label>
|
||||
<input t-att-value="delivery.id" type="radio" name="delivery_type"
|
||||
t-att-checked="website_sale_order.carrier_id and website_sale_order.carrier_id.id == delivery.id and 'checked' or False"/>
|
||||
t-att-checked="order.carrier_id and order.carrier_id.id == delivery.id and 'checked' or False"/>
|
||||
<span t-field="delivery.name"/>
|
||||
<span class="badge" t-field="delivery.price"
|
||||
t-field-options='{
|
||||
|
|
Loading…
Reference in New Issue