[IMP] estimate-workload: add total column in report
This commit is contained in:
parent
e35aa8d804
commit
a2423ec4f8
|
|
@ -65,6 +65,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
|
<th>Estimated time (min)</th>
|
||||||
{%- for odoo_version in ctx.obj['config']['odoo_versions'] -%}
|
{%- for odoo_version in ctx.obj['config']['odoo_versions'] -%}
|
||||||
<th>{{ odoo_version }}</th>
|
<th>{{ odoo_version }}</th>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
@ -87,7 +88,7 @@
|
||||||
and odoo_module.module_type != 'odoo') %}
|
and odoo_module.module_type != 'odoo') %}
|
||||||
{% set ns.current_module_type = odoo_module.module_type %}
|
{% set ns.current_module_type = odoo_module.module_type %}
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="{{1 + ctx.obj['config']['odoo_versions']|length}}">
|
<th colspan="{{2 + ctx.obj['config']['odoo_versions']|length}}">
|
||||||
{{ ns.current_module_type}}
|
{{ ns.current_module_type}}
|
||||||
</th>
|
</th>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -102,7 +103,7 @@
|
||||||
|
|
||||||
{% if ns.current_repository %}
|
{% if ns.current_repository %}
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="{{1 + ctx.obj['config']['odoo_versions']|length}}">
|
<th colspan="{{2 + ctx.obj['config']['odoo_versions']|length}}">
|
||||||
{{ ns.current_repository}}
|
{{ ns.current_repository}}
|
||||||
</th>
|
</th>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -130,6 +131,9 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
<td>{{odoo_module.workload}}</td>
|
||||||
|
|
||||||
{% for version in odoo_module.analyse.all_versions %}
|
{% 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 %}
|
||||||
|
|
|
||||||
|
|
@ -328,6 +328,13 @@ class OdooModule(object):
|
||||||
else:
|
else:
|
||||||
self.module_type = "custom"
|
self.module_type = "custom"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def workload(self):
|
||||||
|
return sum(
|
||||||
|
round(module_version.workload)
|
||||||
|
for _, module_version in self.module_versions.items()
|
||||||
|
)
|
||||||
|
|
||||||
def get_module_version(self, current_version):
|
def get_module_version(self, current_version):
|
||||||
res = self.module_versions.get(current_version, False)
|
res = self.module_versions.get(current_version, False)
|
||||||
return res
|
return res
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user