From 24fa11953358533199eac8956f4297519db5a3ea Mon Sep 17 00:00:00 2001 From: Valentin Chevalier Date: Fri, 11 Jun 2021 10:18:52 +0000 Subject: [PATCH] [FIX] payment: restore the delay before post-processing a transaction Since the payment post-processing cron runs every ten minutes, it is important that it ignores the transactions that were updated in the same last ten minutes. This is necessary because customers can only see the payment confirmation message for transactions that were not already post-processed. Commit 573ed74 mistakenly changed the post-processing delay from ten minutes to one minute. This commit changes it back to 10 minutes. task-2494916 closes odoo/odoo#72742 X-original-commit: 502a13b87971b0bf36493770dd3bcb4f9d9b7c2a Signed-off-by: Antoine Vandevenne (anv) Signed-off-by: Valentin Chevalier --- addons/payment/models/payment_transaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment/models/payment_transaction.py b/addons/payment/models/payment_transaction.py index ad925accf36..7691c066fcd 100644 --- a/addons/payment/models/payment_transaction.py +++ b/addons/payment/models/payment_transaction.py @@ -771,7 +771,7 @@ class PaymentTransaction(models.Model): txs_to_post_process = self if not txs_to_post_process: # Let the client post-process transactions so that they remain available in the portal - client_handling_limit_date = datetime.now() - relativedelta.relativedelta(minutes=1) + client_handling_limit_date = datetime.now() - relativedelta.relativedelta(minutes=10) # Don't try forever to post-process a transaction that doesn't go through retry_limit_date = datetime.now() - relativedelta.relativedelta(days=2) # Retrieve all transactions matching the criteria for post-processing