diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py index af0115aa9a227ad51a5718939f83f47faee719fb..5c4e279b79390ad343bd198e63063df5cceffad3 100644 --- a/addons/website_quote/controllers/main.py +++ b/addons/website_quote/controllers/main.py @@ -53,7 +53,7 @@ class sale_quote(http.Controller): 'tx_id': tx_id, 'tx_state': tx.state if tx else False, 'tx_post_msg': tx.acquirer_id.post_msg if tx else False, - 'need_payment': not tx_id and order.state == 'manual', + 'need_payment': order.invoice_status == 'to invoice' and (not tx or tx.state in ['draft', 'cancel', 'error']), 'token': token, }