diff options
| author | Harry (OpenERP) <hmo@tinyerp.com> | 2011-02-22 10:57:39 +0530 |
|---|---|---|
| committer | Harry (OpenERP) <hmo@tinyerp.com> | 2011-02-22 10:57:39 +0530 |
| commit | 2effe90a19ed94a652b3367bcb9d3e42ef0fcbbc (patch) | |
| tree | d606181554a75293638a8af4ef94b856367e4ec3 /addons/document/nodes.py | |
| parent | da05e220826b2c52ef1448454674d8e27b8e8b0b (diff) | |
| parent | 91c1768528c3ae07305bf5cf460b40bd1b9b6c00 (diff) | |
[MERGE] merged from trunk-addons-development branch
bzr revid: hmo@tinyerp.com-20110222052739-jjyzcrqv0pr29qwq
Diffstat (limited to 'addons/document/nodes.py')
| -rw-r--r-- | addons/document/nodes.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/document/nodes.py b/addons/document/nodes.py index 1b7aebcd389..0c4194847c1 100644 --- a/addons/document/nodes.py +++ b/addons/document/nodes.py @@ -23,6 +23,7 @@ import pooler from tools.safe_eval import safe_eval +from tools.misc import ustr import errno # import os import time @@ -808,7 +809,7 @@ class node_res_dir(node_class): return res[0] return None - def _child_get(self, cr, name = None, domain=None): + def _child_get(self, cr, name=None, domain=None): """ return virtual children of resource, based on the foreign object. @@ -868,7 +869,7 @@ class node_res_dir(node_class): # Escape the name for characters not supported in filenames res_name = res_name.replace('/','_') # any other weird char? - if name and (res_name != name): + if name and (res_name != ustr(name)): # we have matched _ to any character, but we only meant to match # the special ones. # Eg. 'a_c' will find 'abc', 'a/c', 'a_c', may only @@ -1044,7 +1045,7 @@ class node_res_obj(node_class): if not res_name: continue res_name = res_name.replace('/', '_') - if name and (res_name != name): + if name and (res_name != ustr(name)): continue # TODO Revise klass = directory.get_node_class(directory, dynamic=True, context=ctx) |
