[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
This commit is contained in:
Goffin Simon
2015-10-26 10:16:40 +01:00
parent 3db7cc4673
commit b49e52ed04
+6
View File
@@ -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':