From 4f4c80bd32363095e242809888644889d04f6cf0 Mon Sep 17 00:00:00 2001 From: adrien Date: Thu, 12 May 2016 17:59:36 +0200 Subject: [PATCH] Fix error : when creating a new relation between res.partner (type : Person), the view filter only relation between company, without checking the partner type, making it impossible to select relation typed for two Person --- partner_relations/model/res_partner_relation_all.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/partner_relations/model/res_partner_relation_all.py b/partner_relations/model/res_partner_relation_all.py index 59bc12bc7..53c9a6d7f 100644 --- a/partner_relations/model/res_partner_relation_all.py +++ b/partner_relations/model/res_partner_relation_all.py @@ -188,8 +188,7 @@ class ResPartnerRelationAll(models.AbstractModel): 'type_selection_id': [ '|', ('contact_type_this', '=', False), - ('contact_type_this', '=', - 'c' if self.this_partner_id else 'p'), + ('contact_type_this', '=', get_partner_type(self.this_partner_id)), '|', ('partner_category_this', '=', False), ('partner_category_this', 'in',