Skip to content

Commit

Permalink
[ADD] hr_utilization_report: generate Utilization Report from Task Logs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-pelykh committed Feb 2, 2019
1 parent d14bf33 commit 21a29e4
Show file tree
Hide file tree
Showing 21 changed files with 3,999 additions and 0 deletions.
111 changes: 111 additions & 0 deletions hr_utilization_report/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
============================
Task Logs Utilization Report
============================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr--timesheet-lightgray.png?logo=github
:target: https://github.com/OCA/hr-timesheet/tree/12.0/hr_utilization_report
:alt: OCA/hr-timesheet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-timesheet-12-0/hr-timesheet-12-0-hr_utilization_report
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/117/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to generate Utilization Report from Task Logs.

Features:
* Configure source data set
* Select reported fields
* Select and reorder report line grouping
* Select time interval
* Configure capacity format (HH:MM, HH:MM:SS, or decimal)
* Configure utilization format (percentage or absolute)
* View in browser, export in PDF and XLSX formats

**Table of contents**

.. contents::
:local:

Usage
=====

To create report using Utilization Report Wizard:
#. Go to *Timesheets > Reporting > Utilization Report Wizard*.
#. Configure the data set and click "View".

To create report using Utilization Report Wizard on a specific set of Employees:
#. Go to *Employees > Employees*.
#. Select employees that should be used in the report
#. Press the *Action > Generate Utilization Report* button
#. Configure the report and export it in one of the formats

To create report using Utilization Report Wizard on a specific set of Departments:
#. Go to *Employees > Departments*.
#. Select departments that should be used in the report
#. Press the *Action > Generate Utilization Report* button
#. Configure the report and export it in one of the formats

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

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

Bug Tracker
===========

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

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

Credits
=======

Authors
~~~~~~~

* Brainbean Apps

Contributors
~~~~~~~~~~~~

* Alexey Pelykh <alexey.pelykh@brainbeanapps.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/hr-timesheet <https://github.com/OCA/hr-timesheet/tree/12.0/hr_utilization_report>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions hr_utilization_report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import models
from . import wizards
from . import report
26 changes: 26 additions & 0 deletions hr_utilization_report/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
'name': 'Task Logs Utilization Report',
'version': '12.0.1.0.0',
'category': 'Human Resources',
'website': 'https://github.com/OCA/hr-timesheet',
'author':
'Brainbean Apps, '
'Odoo Community Association (OCA)',
'license': 'AGPL-3',
'installable': True,
'application': False,
'summary': 'Generate Utilization Report from Task Logs',
'depends': [
'hr_timesheet',
'report_xlsx',
],
'data': [
'views/hr_department.xml',
'views/hr_employee.xml',
'report/hr_utilization_report.xml',
'wizards/hr_utilization_report_wizard.xml',
],
}
4 changes: 4 additions & 0 deletions hr_utilization_report/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import hr_department
from . import hr_employee
20 changes: 20 additions & 0 deletions hr_utilization_report/models/hr_department.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models, api


class HrDepartment(models.Model):
_inherit = 'hr.department'

@api.multi
def action_utilization_report_wizard(self):
return {
'type': 'ir.actions.act_window',
'res_model': 'hr.utilization.report.wizard',
'views': [[False, 'form']],
'target': 'new',
'context': {
'default_department_ids': [(6, False, self.ids)],
},
}
20 changes: 20 additions & 0 deletions hr_utilization_report/models/hr_employee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models, api


class HrEmployee(models.Model):
_inherit = 'hr.employee'

@api.multi
def action_utilization_report_wizard(self):
return {
'type': 'ir.actions.act_window',
'res_model': 'hr.utilization.report.wizard',
'views': [[False, 'form']],
'target': 'new',
'context': {
'default_employee_ids': [(6, False, self.ids)],
},
}
1 change: 1 addition & 0 deletions hr_utilization_report/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Alexey Pelykh <alexey.pelykh@brainbeanapps.com>
10 changes: 10 additions & 0 deletions hr_utilization_report/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This module allows to generate Utilization Report from Task Logs.

Features:
* Configure source data set
* Select reported fields
* Select and reorder report line grouping
* Select time interval
* Configure capacity format (HH:MM, HH:MM:SS, or decimal)
* Configure utilization format (percentage or absolute)
* View in browser, export in PDF and XLSX formats
25 changes: 25 additions & 0 deletions hr_utilization_report/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
To create report using Utilization Report Wizard:
#. Go to *Timesheets > Reporting > Utilization Report Wizard*.
#. Configure the data set and click "View".

To create report using Utilization Report Wizard on a specific set of Employees:
#. Go to *Employees > Employees*.
#. Select employees that should be used in the report
#. Press the *Action > Generate Utilization Report* button
#. Configure the report and export it in one of the formats

To create report using Utilization Report Wizard on a specific set of Departments:
#. Go to *Employees > Departments*.
#. Select departments that should be used in the report
#. Press the *Action > Generate Utilization Report* button
#. Configure the report and export it in one of the formats

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

Without `project_timesheet_holidays` module installed, leaves are taken into
account: for a single 4-hour entry on specific day with 8 working hours and
4 hours of leaves, capacity would be calculated as 4 hours and utilization
would be calculated as 100%.
3 changes: 3 additions & 0 deletions hr_utilization_report/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import hr_utilization_report
Loading

0 comments on commit 21a29e4

Please sign in to comment.