Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] upgrade_analysis: forward ports #3143

Open
wants to merge 3 commits into
base: 16.0
Choose a base branch
from
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
15 changes: 11 additions & 4 deletions upgrade_analysis/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Upgrade Analysis
================

..
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
Expand All @@ -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**

Expand Down Expand Up @@ -102,7 +109,7 @@ promote its widespread use.

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-StefanRijnhart| |maintainer-legalsylvain|
|maintainer-StefanRijnhart| |maintainer-legalsylvain|

This module is part of the `OCA/server-tools <https://github.com/OCA/server-tools/tree/16.0/upgrade_analysis>`_ project on GitHub.

Expand Down
17 changes: 14 additions & 3 deletions upgrade_analysis/models/upgrade_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,16 @@

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()
Expand All @@ -552,16 +561,18 @@
module_descriptions = {}
for module in all_modules:
status = ""
is_new = False

Check warning on line 564 in upgrade_analysis/models/upgrade_analysis.py

View check run for this annotation

Codecov / codecov/patch

upgrade_analysis/models/upgrade_analysis.py#L564

Added line #L564 was not covered by tests
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

Check warning on line 569 in upgrade_analysis/models/upgrade_analysis.py

View check run for this annotation

Codecov / codecov/patch

upgrade_analysis/models/upgrade_analysis.py#L569

Added line #L569 was not covered by tests
else:
module_description = " |del| %s" % module

if module in compare.apriori.merged_modules:
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 = (
Expand Down
8 changes: 7 additions & 1 deletion upgrade_analysis/models/upgrade_comparison_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,10 @@

def action_show_analysis(self):
self.ensure_one()
return {}
return {

Check warning on line 96 in upgrade_analysis/models/upgrade_comparison_config.py

View check run for this annotation

Codecov / codecov/patch

upgrade_analysis/models/upgrade_comparison_config.py#L96

Added line #L96 was not covered by tests
"type": "ir.actions.act_window",
"name": "Analyses",
"res_model": "upgrade.analysis",
"view_mode": "tree,form",
"domain": [("id", "in", self.analysis_ids.ids)],
}
11 changes: 9 additions & 2 deletions upgrade_analysis/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -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.
Loading