From 844a4cb49bfc12e5c22d327aa6f1b064c64c93e8 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Mon, 6 Apr 2020 10:51:00 +0000 Subject: [PATCH] [FIX] payment: payment acquirer disabled on uninstall When we uninstall a payment acquirer, its state should be `disabled` because when we succedingly reinstall it, we want the required_if_provider fields to possibly be unset (which is only possible if the state is not in `enabled` or `test`). opw-2223094 closes #49033 closes odoo/odoo#49061 X-original-commit: ddf07ef2d9741d1db546efb1364718ff9e247aaf Signed-off-by: Nicolas Lempereur (nle) --- addons/payment/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/payment/__init__.py b/addons/payment/__init__.py index 95d9fb1ca40..946d0a4ab5c 100644 --- a/addons/payment/__init__.py +++ b/addons/payment/__init__.py @@ -13,4 +13,5 @@ def reset_payment_provider(cr, registry, provider): acquirers.write({ 'view_template_id': acquirers._get_default_view_template_id().id, 'provider': 'manual', + 'state': 'disabled', })