Optional disable fill time column

This commit is contained in:
Кокос Артем Николаевич
2026-01-22 12:38:06 +07:00
parent e7efda232c
commit ead6c72d16
2 changed files with 20 additions and 4 deletions

View File

@@ -14,7 +14,8 @@ def format_odt(
issue_hours: List[Tuple[Issue, float]],
author: str = "",
from_date: str = "",
to_date: str = ""
to_date: str = "",
fill_time: bool = True
) -> "OpenDocument":
template_path = "template.odt"
if not os.path.exists(template_path):
@@ -132,7 +133,11 @@ def format_odt(
row.addElement(status_cell)
time_cell = TableCell(stylename=cell_style_name)
p = P(stylename=para_style_name, text=hours_to_human(hours))
if fill_time:
time_text = hours_to_human(hours)
else:
time_text = ""
p = P(stylename=para_style_name, text=time_text)
time_cell.addElement(p)
row.addElement(time_cell)