not_be = self.search(cr, uid, [('name', '!=', 'Belgique')], context=ctx)
assert be_id not in not_be, "Search match failed"
+
+ # indirect search via m2o
+ Partners = self.pool.get('res.partner')
+ agrolait = Partners.search(cr, uid, [('name', '=', 'Agrolait')])[0]
+
+ not_be = Partners.search(cr, uid, [('country_id', '!=', 'Belgium')])
+ assert agrolait not in not_be, "Search match failed (m2o)"
+
+ not_be = Partners.search(cr, uid, [('country_id', '!=', 'Belgique')], context=ctx)
+ assert agrolait not in not_be, "Search match failed (m2o)"
right = '%%%s%%' % right
inselect_operator = 'inselect'
- if operator in NEGATIVE_TERM_OPERATORS:
+ if sql_operator in NEGATIVE_TERM_OPERATORS:
# negate operator (fix lp:1071710)
- operator = operator[4:] if operator[:3] == 'not' else '='
+ sql_operator = sql_operator[4:] if sql_operator[:3] == 'not' else '='
inselect_operator = 'not inselect'
subselect = '( SELECT res_id' \