Odoo18-Base/addons/payment_payumoney/__init__.py
2025-03-10 11:12:23 +07:00

25 lines
697 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import controllers
from . import models
from odoo.exceptions import UserError
from odoo.tools import config
from odoo.addons.payment import setup_provider, reset_payment_provider
def pre_init_hook(cr):
if not any(config.get(key) for key in ('init', 'update')):
raise UserError(
"This module is deprecated and cannot be installed. "
"Consider installing the Payment Provider: Razorpay module instead.")
def post_init_hook(cr, registry):
setup_provider(cr, registry, 'payumoney')
def uninstall_hook(cr, registry):
reset_payment_provider(cr, registry, 'payumoney')