summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorAntoine Prieels <anp@odoo.com>2020-10-08 09:40:45 +0000
committerAntoine Prieels <anp@odoo.com>2020-10-08 09:44:52 +0000
commit59fdb24527e6073cb3c4de5662d25d4d0cea08eb (patch)
treeef3f622ad3fc96954b2b0eef16d39c2aeb17755b /addons
parentac64af033f0bbaa698aee424a5cab85fd9b967d2 (diff)
[FIX] adyen_platforms: Sync KYC status on update
The response we get after updating data contains the new KYC status, we then update it on the adyen account so that we don't have to wait for the cron.
Diffstat (limited to 'addons')
-rw-r--r--addons/adyen_platforms/models/adyen_account.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/adyen_platforms/models/adyen_account.py b/addons/adyen_platforms/models/adyen_account.py
index a119bbcbf3e..ab6b3cff6b3 100644
--- a/addons/adyen_platforms/models/adyen_account.py
+++ b/addons/adyen_platforms/models/adyen_account.py
@@ -313,7 +313,11 @@ class AdyenAccount(models.Model):
else:
raise UserError(_("We had troubles reaching Adyen, please retry later or contact the support if the problem persists"))
- return response.get('result')
+ result = response.get('result')
+ if 'verification' in result:
+ self._update_kyc_status(result['verification'])
+
+ return result
@api.model
def _sync_adyen_cron(self):