[IMP] cleaning HTML
bzr revid: fp@tinyerp.com-20140101192121-5do1u5j6phntjm67
This commit is contained in:
parent
9cbe77bc90
commit
c997c0c66b
|
@ -57,13 +57,13 @@ class sale_quote(http.Controller):
|
|||
order = request.registry.get('sale.order').browse(request.cr, SUPERUSER_ID, order_id)
|
||||
assert token == order.access_token, 'Access denied, wrong token!'
|
||||
request.registry.get('sale.order').write(request.cr, self._get_partner_user(order_id), [order_id], {'state': 'manual'})
|
||||
return request.redirect("/quote/%s/%s" % (order_id, token)
|
||||
return request.redirect("/quote/%s/%s" % (order_id, token))
|
||||
|
||||
def decline(self, order_id):
|
||||
return request.registry.get('sale.order').write(request.cr, self._get_partner_user(order_id), [order_id], {'state': 'cancel'})
|
||||
|
||||
@website.route(['/quote/<int:order_id>/<token>/post'], type='http', auth="public")
|
||||
def post(self, order_id=None, token, **post):
|
||||
def post(self, order_id, token, **post):
|
||||
# use SUPERUSER_ID allow to access/view order for public user
|
||||
order = request.registry.get('sale.order').browse(request.cr, SUPERUSER_ID, order_id)
|
||||
assert token == order.access_token, 'Access denied, wrong token!'
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<template id="pricing" name="Price">
|
||||
<section id="quote">
|
||||
<section id="quote" class="container">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -34,11 +34,21 @@
|
|||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<!-- if discount, display it striked -->
|
||||
<div t-field="line.price_unit" t-field-options='{"widget": "monetary","display_currency": "website.pricelist_id.currency_id"}'/>
|
||||
<strong>
|
||||
<div t-field="line.price_unit"
|
||||
t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'
|
||||
t-att-style="line.discount and 'text-decoration: line-through' or ''"
|
||||
t-att-class="line.discount and 'text-danger' or ''"/>
|
||||
<!-- TODO: apply monetary widget formating -->
|
||||
<div t-if="line.discount">
|
||||
<t t-esc="'%.2f' % ((1-line.discount) * line.price_unit)"/>
|
||||
</div>
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<div t-field="line.price_subtotal" t-field-options='{"widget": "monetary", "display_currency": "website.pricelist_id.currency_id"}'/>
|
||||
<div
|
||||
t-field="line.price_subtotal"
|
||||
t-field-options='{"widget": "monetary", "display_currency": "quotation.pricelist_id.currency_id"}'/>
|
||||
</td>
|
||||
<td>
|
||||
<a t-href="./update_line/#{ line.id }/?order_id=#{ quotation.id }&unlink=True" class="mb8 js_update_line_json pull-right">
|
||||
|
@ -52,17 +62,22 @@
|
|||
<td><h3>Total</h3></td>
|
||||
<td class="text-left" colspan="2">
|
||||
<h3>
|
||||
<strong data-id="total_amount" t-field="quotation.amount_total" t-field-options='{"widget": "monetary","display_currency": "website.pricelist_id.currency_id"}'/>
|
||||
<strong data-id="total_amount" t-field="quotation.amount_total" t-field-options='{"widget": "monetary","display_currency": "quotation.pricelist_id.currency_id"}'/>
|
||||
</h3>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section id="terms" class="container" t-if="quotation.note">
|
||||
<h2>Terms & Conditions</h2>
|
||||
<p t-field="quotation.note"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template id="quote_status">
|
||||
<div class="btn-group btn-group-lg">
|
||||
<div class="btn-group btn-group-lg mt16 mb16">
|
||||
<a class="btn btn-success fa fa-check" type="submit" t-if="quotation.state != 'manual' and quotation.state != 'cancel'" t-href="/quote/#{ quotation.id }/accept">
|
||||
Accept
|
||||
</a>
|
||||
|
@ -112,6 +127,7 @@
|
|||
<button type="submit" t-att-id="quotation.id" class="btn btn-info">Post your Comment</button>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<template id="so_quotation" name="Product Quotation">
|
||||
<t t-call="website.layout">
|
||||
<t t-set="head">
|
||||
|
@ -147,7 +163,6 @@
|
|||
</section>
|
||||
</t>
|
||||
<t t-call="website_sale_quote.pricing"/>
|
||||
<t t-call="website_sale_quote.terms_and_conditions"/>
|
||||
<t t-call="website_sale_quote.product_recommendation"/>
|
||||
<t t-call="website_sale_quote.chatter"/>
|
||||
</div>
|
||||
|
@ -163,6 +178,7 @@
|
|||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="product_recommendation">
|
||||
<div class="container mt32" t-if="quotation.recommended_products()">
|
||||
<h3>Customers who have bought this product also bought:</h3>
|
||||
|
@ -178,19 +194,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template id="terms_and_conditions" name="Terms & Conditions">
|
||||
<section id="terms" class="tab-pane oe_section jumbotron">
|
||||
<div class="container panel panel-default tab-pane oe_section">
|
||||
<div class="row panel-body">
|
||||
<div class="text-center">
|
||||
<h2><strong>Terms & Conditions</strong></h2>
|
||||
<p class="lead" t-field="quotation.note"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<template id="so_template" name="SO Template">
|
||||
<t t-call="website.layout">
|
||||
<div class="col-xs-12 col-md-8 tab-content">
|
||||
|
@ -223,5 +226,6 @@
|
|||
</div>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue