[FIX] expression: we dont add any restriction on the main ids
as the possible active=True/False is already present in the main domain. bzr revid: vmt@openerp.com-20111005133337-p8nvv26tlii7x253
This commit is contained in:
parent
07121a762b
commit
25a883b2aa
|
@ -500,7 +500,7 @@
|
||||||
except psycopg2.DataError:
|
except psycopg2.DataError:
|
||||||
# Should give: 'DataError: invalid input syntax for type timestamp' or similar
|
# Should give: 'DataError: invalid input syntax for type timestamp' or similar
|
||||||
cr.execute('ROLLBACK TO SAVEPOINT expression_failure_test')
|
cr.execute('ROLLBACK TO SAVEPOINT expression_failure_test')
|
||||||
|
-
|
||||||
Testing for Many2Many field with category supplier and active=False
|
Testing for Many2Many field with category supplier and active=False
|
||||||
-
|
-
|
||||||
!python {model: res.partner }: |
|
!python {model: res.partner }: |
|
||||||
|
|
|
@ -405,10 +405,6 @@ class expression(object):
|
||||||
return [value]
|
return [value]
|
||||||
return list(value)
|
return list(value)
|
||||||
|
|
||||||
active = False
|
|
||||||
for exp in self.__exp:
|
|
||||||
if exp[0] == 'active':
|
|
||||||
active = exp
|
|
||||||
i = -1
|
i = -1
|
||||||
while i + 1<len(self.__exp):
|
while i + 1<len(self.__exp):
|
||||||
i += 1
|
i += 1
|
||||||
|
@ -466,10 +462,7 @@ class expression(object):
|
||||||
# Making search easier when there is a left operand as field.o2m or field.m2m
|
# Making search easier when there is a left operand as field.o2m or field.m2m
|
||||||
if field._type in ['many2many', 'one2many']:
|
if field._type in ['many2many', 'one2many']:
|
||||||
right = field_obj.search(cr, uid, [(field_path[1], operator, right)], context=context)
|
right = field_obj.search(cr, uid, [(field_path[1], operator, right)], context=context)
|
||||||
domain = [(fargs[0],'in', right)]
|
right1 = table.search(cr, uid, [(field_path[0],'in', right)], context=dict(context, active_test=False))
|
||||||
if active:
|
|
||||||
domain.append(active)
|
|
||||||
right1 = table.search(cr, uid, domain, context=context)
|
|
||||||
self.__exp[i] = ('id', 'in', right1)
|
self.__exp[i] = ('id', 'in', right1)
|
||||||
|
|
||||||
if not isinstance(field, fields.property):
|
if not isinstance(field, fields.property):
|
||||||
|
|
Loading…
Reference in New Issue