diff --git a/odoo_module_migrate/migration_scripts/migrate_170_180.py b/odoo_module_migrate/migration_scripts/migrate_170_180.py index 930ebf72..5a263cf6 100644 --- a/odoo_module_migrate/migration_scripts/migrate_170_180.py +++ b/odoo_module_migrate/migration_scripts/migrate_170_180.py @@ -100,8 +100,108 @@ def replace_user_has_groups( logger.error(f"Error processing file {file}: {str(e)}") +def remove_deprecated_kanban_click_classes( + logger, module_path, module_name, manifest_path, migration_steps, tools +): + files_to_process = tools.get_files(module_path, (".xml",)) + + replaces = { + "oe_kanban_global_click_edit": "", + "oe_kanban_global_click": "", + } + + for file in files_to_process: + try: + tools._replace_in_file( + file, + replaces, + log_message=f"Remove deprecated kanban click classes in file: {file}", + ) + except Exception as e: + logger.error(f"Error processing file {file}: {str(e)}") + + +def replace_kanban_color_picker_widget( + logger, module_path, module_name, manifest_path, migration_steps, tools +): + files_to_process = tools.get_files(module_path, (".xml",)) + + replaces = { + # Case 1: Match any ul tag containing both oe_kanban_colorpicker class and data-field + # Example: