__init__.py 697 B

12345678910111213141516171819202122232425
  1. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  2. from . import controllers
  3. from . import models
  4. from odoo.exceptions import UserError
  5. from odoo.tools import config
  6. from odoo.addons.payment import setup_provider, reset_payment_provider
  7. def pre_init_hook(cr):
  8. if not any(config.get(key) for key in ('init', 'update')):
  9. raise UserError(
  10. "This module is deprecated and cannot be installed. "
  11. "Consider installing the Payment Provider: Razorpay module instead.")
  12. def post_init_hook(cr, registry):
  13. setup_provider(cr, registry, 'payumoney')
  14. def uninstall_hook(cr, registry):
  15. reset_payment_provider(cr, registry, 'payumoney')