diff --git a/upgrade_analysis/README.rst b/upgrade_analysis/README.rst index 6dc740b49c2..33c4c460ec2 100644 --- a/upgrade_analysis/README.rst +++ b/upgrade_analysis/README.rst @@ -2,7 +2,7 @@ Upgrade Analysis ================ -.. +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! @@ -28,9 +28,16 @@ Upgrade Analysis |badge1| |badge2| |badge3| |badge4| |badge5| -This module provides the tool to generate the database analysis files that indicate how the Odoo data model and module data have changed between two versions of Odoo. Database analysis files for the core modules are included in the OpenUpgrade distribution so as a migration script developer you will not usually need to use this tool yourself. If you do need to run your analysis of a custom set of modules, please refer to the documentation here: https://doc.therp.nl/openupgrade/analysis.html +This module provides the tool to generate the database analysis files that indicate +how the Odoo data model and module data have changed between two versions of Odoo. +Database analysis files for the core modules are included in the OpenUpgrade +distribution so as a migration script developer you will not usually need to use +this tool yourself. If you do need to run your analysis of a custom set of modules, +please refer to the documentation here: https://doc.therp.nl/openupgrade/analysis.html -This module is just a tool, a continuation of the old openupgrade_records in OpenUpgrade in previous versions. It's not recommended to have this module in a production database. +This module is just a tool, a continuation of the old openupgrade_records in +OpenUpgrade in previous versions. It's not recommended to have this module in a +production database. **Table of contents** @@ -102,7 +109,7 @@ promote its widespread use. Current `maintainers `__: -|maintainer-StefanRijnhart| |maintainer-legalsylvain| +|maintainer-StefanRijnhart| |maintainer-legalsylvain| This module is part of the `OCA/server-tools `_ project on GitHub. diff --git a/upgrade_analysis/models/upgrade_analysis.py b/upgrade_analysis/models/upgrade_analysis.py index 8d0e53aa5d9..370a3774b93 100644 --- a/upgrade_analysis/models/upgrade_analysis.py +++ b/upgrade_analysis/models/upgrade_analysis.py @@ -532,7 +532,16 @@ def generate_module_coverage_file(self, no_changes_modules): module_domain = [ ("state", "=", "installed"), - ("name", "not in", ["upgrade_analysis", "openupgrade_records"]), + ( + "name", + "not in", + [ + "upgrade_analysis", + "openupgrade_records", + "openupgrade_scripts", + "openupgrade_framework", + ], + ), ] connection = self.config_id.get_connection() @@ -552,16 +561,19 @@ def generate_module_coverage_file(self, no_changes_modules): module_descriptions = {} for module in all_modules: status = "" + is_new = False if module in all_local_modules and module in all_remote_modules: module_description = " %s" % module elif module in all_local_modules: module_description = " |new| %s" % module + is_new = True else: module_description = " |del| %s" % module - if module in compare.apriori.merged_modules: + # new modules cannot be merged/renamed in same version + if not is_new and module in compare.apriori.merged_modules: status = "Merged into %s. " % compare.apriori.merged_modules[module] - elif module in compare.apriori.renamed_modules: + elif not is_new and module in compare.apriori.renamed_modules: status = "Renamed to %s. " % compare.apriori.renamed_modules[module] elif module in compare.apriori.renamed_modules.values(): status = ( diff --git a/upgrade_analysis/models/upgrade_comparison_config.py b/upgrade_analysis/models/upgrade_comparison_config.py index 649866379af..9ba4e2b3ac8 100644 --- a/upgrade_analysis/models/upgrade_comparison_config.py +++ b/upgrade_analysis/models/upgrade_comparison_config.py @@ -93,4 +93,10 @@ def new_analysis(self): def action_show_analysis(self): self.ensure_one() - return {} + return { + "type": "ir.actions.act_window", + "name": "Analyses", + "res_model": "upgrade.analysis", + "view_mode": "tree,form", + "domain": [("id", "in", self.analysis_ids.ids)], + } diff --git a/upgrade_analysis/readme/DESCRIPTION.rst b/upgrade_analysis/readme/DESCRIPTION.rst index 1b12e675fe0..d6539b4f1a1 100644 --- a/upgrade_analysis/readme/DESCRIPTION.rst +++ b/upgrade_analysis/readme/DESCRIPTION.rst @@ -1,3 +1,10 @@ -This module provides the tool to generate the database analysis files that indicate how the Odoo data model and module data have changed between two versions of Odoo. Database analysis files for the core modules are included in the OpenUpgrade distribution so as a migration script developer you will not usually need to use this tool yourself. If you do need to run your analysis of a custom set of modules, please refer to the documentation here: https://doc.therp.nl/openupgrade/analysis.html +This module provides the tool to generate the database analysis files that indicate +how the Odoo data model and module data have changed between two versions of Odoo. +Database analysis files for the core modules are included in the OpenUpgrade +distribution so as a migration script developer you will not usually need to use +this tool yourself. If you do need to run your analysis of a custom set of modules, +please refer to the documentation here: https://doc.therp.nl/openupgrade/analysis.html -This module is just a tool, a continuation of the old openupgrade_records in OpenUpgrade in previous versions. It's not recommended to have this module in a production database. +This module is just a tool, a continuation of the old openupgrade_records in +OpenUpgrade in previous versions. It's not recommended to have this module in a +production database.