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