[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
This commit is contained in:
parent
139de23ce9
commit
d3711f2cab
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue