[FIX] expression: allow exclusion of records with translated fields
[odoo/odoo.git] / openerp / addons / base / test / test_osv_expression.yml
index 3de0c92..7a8254c 100644 (file)
         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)"