[FIX] website_quote: accept button wasn't shown if no expiration date was set on the sale order

This commit is contained in:
Damien Bouvy 2015-04-16 16:15:08 +02:00
parent 88260a3f2c
commit 0d591ca6df
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ class sale_quote(http.Controller):
'message': message and int(message) or False, 'message': message and int(message) or False,
'option': bool(filter(lambda x: not x.line_id, order.options)), 'option': bool(filter(lambda x: not x.line_id, order.options)),
'order_valid': (not order.validity_date) or (now <= order.validity_date), 'order_valid': (not order.validity_date) or (now <= order.validity_date),
'days_valid': max(days, 0) 'days_valid': days,
} }
return request.website.render('website_quote.so_quotation', values) return request.website.render('website_quote.so_quotation', values)

View File

@ -156,9 +156,9 @@
<template id="quotation_toolbar"> <template id="quotation_toolbar">
<div class="text-center hidden-print" t-if="quotation.state in ('draft', 'sent', 'waiting_date')"> <div class="text-center hidden-print" t-if="quotation.state in ('draft', 'sent', 'waiting_date')">
<a class="btn btn-success fa fa-check" data-toggle="modal" data-target="#modelaccept" <a class="btn btn-success" data-toggle="modal" data-target="#modalaccept"
t-if="days_valid"> t-if="days_valid &gt;= 0">
Accept <i class="fa fa-check"></i> Accept
</a> </a>
<a class="btn btn-info fa fa-comment" type="submit" href="#discussion"> <a class="btn btn-info fa fa-comment" type="submit" href="#discussion">
Feedback Feedback