From 8459f66ca348678256e86614f5cc1a2d1371846e Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Fri, 6 Feb 2015 13:58:54 +0100 Subject: [PATCH] [FIX] actually do something useful with != --- partner_relations/model/res_partner.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/partner_relations/model/res_partner.py b/partner_relations/model/res_partner.py index 4a29cc63d..369fd52ad 100644 --- a/partner_relations/model/res_partner.py +++ b/partner_relations/model/res_partner.py @@ -101,6 +101,17 @@ class ResPartner(orm.Model): if arg[1] == '=' and isinstance(arg[2], (long, int)): relation_type_selection_ids.append(arg[2]) + elif arg[1] == '!=' and isinstance(arg[2], (long, int)): + type_id, is_inverse = relation_type_selection\ + .get_type_from_selection_id( + cr, uid, arg[2]) + result = OR([ + result, + [ + ('relation_all_ids.type_id', '!=', type_id), + ] + ]) + continue else: relation_type_selection_ids = relation_type_selection\ .search(