Initial commit
This commit is contained in:
3
disable_iap_calls/models/__init__.py
Normal file
3
disable_iap_calls/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from . import iap_account
|
||||
|
||||
20
disable_iap_calls/models/iap_account.py
Normal file
20
disable_iap_calls/models/iap_account.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Disable all IAP external API calls for local development
|
||||
|
||||
import logging
|
||||
from odoo import api, models
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class IapAccountDisabled(models.Model):
|
||||
_inherit = 'iap.account'
|
||||
|
||||
@api.model
|
||||
def get_credits(self, service_name):
|
||||
"""
|
||||
DISABLED: Return fake unlimited credits
|
||||
"""
|
||||
_logger.info("IAP get_credits DISABLED - returning unlimited credits for %s", service_name)
|
||||
return 999999
|
||||
|
||||
Reference in New Issue
Block a user