From d3711f2cab4dc708d3ce23e9e93920600925b8fe Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 18 Jun 2015 09:16:00 +0200 Subject: [PATCH] [FIX] website_sale: existing transaction If the transaction already exists, the amount total of the transaction must be updated. The case occured when: [1] you put a product A in the cart [2] click on "Process Checkout" and click "Confirm" [3] select Adyen or Paypal as payment method [4] click on "Pay Now" [5] return in the cart instead of paying your order [6] add a product B in the cart [7] click on "Process Checkout" and click "Confirm" [8] select Adyen or Paypal as payment method [9] click on "Pay Now" Now check the transaction payment linked to the order in backend, the total amount of the order is equal to price A + price B and the total amount of the transaction payment is equal to price A. This commit solves this problem. opw:634119 --- addons/website_sale/controllers/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py index 2d9a3926270..c106205f056 100644 --- a/addons/website_sale/controllers/main.py +++ b/addons/website_sale/controllers/main.py @@ -699,6 +699,7 @@ class website_sale(http.Controller): if tx.state == 'draft': # button cliked but no more info -> rewrite on tx or create a new one ? tx.write({ 'acquirer_id': acquirer_id, + 'amount': order.amount_total, }) tx_id = tx.id else: