Skip to content

Commit b02b5cf

Browse files
[IMP] hr_utilization_report: pre-commit auto fixes
1 parent 1f4a62f commit b02b5cf

16 files changed

+135
-130
lines changed

hr_utilization_report/README.rst

+44-40
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,28 @@ Task Logs Utilization Report
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github
20-
:target: https://github.com/OCA/timesheet/tree/14.0/hr_utilization_report
20+
:target: https://github.com/OCA/timesheet/tree/18.0/hr_utilization_report
2121
:alt: OCA/timesheet
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/timesheet-14-0/timesheet-14-0-hr_utilization_report
23+
:target: https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-hr_utilization_report
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=14.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

3131
This module allows to generate Utilization Report from Task Logs.
3232

3333
Features:
34-
* Configure source data set
35-
* Select reported fields
36-
* Select and reorder report line grouping
37-
* Select time interval
38-
* Configure capacity format (HH:MM, HH:MM:SS, or decimal)
39-
* Configure utilization format (percentage or absolute)
40-
* View in browser, export in PDF and XLSX formats
34+
35+
- Configure source data set
36+
- Select reported fields
37+
- Select and reorder report line grouping
38+
- Select time interval
39+
- Configure capacity format (HH:MM, HH:MM:SS, or decimal)
40+
- Configure utilization format (percentage or absolute)
41+
- View in browser, export in PDF and XLSX formats
4142

4243
**Table of contents**
4344

@@ -49,67 +50,70 @@ Usage
4950

5051
To create report using Utilization Report Wizard:
5152

52-
#. Go to *Timesheets > Reporting > Utilization Report Wizard*.
53-
#. Configure the data set and click "View".
53+
1. Go to *Timesheets > Reporting > Utilization Report Wizard*.
54+
2. Configure the data set and click "View".
5455

55-
To create report using Utilization Report Wizard on a specific set of Employees:
56+
To create report using Utilization Report Wizard on a specific set of
57+
Employees:
5658

57-
#. Go to *Employees > Employees*.
58-
#. Select employees that should be used in the report
59-
#. Press the *Action > Generate Utilization Report* button
60-
#. Configure the report and export it in one of the formats
59+
1. Go to *Employees > Employees*.
60+
2. Select employees that should be used in the report
61+
3. Press the *Action > Generate Utilization Report* button
62+
4. Configure the report and export it in one of the formats
6163

62-
To create report using Utilization Report Wizard on a specific set of Departments:
64+
To create report using Utilization Report Wizard on a specific set of
65+
Departments:
6366

64-
#. Go to *Employees > Departments*.
65-
#. Select departments that should be used in the report
66-
#. Press the *Action > Generate Utilization Report* button
67-
#. Configure the report and export it in one of the formats
67+
1. Go to *Employees > Departments*.
68+
2. Select departments that should be used in the report
69+
3. Press the *Action > Generate Utilization Report* button
70+
4. Configure the report and export it in one of the formats
6871

69-
With ``project_timesheet_holidays`` module installed, leaves are not taken into
70-
account: for a single 4-hour entry on specific day with 8 working hours and
71-
4 hours of leaves, capacity would be calculated as 8 hours and utilization
72-
would be calculated as 100%.
72+
With ``project_timesheet_holidays`` module installed, leaves are not
73+
taken into account: for a single 4-hour entry on specific day with 8
74+
working hours and 4 hours of leaves, capacity would be calculated as 8
75+
hours and utilization would be calculated as 100%.
7376

74-
Without ``project_timesheet_holidays`` module installed, leaves are taken into
75-
account: for a single 4-hour entry on specific day with 8 working hours and
76-
4 hours of leaves, capacity would be calculated as 4 hours and utilization
77-
would be calculated as 100%.
77+
Without ``project_timesheet_holidays`` module installed, leaves are
78+
taken into account: for a single 4-hour entry on specific day with 8
79+
working hours and 4 hours of leaves, capacity would be calculated as 4
80+
hours and utilization would be calculated as 100%.
7881

7982
Known issues / Roadmap
8083
======================
8184

82-
* Add ``text-danger``/``text-warning`` threshold levels and reporting color,
83-
congfigurable via company settings and alterable at wizard level.
85+
- Add ``text-danger``/``text-warning`` threshold levels and reporting
86+
color, congfigurable via company settings and alterable at wizard
87+
level.
8488

8589
Bug Tracker
8690
===========
8791

8892
Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
8993
In case of trouble, please check there if your issue has already been reported.
9094
If you spotted it first, help us to smash it by providing a detailed and welcomed
91-
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_utilization_report%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
95+
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_utilization_report%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
9296

9397
Do not contact contributors directly about support or help with technical issues.
9498

9599
Credits
96100
=======
97101

98102
Authors
99-
~~~~~~~
103+
-------
100104

101105
* CorporateHub
102106

103107
Contributors
104-
~~~~~~~~~~~~
108+
------------
105109

106-
* Dhara Solanki <[email protected]>
107-
* `CorporateHub <https://corporatehub.eu/>`__
110+
- Dhara Solanki <[email protected]>
111+
- `CorporateHub <https://corporatehub.eu/>`__
108112

109-
* Alexey Pelykh <[email protected]>
113+
- Alexey Pelykh <[email protected]>
110114

111115
Maintainers
112-
~~~~~~~~~~~
116+
-----------
113117

114118
This module is maintained by the OCA.
115119

@@ -121,6 +125,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
121125
mission is to support the collaborative development of Odoo features and
122126
promote its widespread use.
123127

124-
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/14.0/hr_utilization_report>`_ project on GitHub.
128+
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/18.0/hr_utilization_report>`_ project on GitHub.
125129

126130
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

hr_utilization_report/pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- Dhara Solanki \<<[email protected]>\>
2+
- [CorporateHub](https://corporatehub.eu/)
3+
- Alexey Pelykh \<<[email protected]>\>

hr_utilization_report/readme/CONTRIBUTORS.rst

-4
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
This module allows to generate Utilization Report from Task Logs.
2+
3+
Features:
4+
- Configure source data set
5+
- Select reported fields
6+
- Select and reorder report line grouping
7+
- Select time interval
8+
- Configure capacity format (HH:MM, HH:MM:SS, or decimal)
9+
- Configure utilization format (percentage or absolute)
10+
- View in browser, export in PDF and XLSX formats

hr_utilization_report/readme/DESCRIPTION.rst

-10
This file was deleted.
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Add `text-danger`/`text-warning` threshold levels and reporting color,
2+
congfigurable via company settings and alterable at wizard level.

hr_utilization_report/readme/ROADMAP.rst

-2
This file was deleted.

hr_utilization_report/readme/USAGE.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
To create report using Utilization Report Wizard:
2+
3+
1. Go to *Timesheets \> Reporting \> Utilization Report Wizard*.
4+
2. Configure the data set and click "View".
5+
6+
To create report using Utilization Report Wizard on a specific set of
7+
Employees:
8+
9+
1. Go to *Employees \> Employees*.
10+
2. Select employees that should be used in the report
11+
3. Press the *Action \> Generate Utilization Report* button
12+
4. Configure the report and export it in one of the formats
13+
14+
To create report using Utilization Report Wizard on a specific set of
15+
Departments:
16+
17+
1. Go to *Employees \> Departments*.
18+
2. Select departments that should be used in the report
19+
3. Press the *Action \> Generate Utilization Report* button
20+
4. Configure the report and export it in one of the formats
21+
22+
With `project_timesheet_holidays` module installed, leaves are not taken
23+
into account: for a single 4-hour entry on specific day with 8 working
24+
hours and 4 hours of leaves, capacity would be calculated as 8 hours and
25+
utilization would be calculated as 100%.
26+
27+
Without `project_timesheet_holidays` module installed, leaves are taken
28+
into account: for a single 4-hour entry on specific day with 8 working
29+
hours and 4 hours of leaves, capacity would be calculated as 4 hours and
30+
utilization would be calculated as 100%.

hr_utilization_report/readme/USAGE.rst

-28
This file was deleted.

hr_utilization_report/report/hr_utilization_report.py

-1
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,6 @@ def _emit_report(self, workbook, report, report_index):
816816

817817
group_row_indices = []
818818
for group in report.group_ids:
819-
820819
if report.groupby_field_ids:
821820
group_row_indices.append(rows_emitted)
822821
rows_emitted += self._emit_group_header(

hr_utilization_report/report/hr_utilization_report.xml

+16-18
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
66
-->
77

8-
98
<template id="report_header">
109
<div class="row">
1110
<div class="col-lg-12">
@@ -334,9 +333,9 @@
334333
<template id="report_utilization">
335334
<span t-if="report.utilization_format == 'percentage'">
336335
<t
337-
t-esc="utilization_value * 100.0"
338-
t-options="{'widget': 'float', 'precision': 1}"
339-
/>%
336+
t-esc="utilization_value * 100.0"
337+
t-options="{'widget': 'float', 'precision': 1}"
338+
/>%
340339
</span>
341340
<t t-elif="report.utilization_format == 'absolute'">
342341
<span
@@ -377,7 +376,7 @@
377376

378377
<record id="action_report_qweb_pdf" model="ir.actions.report">
379378
<field name="name">Utilization Report</field>
380-
<field name="model">hr.utilization.report</field>
379+
<field name="model">hr.utilization.report</field>
381380
<field name="report_type">qweb-pdf</field>
382381
<field name="report_name">hr_utilization_report.report</field>
383382
<field name="report_file">hr_utilization_report.report</field>
@@ -386,23 +385,22 @@
386385
</record>
387386

388387
<record id="action_report_qweb_html" model="ir.actions.report">
389-
<field name="name">Utilization Report HTML</field>
390-
<field name="model">hr.utilization.report</field>
391-
<field name="report_type">qweb-html</field>
392-
<field name="report_name">hr_utilization_report.report</field>
393-
<field name="report_file">hr_utilization_report.report</field>
388+
<field name="name">Utilization Report HTML</field>
389+
<field name="model">hr.utilization.report</field>
390+
<field name="report_type">qweb-html</field>
391+
<field name="report_name">hr_utilization_report.report</field>
392+
<field name="report_file">hr_utilization_report.report</field>
394393
<field name="binding_model_id" ref="hr.model_hr_employee" />
395394
<field name="binding_type">report</field>
396-
</record>
395+
</record>
397396

398397
<record id="action_report_xlsx" model="ir.actions.report">
399-
<field name="name">Utilization Report XLSX</field>
400-
<field name="model">hr.utilization.report</field>
401-
<field name="report_type">xlsx</field>
402-
<field name="report_name">hr_utilization_report.report</field>
403-
<field name="report_file">hr_utilization_report.report</field>
398+
<field name="name">Utilization Report XLSX</field>
399+
<field name="model">hr.utilization.report</field>
400+
<field name="report_type">xlsx</field>
401+
<field name="report_name">hr_utilization_report.report</field>
402+
<field name="report_file">hr_utilization_report.report</field>
404403
<field name="binding_model_id" ref="hr.model_hr_employee" />
405404
<field name="binding_type">report</field>
406-
</record>
407-
405+
</record>
408406
</odoo>

0 commit comments

Comments
 (0)