From a82ca09a53a3c2aeb9b06bec2ad0a3265817ea81 Mon Sep 17 00:00:00 2001 From: scampbell Date: Mon, 27 Apr 2020 11:24:46 -0700 Subject: [PATCH] [IMP] Formatting --- partner_multi_relation/models/res_partner.py | 14 +++++++------- partner_multi_relation/views/res_partner.xml | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/partner_multi_relation/models/res_partner.py b/partner_multi_relation/models/res_partner.py index 05ea382b7..2dc15cf37 100644 --- a/partner_multi_relation/models/res_partner.py +++ b/partner_multi_relation/models/res_partner.py @@ -175,13 +175,13 @@ class ResPartner(models.Model): @api.multi def action_view_relations(self): for contact in self: - relation_ids = self.env['res.partner.relation.all'].\ - search(['|', ('this_partner_id', '=', contact.id), - ('other_partner_id', '=', contact.id)]) - action = self.env.\ - ref('partner_multi_relation.action_res_partner_relation_all').\ - read()[0] - action['context'] = {} + relation_model = self.env['res.partner.relation.all'] + relation_ids = relation_model.search(['|', + ('this_partner_id', '=', contact.id), + ('other_partner_id', '=', contact.id)]) + action = self.env.ref( + 'partner_multi_relation.action_res_partner_relation_all' + ).read()[0] action['domain'] = [('id', 'in', relation_ids.ids)] action['context'].\ update({'search_default_this_partner_id': contact.id, diff --git a/partner_multi_relation/views/res_partner.xml b/partner_multi_relation/views/res_partner.xml index f3977c86d..b522f49d8 100644 --- a/partner_multi_relation/views/res_partner.xml +++ b/partner_multi_relation/views/res_partner.xml @@ -25,9 +25,9 @@ type="object" class="oe_stat_button" icon="fa-users"> - +