From b49e52ed0468a761521505fe6366a86997943ce4 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Fri, 23 Oct 2015 13:08:28 +0200 Subject: [PATCH] [IMP] website_quote: Payment provider not set The fields "payment_acquirer_id" and "payment_tx_id" were not set in the quotation when selecting a payment method in the online quote. Inspired from function payment_transaction in addons/website_sale/controllers/main.py opw:652733 --- addons/website_quote/controllers/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/website_quote/controllers/main.py b/addons/website_quote/controllers/main.py index 847aaf3ae91..81c7ef38ee7 100644 --- a/addons/website_quote/controllers/main.py +++ b/addons/website_quote/controllers/main.py @@ -249,6 +249,12 @@ class sale_quote(http.Controller): 's2s_cb_eval': "self.env['sale.order']._confirm_online_quote(self.sale_order_id.id, self)" }, context=context) tx = transaction_obj.browse(cr, SUPERUSER_ID, tx_id, context=context) + # update quotation + request.registry['sale.order'].write( + cr, SUPERUSER_ID, [order.id], { + 'payment_acquirer_id': acquirer_id, + 'payment_tx_id': tx_id + }, context=context) # confirm the quotation if tx.acquirer_id.auto_confirm == 'at_pay_now':