Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/l10n_do_banks/17.0.1.0.0/pre-modules-uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ def uninstall_modules(cr):
'stock_account_product_cost_security',
'product_code_unique',
'account_ecf_auto_post',
'payroll_dynamic_xls_report',
'l10n_do_accounting_migration_scripts',
'stock_mts_mto_rule',
'account_invoice_overdue_reminder',
'mrp_analytic',
'product_export_with_images',
'serial_number_report',
'purchase_discount',
'purchase_analytic_global',
]

for module_name in modules_to_uninstall:
Expand Down
18 changes: 14 additions & 4 deletions src/l10n_do_banks/17.0.1.0.0/pre-view-delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
def migrate(cr, version):
"""
Pre-migration script to delete specific views before upgrade.

Args:
cr (cursor): Database cursor
version (str): Module version
Expand All @@ -18,13 +18,23 @@ def migrate(cr, version):
'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',
'studio_customization.odoo_studio_warranty_5e101e7c-e388-4589-b9b8-628b03ca43f1',
'studio_customization.odoo_studio_warranty_64540003-0f78-4e15-8bba-6d3475418fed',
'product_product_price_widget.product_product_tree_view_inherit_widget',
'stock_analytic.view_picking_move_tree',
'stock_analytic.view_move_tree',
'stock_analytic.view_move_form',
'stock_analytic.view_move_search_analytic',
'stock_analytic.view_picking_form_analytic',
'stock_analytic.view_move_tree_receipt_picking_inherit_analytic_account',
'stock_analytic.view_scrap_analytic_form',
'stock_analytic.view_move_line_tree',
'stock_analytic.stock_move_line_view_search',
'stock_analytic.view_move_line_detailed_tree',
]

for xml_id in views_to_delete:
Expand All @@ -42,12 +52,12 @@ def migrate(cr, version):
inherited.unlink()
except Exception as e:
_logger.warning(f'Error deleting inherited view: {e}')

# Check if this view inherits from another
if view.inherit_id:
_logger.info(f'View {xml_id} inherits from {view.inherit_id.xml_id}')
view.inherit_id = False

# Now delete the view itself
view.unlink()
_logger.info(f'Successfully deleted view: {xml_id}')
Expand Down