From 9e997c7f07f9d22dd9f9c2d897ea9d5db6b2d446 Mon Sep 17 00:00:00 2001 From: Horacio Tellez Date: Wed, 2 Nov 2022 09:40:43 +0000 Subject: [PATCH] [FIX] payment: stop using the term "payment" when tokenizing All the messages on the "Payment Status" page were using the term "payment". This could cause confusion in users when saving payment methods, as a "payment" related message will appear even that no payment related transaction is ocurring. After this commit messages will use the more generic term "operation", aiding in consistency and as a bonus avoiding confusion in users. Task - 3050181 closes odoo/odoo#111868 X-original-commit: 14b5bc63a27ead3df882e5f9ebe15c0387c90844 Signed-off-by: Antoine Vandevenne (anv) Signed-off-by: Horacio Tellez Perez (hote) --- addons/payment/models/payment_transaction.py | 2 ++ .../src/xml/payment_post_processing.xml | 30 +++++++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/addons/payment/models/payment_transaction.py b/addons/payment/models/payment_transaction.py index 9fdbc8f375b..300d1466001 100644 --- a/addons/payment/models/payment_transaction.py +++ b/addons/payment/models/payment_transaction.py @@ -818,6 +818,7 @@ class PaymentTransaction(models.Model): - `state`: The transaction state: `draft`, `pending`, `authorized`, `done`, `cancel`, or `error`. - `state_message`: The information message about the state. + - `operation`: The operation of the transaction. - `is_post_processed`: Whether the transaction has already been post-processed. - `landing_route`: The route the user is redirected to after the transaction. - Additional provider-specific entries. @@ -836,6 +837,7 @@ class PaymentTransaction(models.Model): 'currency_code': self.currency_id.name, 'state': self.state, 'state_message': self.state_message, + 'operation': self.operation, 'is_post_processed': self.is_post_processed, 'landing_route': self.landing_route, } diff --git a/addons/payment/static/src/xml/payment_post_processing.xml b/addons/payment/static/src/xml/payment_post_processing.xml index abb82a7284e..5131d966110 100644 --- a/addons/payment/static/src/xml/payment_post_processing.xml +++ b/addons/payment/static/src/xml/payment_post_processing.xml @@ -6,7 +6,7 @@
-

Payments failed

+

Failed operations

+
-

Payments received

+

Operations in progress

-

Waiting for payment

+

Waiting for operations to process