summaryrefslogtreecommitdiff
path: root/addons/sms/models
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2020-05-04 09:18:39 +0000
committerThibault Delavallée <tde@odoo.com>2020-08-18 11:41:59 +0000
commitfcd10b3691c2291f224ac5083395edf0f00fc9ee (patch)
treeb9b7535bf820959eb6e311bf72e9352dc4c1da4a /addons/sms/models
parent14a73fa1dffc50295e59cdaa4db2a8427cfcb040 (diff)
[REF] iap, various: reorganize IAP module organization
PURPOSE Clean and improve IAP tools integration in Odoo. Introduce bridge modules to extract common features, notably for CRM and Partner. SPECIFICATIONS In this commit we reorganize IAP module to better understand its content and ease future cleaning * have models separated from tools; * rename some tools to find their grep. An iap_ prefix is added to ensure we don't clash with other global functions or methods; * perform some linting; To provide backward compatibility support we keep some import in init file of IAP addon. Standard code is about to be updated but we want to avoid too much issues when migrating code to 13.5 . Compatibility layer will be removed after v14 final freeze. LINKS Task ID-2248367 Community PR odoo/odoo#53214 Enterprise PR odoo/enterprise#11258 Upgrade PR odoo/upgrade#1363 IAP PR odoo/iap-apps#191
Diffstat (limited to 'addons/sms/models')
-rw-r--r--addons/sms/models/sms_api.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/sms/models/sms_api.py b/addons/sms/models/sms_api.py
index 6856717a0c2..b1fa69dab6c 100644
--- a/addons/sms/models/sms_api.py
+++ b/addons/sms/models/sms_api.py
@@ -2,7 +2,7 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
-from odoo.addons.iap.models import iap
+from odoo.addons.iap.tools import iap_tools
DEFAULT_ENDPOINT = 'https://iap-sms.odoo.com'
@@ -17,7 +17,7 @@ class SmsApi(models.AbstractModel):
params['account_token'] = account.account_token
endpoint = self.env['ir.config_parameter'].sudo().get_param('sms.endpoint', DEFAULT_ENDPOINT)
# TODO PRO, the default timeout is 15, do we have to increase it ?
- return iap.jsonrpc(endpoint + local_endpoint, params=params)
+ return iap_tools.iap_jsonrpc(endpoint + local_endpoint, params=params)
@api.model
def _send_sms(self, numbers, message):