From 6f7629aba8eaac1887e48d1b346e7496080e4149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Sainl=C3=A9ger?= Date: Tue, 18 Apr 2023 09:26:35 +0200 Subject: [PATCH] [IMP] partner_profiles: remove useless fields in public profile view Hides from the partner public form view the fields and data not considered as relevant for public profile. The public profile aims to protect the contact data, but not to replace the other ones which are considered as "administrative" data. --- partner_profiles/__manifest__.py | 2 +- partner_profiles/models/res_partner.py | 2 - partner_profiles/views/res_partner_view.xml | 54 +++++++++++++++++++-- 3 files changed, 51 insertions(+), 7 deletions(-) diff --git a/partner_profiles/__manifest__.py b/partner_profiles/__manifest__.py index 0561b9f..ba116ea 100644 --- a/partner_profiles/__manifest__.py +++ b/partner_profiles/__manifest__.py @@ -3,7 +3,7 @@ { "name": "partner_profiles", - "version": "12.0.1.2.0", + "version": "12.0.2.0.0", "author": "Elabore", "website": "https://elabore.coop", "maintainer": "Stéphan Sainléger", diff --git a/partner_profiles/models/res_partner.py b/partner_profiles/models/res_partner.py index d691d45..3980df1 100644 --- a/partner_profiles/models/res_partner.py +++ b/partner_profiles/models/res_partner.py @@ -157,7 +157,6 @@ class res_partner(models.Model): if self.is_company: fields = [ "name", - "function", "phone", "mobile", "email", @@ -168,7 +167,6 @@ class res_partner(models.Model): "country_id", "zip", "is_company", - "lang", ] else: fields = ["name"] diff --git a/partner_profiles/views/res_partner_view.xml b/partner_profiles/views/res_partner_view.xml index 1f62cf2..a7476db 100644 --- a/partner_profiles/views/res_partner_view.xml +++ b/partner_profiles/views/res_partner_view.xml @@ -47,10 +47,6 @@ - - - - {'invisible': [('is_company','=', False)]} @@ -92,6 +88,56 @@ domain="[('is_company', '=', True),('is_main_profile','=', True)]" context="{'default_partner_profile': 1, 'default_is_company': True, 'show_vat': True}" /> + + + + + + {'invisible': [('is_public_profile','=', True)]} + + + {'invisible': [('is_public_profile','=', True)]} + + + {'invisible': [('is_public_profile','=', True)]} + + + + + + + + + + + + + + + {'invisible': [('is_public_profile','=', True)]} +