[FIX] various fixes

This commit is contained in:
Sylvain LE GAL 2022-06-23 20:42:34 +02:00
parent 57377fe924
commit 599ba9599c
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) analysis.modules = sorted(analysis.modules)
# Render html file # Render html file
# TODO, make
ensure_file_exists_from_template( ensure_file_exists_from_template(
Path(analysis_file_path), Path(analysis_file_path),
templates.ANALYSIS_HTML_TEMPLATE, templates.ANALYSIS_HTML_TEMPLATE,

View File

@ -276,7 +276,7 @@ ANALYSIS_HTML_TEMPLATE = """
<tr> <tr>
<td>{{odoo_module.name}} <td>{{odoo_module.name}}
</td> </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) %} {% set module_version = odoo_module.get_module_version(version) %}
{% if module_version %} {% if module_version %}
{% set size_text = module_version.get_size_text() %} {% set size_text = module_version.get_size_text() %}

View File

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