# Part of Odoo. See LICENSE file for full copyright and licensing details.

from . import controllers
from . import models
from . import wizard


def post_init_hook(env):
    from odoo.addons.fusion_poynt import const
    provider = env.ref('fusion_poynt.payment_provider_poynt', raise_if_not_found=False)
    if provider:
        provider._setup_provider('poynt')


def uninstall_hook(env):
    provider = env.ref('fusion_poynt.payment_provider_poynt', raise_if_not_found=False)
    if provider:
        provider.write({'state': 'disabled', 'is_published': False})
