From 4d8cd37f8492d889517fac7c0ee848800459d3bc 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 | 5 +- .../migrations/18.0.1.2.0/pre-migration.py | 10 ++++ partner_firstname/views/res_partner.xml | 52 +++++-------------- 3 files changed, 24 insertions(+), 43 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..39ddb1ab755 100644 --- a/partner_firstname/__manifest__.py +++ b/partner_firstname/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Partner first name and last name", "summary": "Split first name and last name for non company partners", - "version": "18.0.1.1.0", + "version": "18.0.1.2.0", "author": "Camptocamp, " "Grupo ESOC IngenierĂ­a de Servicios, " "Tecnativa, " @@ -15,10 +15,9 @@ "DynApps NV, " "Odoo Community Association (OCA)", "license": "AGPL-3", - "maintainer": "Camptocamp, Acsone", "category": "Extra Tools", "website": "https://github.com/OCA/partner-contact", - "depends": ["base_setup"], + "depends": ["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 - +
- - +