From ff72139aff64febe0b1fd2af15704d93a58c0e55 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 7 Jan 2016 13:51:42 +0100 Subject: [PATCH] [FIX] website_sale, website_quote: pay now confirmation email When configuring the payment acquirer with the confirmation `at_pay_now`, meaning the sale order has to be confirmed when clicking on the "Pay now" button, instead of waiting for the payment confirmation, the confirmation email wasn't not sent. opw-665697 --- addons/website_quote/controllers/main.py | 2 +- addons/website_sale/controllers/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py index 81c7ef38ee7..32c87439637 100644 --- a/addons/website_quote/controllers/main.py +++ b/addons/website_quote/controllers/main.py @@ -258,6 +258,6 @@ class sale_quote(http.Controller): # confirm the quotation if tx.acquirer_id.auto_confirm == 'at_pay_now': - request.registry['sale.order'].action_button_confirm(cr, SUPERUSER_ID, [order.id], context=request.context) + request.registry['sale.order'].action_button_confirm(cr, SUPERUSER_ID, [order.id], context=dict(request.context, send_email=True)) return tx_id diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 30e4cb338b3..c52acab2845 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -780,7 +780,7 @@ class website_sale(http.Controller): # confirm the quotation if tx.acquirer_id.auto_confirm == 'at_pay_now': - request.registry['sale.order'].action_button_confirm(cr, SUPERUSER_ID, [order.id], context=request.context) + request.registry['sale.order'].action_button_confirm(cr, SUPERUSER_ID, [order.id], context=dict(request.context, send_email=True)) return tx_id