|
@ -20,18 +20,12 @@ |
|
|
# |
|
|
# |
|
|
############################################################################### |
|
|
############################################################################### |
|
|
|
|
|
|
|
|
from openerp import fields, api, models, _ |
|
|
|
|
|
|
|
|
from openerp import api, models, _ |
|
|
from openerp.exceptions import Warning |
|
|
from openerp.exceptions import Warning |
|
|
import urllib |
|
|
import urllib |
|
|
import logging |
|
|
import logging |
|
|
_logger = logging.getLogger(__name__) |
|
|
_logger = logging.getLogger(__name__) |
|
|
|
|
|
|
|
|
try: |
|
|
|
|
|
from SOAPpy import WSDL |
|
|
|
|
|
except: |
|
|
|
|
|
_logger.warning("ERROR IMPORTING SOAPpy, if not installed, please install" |
|
|
|
|
|
"it: e.g.: apt-get install python-soappy") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class smsclient(models.Model): |
|
|
class smsclient(models.Model): |
|
|
_inherit = "sms.smsclient" |
|
|
_inherit = "sms.smsclient" |
|
@ -66,8 +60,8 @@ class smsclient(models.Model): |
|
|
gateway = data.gateway |
|
|
gateway = data.gateway |
|
|
if gateway: |
|
|
if gateway: |
|
|
if not self._check_permissions(gateway): |
|
|
if not self._check_permissions(gateway): |
|
|
raise Warning(_('You have no permission to access %s ') |
|
|
|
|
|
% (gateway.name,)) |
|
|
|
|
|
|
|
|
raise Warning(_('You have no permission to access %s ') % |
|
|
|
|
|
(gateway.name, )) |
|
|
url = gateway.url |
|
|
url = gateway.url |
|
|
name = url |
|
|
name = url |
|
|
if gateway.method == 'ovh http': |
|
|
if gateway.method == 'ovh http': |
|
|