Merge branch 'dev-7-harmonization-revision-release-3' into 'main'

[FIX] various fixes

See merge request odoo-openupgrade-wizard/odoo-openupgrade-wizard!8
This commit is contained in:
LE GAL SYLVAIN 2022-06-23 18:53:56 +00:00
commit 81fa7b909c
3 changed files with 8 additions and 8 deletions

View File

@ -46,7 +46,6 @@ def estimate_workload(ctx, analysis_file_path, extra_modules_list):
analysis.modules = sorted(analysis.modules)
# Render html file
# TODO, make
ensure_file_exists_from_template(
Path(analysis_file_path),
templates.ANALYSIS_HTML_TEMPLATE,

View File

@ -276,7 +276,7 @@ ANALYSIS_HTML_TEMPLATE = """
<tr>
<td>{{odoo_module.name}}
</td>
{% for version in odoo_module.analyse.all_version %}
{% for version in odoo_module.analyse.all_versions %}
{% set module_version = odoo_module.get_module_version(version) %}
{% if module_version %}
{% set size_text = module_version.get_size_text() %}

View File

@ -475,6 +475,9 @@ class OdooModuleVersion(object):
if self.openupgrade_state and (
self.openupgrade_state.lower().startswith("done")
or self.openupgrade_state.lower().startswith("nothing to do")
or self.openupgrade_state.lower().startswith(
"no db layout changes"
)
):
return
else:
@ -646,6 +649,9 @@ class OdooModuleVersion(object):
or self.openupgrade_state.lower().startswith(
"nothing to do"
)
or self.openupgrade_state.lower().startswith(
"no db layout changes"
)
):
return "lightgreen"
else:
@ -673,15 +679,10 @@ class OdooModuleVersion(object):
self.odoo_module.module_type == "odoo"
and self.version != self.odoo_module.analyse.initial_version
):
if self.openupgrade_state.lower().startswith(
"done"
) or self.openupgrade_state.lower().startswith(
"nothing to do"
):
if self.openupgrade_state:
return self.openupgrade_state
else:
return "To analyse"
return ""
else:
if self.state == "merged":
return "Merged into %s" % self.target_module