summaryrefslogtreecommitdiff
path: root/odoo/tools/safe_eval.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2017-05-02 12:07:30 +0200
committerOlivier Dony <odo@openerp.com>2017-08-20 23:25:54 +0200
commit7dd062f83552fa8ff96224c29d60bafc001d73d3 (patch)
treed507e27e9d5daa91981e04b5aa81a802a9854a8d /odoo/tools/safe_eval.py
parent3824b5dcc13678d3985ad45ac21dcf9ac9202c20 (diff)
[FIX] P3: text model types
* remove references to basestring & unicode (use relevant pycompat helpers) * remove some str calls (either entirely or replaced by relevant helper, either text or native) * use better API to avoid unnecessary conversions * remove some XML declarations in views
Diffstat (limited to 'odoo/tools/safe_eval.py')
-rw-r--r--odoo/tools/safe_eval.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/odoo/tools/safe_eval.py b/odoo/tools/safe_eval.py
index de767fb7453..fec89fac087 100644
--- a/odoo/tools/safe_eval.py
+++ b/odoo/tools/safe_eval.py
@@ -26,6 +26,7 @@ import werkzeug
from . import pycompat
from .misc import ustr
+from . import pycompat
import odoo
@@ -267,8 +268,9 @@ _BUILTINS = {
'True': True,
'False': False,
'None': None,
+ 'bytes': bytes,
'str': str,
- 'unicode': unicode,
+ 'unicode': pycompat.text_type,
'bool': bool,
'int': int,
'float': float,