diff --git a/bemade_sethy_configuration/__manifest__.py b/bemade_sethy_configuration/__manifest__.py index da5c4cf..3787b0d 100644 --- a/bemade_sethy_configuration/__manifest__.py +++ b/bemade_sethy_configuration/__manifest__.py @@ -32,6 +32,7 @@ 'data/partner_relation_type_data.xml', 'data/company_data.xml', 'views/res_partner_relation_views.xml', + 'views/property_view.xml', # 'views/membership_membership_line.xml', 'views/res_partner_views.xml', diff --git a/bemade_sethy_configuration/models/res_partner.py b/bemade_sethy_configuration/models/res_partner.py index aa31830..1f10477 100644 --- a/bemade_sethy_configuration/models/res_partner.py +++ b/bemade_sethy_configuration/models/res_partner.py @@ -132,4 +132,3 @@ class ResPartner(models.Model): partner.category_id |= property_tag else: partner.category_id -= property_tag - diff --git a/bemade_sethy_configuration/static/icon.png b/bemade_sethy_configuration/static/description/icon.png similarity index 100% rename from bemade_sethy_configuration/static/icon.png rename to bemade_sethy_configuration/static/description/icon.png diff --git a/bemade_sethy_configuration/views/property_view.xml b/bemade_sethy_configuration/views/property_view.xml new file mode 100644 index 0000000..bda88ac --- /dev/null +++ b/bemade_sethy_configuration/views/property_view.xml @@ -0,0 +1,26 @@ + + + + + + + Properties + res.partner + tree,form + [('is_property','=',True)] + + + + + \ No newline at end of file diff --git a/bemade_sethy_configuration/views/res_partner_views.xml b/bemade_sethy_configuration/views/res_partner_views.xml index afa7588..6bdcf19 100644 --- a/bemade_sethy_configuration/views/res_partner_views.xml +++ b/bemade_sethy_configuration/views/res_partner_views.xml @@ -14,50 +14,51 @@ + required="type == 'contact'" + invisible="is_company == False or is_property" + /> + invisible="is_property == False"/> - {'invisible': [('is_property','=', True)]} + is_property == True - {'invisible': [('is_property','=', True)]} + is_property == True - {'invisible': [('is_property','=', True)]} + is_property == True - {'invisible': [('is_property','=', True)]} + is_property == True - {'invisible': [('is_property','=', True)]} + is_property == True - + @@ -66,11 +67,11 @@ - + + invisible="1"/> - + @@ -114,17 +115,22 @@ - - - - - - + + res.partner.select + res.partner + + + + + + - - - + + + + + \ No newline at end of file