-
-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd42765
commit 319b8cf
Showing
31 changed files
with
846 additions
and
1,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
.. 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 | ||
|
||
================== | ||
HR Timesheet Sheet | ||
================== | ||
|
||
This module supplies a new screen enabling you to manage your work encoding (timesheet) by period. | ||
Timesheet entries are made by employees each day. At the end of the defined period, | ||
employees validate their sheet and the manager must then approve his team's entries. | ||
Periods are defined in the company forms and you can set them to run monthly or weekly. | ||
|
||
|
||
Installation | ||
============ | ||
|
||
This module relies on: | ||
|
||
* The OCA module '2D matrix for x2many fields', and can be downloaded from | ||
Github: https://github.com/OCA/web/tree/11.0/web_widget_x2many_2d_matrix | ||
|
||
|
||
Configuration | ||
============= | ||
|
||
If you want other default ranges different from weekly, you need to go: | ||
|
||
* In the menu `Configuration` -> `Settings` -> **Timesheet Options**, | ||
and select in **Timesheet Sheet Range** the default range you want. | ||
|
||
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/117/11.0 | ||
|
||
|
||
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 smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Miquel Raïch <miquel.raich@eficent.com> | ||
|
||
|
||
Maintainer | ||
---------- | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
This module is maintained by the OCA. | ||
|
||
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. | ||
|
||
To contribute to this module, please visit https://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
import models | ||
import wizard | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
# Copyright 2018 Eficent | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Timesheets / Attendances', | ||
'version': '1.1', | ||
'name': 'HR Timesheet Sheet', | ||
'version': '11.0.1.0.0', | ||
'category': 'Human Resources', | ||
'sequence': 80, | ||
'summary': 'Timesheets, Activities', | ||
'description': """ | ||
Record and validate timesheets and attendances easily | ||
===================================================== | ||
This application supplies a new screen enabling you to manage your work encoding (timesheet) by period. Timesheet entries are made by employees each day. At the end of the defined period, employees validate their sheet and the manager must then approve his team's entries. Periods are defined in the company forms and you can set them to run monthly or weekly. | ||
The complete timesheet validation process is: | ||
--------------------------------------------- | ||
* Draft sheet | ||
* Confirmation at the end of the period by the employee | ||
* Validation by the project manager | ||
The validation can be configured in the company: | ||
------------------------------------------------ | ||
* Period size (Day, Week, Month) | ||
* Maximal difference between timesheet and attendances | ||
""", | ||
'website': 'https://www.odoo.com/page/employees', | ||
'depends': ['hr_timesheet'], | ||
'summary': 'Timesheet Sheets, Activities', | ||
'license': 'AGPL-3', | ||
'author': 'Eficent, Odoo Community Association (OCA)', | ||
'website': 'https://github.com/OCA/hr-timesheet', | ||
'depends': [ | ||
'hr_timesheet', 'account', | ||
'web_widget_x2many_2d_matrix', | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'security/hr_timesheet_sheet_security.xml', | ||
'data/hr_timesheet_sheet_data.xml', | ||
'views/hr_timesheet_sheet_templates.xml', | ||
'views/hr_timesheet_sheet_views.xml', | ||
'views/hr_department_views.xml', | ||
'views/hr_timesheet_sheet_config_settings_views.xml', | ||
'views/res_config_settings_views.xml', | ||
], | ||
'installable': True, | ||
'auto_install': False, | ||
'qweb': ['static/src/xml/timesheet.xml', ], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
|
||
import account_analytic_line | ||
import hr_department | ||
import hr_employee | ||
import hr_timesheet_sheet | ||
import hr_timesheet_sheet_config_settings | ||
import res_company | ||
from . import account_analytic_line | ||
from . import hr_department | ||
from . import hr_employee | ||
from . import hr_timesheet_sheet | ||
from . import res_company | ||
from . import res_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. | ||
# Copyright 2018 Eficent Business and IT Consulting Services, S.L. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import api, fields, models | ||
|
||
|
||
class HrDepartment(models.Model): | ||
_inherit = 'hr.department' | ||
|
||
timesheet_to_approve_count = fields.Integer( | ||
compute='_compute_timesheet_to_approve', string='Timesheet to Approve') | ||
timesheet_sheet_to_approve_count = fields.Integer( | ||
compute='_compute_timesheet_to_approve', | ||
string='Timesheet Sheets to Approve', | ||
) | ||
|
||
@api.multi | ||
def _compute_timesheet_to_approve(self): | ||
timesheet_data = self.env['hr_timesheet_sheet.sheet'].read_group( | ||
[('department_id', 'in', self.ids), ('state', '=', 'confirm')], ['department_id'], ['department_id']) | ||
result = dict((data['department_id'][0], data['department_id_count']) for data in timesheet_data) | ||
timesheet_data = self.env['hr_timesheet.sheet'].read_group( | ||
[('department_id', 'in', self.ids), ('state', '=', 'confirm')], | ||
['department_id'], ['department_id']) | ||
result = dict( | ||
(data['department_id'][0], data['department_id_count']) | ||
for data in timesheet_data | ||
) | ||
for department in self: | ||
department.timesheet_to_approve_count = result.get(department.id, 0) | ||
department.timesheet_sheet_to_approve_count = \ | ||
result.get(department.id, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.