From 00a79366fd60d258665d673693ee75f23380250e Mon Sep 17 00:00:00 2001 From: Fernando Figuereo Date: Fri, 2 Jan 2026 19:01:28 -0400 Subject: [PATCH 1/2] imp(*): caribemedia considerations --- .../17.0.1.0.0/end-modules-reinstall.py | 22 +++++++++++++++++++ .../17.0.1.0.0/pre-modules-uninstall.py | 18 ++++++++++++--- .../17.0.1.0.0/pre-view-delete.py | 8 +++++-- 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 src/l10n_do_banks/17.0.1.0.0/end-modules-reinstall.py diff --git a/src/l10n_do_banks/17.0.1.0.0/end-modules-reinstall.py b/src/l10n_do_banks/17.0.1.0.0/end-modules-reinstall.py new file mode 100644 index 000000000..c4e32120f --- /dev/null +++ b/src/l10n_do_banks/17.0.1.0.0/end-modules-reinstall.py @@ -0,0 +1,22 @@ +from odoo.addons.base.maintenance.migrations import util +import logging + +_logger = logging.getLogger(__name__) + + +def reinstall_modules(cr): + modules_to_install = [ + 'web_favicon', + ] + + for module_name in modules_to_install: + if util.module_installed(cr, module_name): + _logger.info("Module already installed: %s", module_name) + continue + util.force_install_module(cr, module_name) + _logger.info("Module reinstalled: %s", module_name) + + +def migrate(cr, version): + reinstall_modules(cr) + diff --git a/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py b/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py index ee3cded9a..b4f50e8a4 100644 --- a/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py +++ b/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py @@ -130,6 +130,7 @@ def uninstall_modules(cr): 'account_invoice_migration_scripts', 'alan_customize', 'config_interface', + 'auto_backup_cm', 'database_cleanup', 'dev_sale_product_stock_restrict', 'interface_invoicing', @@ -138,6 +139,7 @@ def uninstall_modules(cr): 'payment_backend_refund', 'product_hide_sale_cost_price', 'protocol_message', + 'bpd_payroll_txt', 'qztray', 'qztray_base', 'qztray_location_labels', @@ -146,11 +148,21 @@ def uninstall_modules(cr): 'qztray_product_labels', 'qztray_product_purchase', 'required_requested_date', - 'stock_inventory_chatter' - 'cecomsa_account_followup', - 'odoo_document_invoice_report', 'stock_inventory_chatter', + 'odoo_document_invoice_report', 'cecomsa_account_followup', + 'account_check_printing_report_base', + 'base_export_manager', + 'cm_partner_aging', + 'hr_employee_id', + 'hr_payroll_cancel', + 'ncf_manager', + 'odoo_microsoft_account', + 'org_chart_premium', + 'web_domain_field', + 'web_export_view', + 'web_no_crawler', + 'web_favicon', ] for module_name in modules_to_uninstall: diff --git a/src/l10n_do_banks/17.0.1.0.0/pre-view-delete.py b/src/l10n_do_banks/17.0.1.0.0/pre-view-delete.py index 01bedfc36..fe5762d84 100644 --- a/src/l10n_do_banks/17.0.1.0.0/pre-view-delete.py +++ b/src/l10n_do_banks/17.0.1.0.0/pre-view-delete.py @@ -15,10 +15,10 @@ def migrate(cr, version): env = api.Environment(cr, SUPERUSER_ID, {}) views_to_delete = [ - 'bi_warranty_registration.warranty_details_form_view' + 'bi_warranty_registration.warranty_details_form_view', 'bi_warranty_registration.warranty_case_claims_form_view1', 'product_product_price_widget.product_product_tree_view_inherit_widget', - 'sale_stock_product_price_widget.sale_price_widgets_view', + 'sale_stock_product_price_widget.sale_price_widgets_view', 'sale_stock_qty_date_widgets.sale_stock_qty_date_widgets_view', 'product_stock_qty_date_widget.product_product_tree_view_inherit_widget_qty', 'warranty_registration_extra_features.warranty_case_claims_form_view1_inherit', @@ -30,6 +30,10 @@ def migrate(cr, version): 'professional_templates.view_sale_order_inherit_customized', 'professional_templates.view_rfq_inherit_customized', 'professional_templates.purchase_order_inherited_customized', + 'purchase_request.view_purchase_request_tree', + 'crm_claim_customizations.crm_case_claims_tree_view_customization_inherit', + 'crm_claim_service.crm_claim_telco_form_view_inherit', + 'crm_claim_service.crm_case_claims_form_view_inherit', ] for xml_id in views_to_delete: From b4c62ccf7c4e505b84486d2ae2093186f1ec6326 Mon Sep 17 00:00:00 2001 From: DanielAPereyraB Date: Fri, 9 Jan 2026 21:43:58 -0400 Subject: [PATCH 2/2] ref(upgrade-utils): improve pre-modules-uninstall migration with enhanced logging and error handling --- .../17.0.1.0.0/pre-modules-uninstall.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py b/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py index 4ab2d8cc2..09d9b4800 100644 --- a/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py +++ b/src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py @@ -182,5 +182,17 @@ def uninstall_modules(cr): def migrate(cr, version): - _cleanup_qztray_data(cr) - uninstall_modules(cr) + _logger.info("=== Starting pre-modules-uninstall migration ===") + try: + _logger.info("Step 1: Running qztray cleanup...") + _cleanup_qztray_data(cr) + _logger.info("Step 2: qztray cleanup completed, starting module uninstallation...") + uninstall_modules(cr) + _logger.info("=== Pre-modules-uninstall migration completed successfully ===") + except Exception as e: + _logger.error( + "=== ERROR in pre-modules-uninstall migration: %s ===", + e, + exc_info=True + ) + raise