Commit d2d55904 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

rename the reporting tool time_weight as time_coverage

parent 7c2c9087
""" List controllers """
from plugin_dbui import Selector
from reporting_tools import get_header, set_period, Time_weigth
from reporting_tools import get_header, set_period, Time_coverage
def hardware():
......@@ -57,7 +57,7 @@ def people():
query = (query) & (q)
# define virtual field to be added in the report via extra columns
db.history.time_weigth = Field.Virtual(Time_weigth(selector).process)
db.history.time_coverage = Field.Virtual(Time_coverage(selector).process)
# select the records
rows = db(query).select(db.categories.usual,
......
......@@ -17,6 +17,7 @@
'contains': 'contiens',
'Controller': 'Controller',
'Cost': 'Coût',
'Coverage': 'Coverage',
'database schema': 'schéma de la base de données',
'Defined a year or a time period !!!': 'Defined a year or a time period !!!',
'Definition': 'Définition',
......
......@@ -54,10 +54,12 @@ def set_period(selector):
selector[field] = s[:s.find('T')]
class Time_weigth(object):
"""Tool to compute the fraction of time the person has been
active during the time period. The period is defined by the
user via a selector.
class Time_coverage(object):
"""Tool to compute the fraction of time covers by a person
during the selected time period. The fractio is equal to one
for a full coverage.
The start and end date of the period is defined via a selector.
"""
......
......@@ -11,9 +11,9 @@
'width': ''}
# add a columns with the virtual field time_weight
time_weight = {'label': T('Time'),
time_weight = {'label': T('Coverage'),
'class': '',
'content': lambda row, rc: row.history.time_weigth,
'content': lambda row, rc: row.history.time_coverage,
'selected': False,
'width': ''}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment