From 15805173c84192f668364ad7834b0403f3a92348 Mon Sep 17 00:00:00 2001 From: Nicolas JEUDY Date: Sat, 3 Dec 2016 13:31:44 +0100 Subject: [PATCH] [FIX] fixes on lastest comments - better readability - remove tags --- .../models/res_partner.py | 6 ++---- .../views/res_partner.xml | 10 ---------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/partner_contact_in_several_companies/models/res_partner.py b/partner_contact_in_several_companies/models/res_partner.py index b33d486e6..cc8e57406 100644 --- a/partner_contact_in_several_companies/models/res_partner.py +++ b/partner_contact_in_several_companies/models/res_partner.py @@ -28,10 +28,8 @@ class ResPartner(models.Model): @api.multi @api.depends('contact_id') def _get_contact_type(self): - for record in self: - record.contact_type = record.contact_id \ - and 'attached' \ - or 'standalone' + for rec in self: + rec.contact_type = 'attached' if rec.contact_id else 'standalone' def _basecontact_check_context(self, mode): """ Remove 'search_show_all_positions' for non-search mode. diff --git a/partner_contact_in_several_companies/views/res_partner.xml b/partner_contact_in_several_companies/views/res_partner.xml index 003e4e03f..4cd6906c8 100644 --- a/partner_contact_in_several_companies/views/res_partner.xml +++ b/partner_contact_in_several_companies/views/res_partner.xml @@ -1,7 +1,5 @@ - - res.partner.select.contact res.partner @@ -123,12 +121,6 @@ - - -