From 9752aedb4ec3977a634299d7683c03fda7e005a6 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 23 Mar 2016 14:59:22 +0100 Subject: [PATCH] [FIX] website_sale: update partner details when reusing payment transaction When attempting to pay a cart in the ecommerce, if the customer went on the payment acquirer site (meaning, the `payment.transaction` is created in the database), then come back to the checkout form using the browser back button, and changed his customer details (address, email, phone,...), these changes in the details were not applied in the `payment.transaction` record that was being re-used. e.g. Checkout > Confirm > Choose Paypal, Pay Now > History back to the checkout and apply changes in the address > Confirm > Pay Now. --- addons/website_sale/controllers/main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 410f976dd98..e6ec0ddc785 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -733,9 +733,7 @@ class website_sale(http.Controller): tx = False tx_id = False elif tx.state == 'draft': # button cliked but no more info -> rewrite on tx or create a new one ? - tx.write({ - 'amount': order.amount_total, - }) + tx.write(dict(transaction_obj.on_change_partner_id(cr, uid, None, order.partner_id.id, context=context).get('values', {}), amount=order.amount_total)) if not tx: tx_id = transaction_obj.create(cr, SUPERUSER_ID, { 'acquirer_id': acquirer_id,