[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) <nle@odoo.com>
This commit is contained in:
Nicolas Lempereur
2020-04-06 13:26:23 +00:00
parent e1f9648021
commit 844a4cb49b
+1
View File
@@ -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',
})