From 4d388cfff115286338327ef76350601a77070b6e Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Thu, 29 Jan 2015 17:13:07 +0100 Subject: [PATCH] [FIX] search in res.partner.relation.type to support translated searches --- partner_relations/model/res_partner.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/partner_relations/model/res_partner.py b/partner_relations/model/res_partner.py index 3372407aa..288802f50 100644 --- a/partner_relations/model/res_partner.py +++ b/partner_relations/model/res_partner.py @@ -103,8 +103,14 @@ class ResPartner(orm.Model): relation_type_selection_ids.append(arg[2]) else: relation_type_selection_ids = relation_type_selection\ - .search(cr, uid, [('name', arg[1], arg[2])], - context=context) + .search( + cr, uid, + [ + '|', + ('type_id.name', arg[1], arg[2]), + ('type_id.name_inverse', arg[1], arg[2]), + ], + context=context) if not relation_type_selection_ids: result = AND([result, [FALSE_LEAF]])