From b159dba32fe7138f74171b014e3ff849b668d7a9 Mon Sep 17 00:00:00 2001 From: Christopher Rogos Date: Tue, 12 Nov 2024 14:48:20 +0000 Subject: [PATCH] [IMP] partner_firstname: adapt to partner_type_base changes --- partner_firstname/__manifest__.py | 2 +- .../migrations/18.0.1.2.0/pre-migration.py | 5 ++ partner_firstname/views/res_partner.xml | 52 +++++-------------- 3 files changed, 18 insertions(+), 41 deletions(-) create mode 100644 partner_firstname/migrations/18.0.1.2.0/pre-migration.py diff --git a/partner_firstname/__manifest__.py b/partner_firstname/__manifest__.py index 256d9984234..e6a25e801c0 100644 --- a/partner_firstname/__manifest__.py +++ b/partner_firstname/__manifest__.py @@ -18,7 +18,7 @@ "maintainer": "Camptocamp, Acsone", "category": "Extra Tools", "website": "https://github.com/OCA/partner-contact", - "depends": ["base_setup"], + "depends": ["base_setup", "partner_type_base"], "post_init_hook": "post_init_hook", "data": [ "views/base_config_view.xml", diff --git a/partner_firstname/migrations/18.0.1.2.0/pre-migration.py b/partner_firstname/migrations/18.0.1.2.0/pre-migration.py new file mode 100644 index 00000000000..0e6c3461e41 --- /dev/null +++ b/partner_firstname/migrations/18.0.1.2.0/pre-migration.py @@ -0,0 +1,5 @@ +from odoo.upgrade import util + + +def migrate(cr, version): + util.force_install_module(cr, "partner_type_base") diff --git a/partner_firstname/views/res_partner.xml b/partner_firstname/views/res_partner.xml index 01c1ba8d250..387cd3957e4 100644 --- a/partner_firstname/views/res_partner.xml +++ b/partner_firstname/views/res_partner.xml @@ -4,25 +4,12 @@ - is_company - not is_company - type == 'contact' and is_company - - - is_company == False - not is_company - type == 'contact' and is_company + is_individual - - - + + + @@ -32,54 +19,39 @@ - is_company - not is_company - type == 'contact' and is_company - - - not is_company - not is_company - type == 'contact' and is_company + is_individual
- +
- - - not is_company - is_company - +
- - +