diff options
| author | Jay (Open ERP) <jvo@tinyerp.com> | 2010-01-05 17:33:39 +0530 |
|---|---|---|
| committer | Jay (Open ERP) <jvo@tinyerp.com> | 2010-01-05 17:33:39 +0530 |
| commit | 3a6fa4870d49870e109653e6840e069dfd9f0c49 (patch) | |
| tree | 4643e227cb503f46bfc7f34c2ab15f4016652278 /bin/osv/expression.py | |
| parent | 0c66024a14393fa09c6a834f90c79c94027d6282 (diff) | |
[FIX] Search : searching translated fields made possible(related,one2many,many2many)
lp bug: https://launchpad.net/bugs/503278 fixed
bzr revid: jvo@tinyerp.com-20100105120339-qdmw9xfkvcr09x0e
Diffstat (limited to 'bin/osv/expression.py')
| -rw-r--r-- | bin/osv/expression.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/osv/expression.py b/bin/osv/expression.py index 135559706ba..a78bf3ca9f5 100644 --- a/bin/osv/expression.py +++ b/bin/osv/expression.py @@ -157,7 +157,7 @@ class expression(object): # values in the database, so we must ignore it : we generate a dummy leaf self.__exp[i] = self.__DUMMY_LEAF else: - subexp = field.search(cr, uid, table, left, [self.__exp[i]]) + subexp = field.search(cr, uid, table, left, [self.__exp[i]], context=context) # we assume that the expression is valid # we create a dummy leaf for forcing the parsing of the resulting expression self.__exp[i] = '&' @@ -172,7 +172,7 @@ class expression(object): # Applying recursivity on field(one2many) if operator == 'child_of': if isinstance(right, basestring): - ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], 'like', limit=None)] + ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], 'like', context=context, limit=None)] else: ids2 = list(right) if field._obj != working_table._name: @@ -186,7 +186,7 @@ class expression(object): if right: if isinstance(right, basestring): - ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, limit=None)] + ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, context=context, limit=None)] operator = 'in' else: if not isinstance(right,list): @@ -213,7 +213,7 @@ class expression(object): #FIXME if operator == 'child_of': if isinstance(right, basestring): - ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], 'like', limit=None)] + ids2 = [x[0] for x in field_obj.name_search(cr, uid, right, [], 'like', context=context, limit=None)] else: ids2 = list(right) @@ -229,7 +229,7 @@ class expression(object): call_null_m2m = True if right: if isinstance(right, basestring): - res_ids = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator)] + res_ids = [x[0] for x in field_obj.name_search(cr, uid, right, [], operator, context=context)] operator = 'in' else: if not isinstance(right, list): |
