diff --git a/connector_woocommerce/__openerp__.py b/connector_woocommerce/__openerp__.py index 2c45959..0f48c43 100644 --- a/connector_woocommerce/__openerp__.py +++ b/connector_woocommerce/__openerp__.py @@ -21,7 +21,7 @@ { 'name': 'WooCommerce Connector', - 'version': '8.0.1.0.0', + 'version': '8.0.1.0.1', 'category': 'customized', 'description': """WooCommerce Connector.""", 'author': 'Tech Receptives', diff --git a/connector_woocommerce/unit/backend_adapter.py b/connector_woocommerce/unit/backend_adapter.py index b6b9c95..6073968 100755 --- a/connector_woocommerce/unit/backend_adapter.py +++ b/connector_woocommerce/unit/backend_adapter.py @@ -23,9 +23,12 @@ import logging import xmlrpclib from woocommerce import API + from openerp.addons.connector.unit.backend_adapter import CRUDAdapter from openerp.addons.connector.exception import (NetworkRetryableError, RetryableJobError) +from openerp.tools.safe_eval import safe_eval + from datetime import datetime _logger = logging.getLogger(__name__) @@ -146,9 +149,9 @@ def _call(self, method, arguments): 'false', 'False') result = result.replace('true', 'True') result = result.replace('null', 'False') - result = eval(result) + result = safe_eval(result) else: - result = eval(api.get(method).content) + result = safe_eval(api.get(method).content) except: _logger.error("api.call(%s, %s) failed", method, arguments) raise