-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
Showing
30 changed files
with
2,078 additions
and
0 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,103 @@ | ||
===================== | ||
Hr Attendance Warning | ||
===================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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-lightgray.png?logo=github | ||
:target: https://github.com/OCA/hr/tree/11.0/hr_attendance_warning | ||
:alt: OCA/hr | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_attendance_warning | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/116/11.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module allows you to get warnings when there are | ||
inconsistencies between the theoric check in time of an employee | ||
and what has happened. | ||
|
||
Every time there is a check_in or a check_out the module checks whether | ||
it is inside the employee's working time or not and creates a warning if it's | ||
not. | ||
|
||
It also testes the opposite case, an employee not coming to work at expected | ||
time. A cron is executed every 5 minutes checking resource.calendar.attendances | ||
and checks if every employee related to it has done what it was expected. | ||
|
||
The module also adds a systray icon to receive notifications about warnings, | ||
which can be disabled by setting show_attendance_warning system parameter to | ||
false. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
Two new columns are added to resource.calendar.attendances, margin_from and | ||
margin_to. This two fields indicate the margin an employee has to check in | ||
and check out. If an employee enters at 9:00 with a margin of 30 minutes, | ||
it is expected to enter between 8:30 and 9:30, otherwise a warning will be | ||
generated. | ||
|
||
Different warnings created to a single employee the same day are stacked as | ||
lines in a hr.attendance.warning object. From there you can check employee's | ||
attendances to check the reason of the warning and correct the issues. | ||
|
||
After that, click on the Solve button to mark the warning as resolved. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/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/issues/new?body=module:%20hr_attendance_warning%0Aversion:%2011.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 | ||
~~~~~~~ | ||
|
||
* Creu Blanca | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Jaime Arroyo <jaime.arroyo@creublanca.es> | ||
* Enric Tobella <etobella@creublanca.es> | ||
|
||
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 <https://github.com/OCA/hr/tree/11.0/hr_attendance_warning>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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,2 @@ | ||
from . import models | ||
from . import wizards |
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,34 @@ | ||
# Copyright 2019 Creu Blanca | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
'name': 'Hr Attendance Warning', | ||
'summary': """ | ||
This module allows you to get warnings when there are | ||
inconsistencies between the theoric check in time of an employee | ||
and what has happened.""", | ||
'version': '11.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'author': 'Creu Blanca,Odoo Community Association (OCA)', | ||
'website': 'https://github.com/OCA/hr/', | ||
'depends': [ | ||
'hr_holidays_public', | ||
'hr_attendance', | ||
'resource', | ||
'mail' | ||
], | ||
'data': [ | ||
'data/ir_sequence_data.xml', | ||
'data/ir_config_parameter_data.xml', | ||
'data/check_issues_cron.xml', | ||
'security/hr_warnings_security.xml', | ||
'security/ir.model.access.csv', | ||
'views/assets_backend.xml', | ||
'views/hr_attendance_warning.xml', | ||
'views/resource_calendar_attendance.xml', | ||
'wizards/hr_attendance_warning_solve.xml', | ||
], | ||
'qweb': [ | ||
'static/src/xml/systray.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo noupdate="0"> | ||
|
||
<record id="ir_cron_check_attendances_issues" model="ir.cron"> | ||
<field name="name">Check attendances issues</field> | ||
<field name="user_id" ref="base.user_root" /> | ||
<field name="interval_number">5</field> | ||
<field name="interval_type">minutes</field> | ||
<field name="numbercall">-1</field> | ||
<field name="nextcall" eval="(DateTime.now() + timedelta(minutes=5)).strftime('%Y-%m-%d %H:%M:01')"/> | ||
<field name="model_id" ref="resource.model_resource_calendar_attendance"/> | ||
<field name="state">code</field> | ||
<field name="code"> | ||
model.cron_attendance_checks() | ||
</field> | ||
</record> | ||
|
||
</odoo> |
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
<data noupdate="1"> | ||
<record id="show_attendance_warning" model="ir.config_parameter"> | ||
<field name="key">show.attendance.warning</field> | ||
<field name="value">True</field> | ||
</record> | ||
</data> | ||
</odoo> |
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<odoo noupdate="1"> | ||
|
||
<record id="seq_attendance_warning" model="ir.sequence"> | ||
<field name="name">Attendance Warning sequence</field> | ||
<field name="code">hr.attendance.warning</field> | ||
<field name="prefix">ATTW</field> | ||
<field name="padding">8</field> | ||
</record> | ||
|
||
</odoo> |
Oops, something went wrong.