From a26ff947ff2b499d2371ea8a777627824adc26db Mon Sep 17 00:00:00 2001 From: Valentin Chevalier Date: Mon, 25 Oct 2021 08:50:34 +0000 Subject: [PATCH] [FIX] payment: show the specific message for authorized transactions When a customers paid a transaction through the `/payment/pay` route and the transaction was authorized, the message for confirmed transactions would be shown on the `/payment/confirmation` route instead of the one specific to authorized transactions. task-2527323 closes odoo/odoo#78843 Signed-off-by: Antoine Vandevenne (anv) --- addons/payment/controllers/portal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/payment/controllers/portal.py b/addons/payment/controllers/portal.py index b3b7a32e3bc..2ce5049b0ed 100644 --- a/addons/payment/controllers/portal.py +++ b/addons/payment/controllers/portal.py @@ -392,7 +392,10 @@ class PaymentPortal(portal.CustomerPortal): elif tx_sudo.state == 'pending': status = 'warning' message = tx_sudo.acquirer_id.pending_msg - elif tx_sudo.state in ('authorized', 'done'): + elif tx_sudo.state == 'authorized': + status = 'success' + message = tx_sudo.acquirer_id.auth_msg + elif tx_sudo.state == 'done': status = 'success' message = tx_sudo.acquirer_id.done_msg elif tx_sudo.state == 'cancel':