From ad5d5e949c8a707e17cfc4b753e84751ef55717c Mon Sep 17 00:00:00 2001 From: Christopher Rogos Date: Thu, 28 Nov 2024 18:42:43 +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 | 10 ++++ partner_firstname/views/res_partner.xml | 52 +++++-------------- 3 files changed, 23 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..05ab104fccc --- /dev/null +++ b/partner_firstname/migrations/18.0.1.2.0/pre-migration.py @@ -0,0 +1,10 @@ +import logging + +from odoo.upgrade import util + +_logger = logging.getLogger(__name__) + + +def migrate(cr, version): + _logger.info("Installing dependent module 'partner_type_base' by migration script.") + 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 - +
- - +